* Enable nullable annotations
* Remove unused Jetbrain annotations
* Ensure system using statements are first
* Improve nullability annotations
* Annotate encryptionDictionary is non-null when IsEncrypted is true
* Disable nullable for PdfTokenScanner.Get
* Improve nullability annotations for ObjectLocationProvider.TryGetCached
* Revert changes to RGBWorkingSpace
* Update UglyToad.PdfPig.Package with new framework targets (fixes nightly builds)
* Add Named Destinations to Catalog so that bookmarks and links can access
them.
The named destinations require access to page nodes, so created Pages object
that is made using PagesFactory (which contains the page-related code from
Catalog).
* Further implementation of destinations:
- Implement NamedDestinations in AnnotationProvider, so that we can look
up named destinations for annotations and turn them into explicit destinations.
Reused existing code inside BookmarksProvider to get destinations/actions.
- Added GoToE action
- According to the PDF reference, destinations are also required for
external destinations and hence for ExternalBookmarkNode. This allows us
to push up DocumentBookmarkNode.Destination to BookmarkNode.
* Implemented stateful appearance streams and integration test
* Added AppearanceStream to public API because it is used in the (public)
Annotation constructor
* After #552, must push down ExplicitDestination do DocumentBookmarkNode since it
does not apply to UriBookmarkNode.
* Added actions, which fits the PDF model better and works well with the
new bookmarks code (after PR #552)
* Rename Action to PdfAction + removed unused using in ActionProvider.cs
---------
Co-authored-by: mvantzet <mark@radialsg.com>
- Pass in the initial matrix to the annotation provider, so that it can return
the correct rectangles / quad points.
- Made a change / extensions to the Annotation class:
- ModifiedDate is now a DateTimeOffset instead of unparsed string.
If the string is invalid, ModifiedDate is set to the default value.
- Added lookup for the "appearance streams"; all the annotations should have
a "N" (normal) appearance, and optionally have a "R" (roll-over/hover)
and "D" (down/click) appearance. Did not expose the actual stream objects,
but added a flag indicating the existence of "R" / "D". At some point
we can consider doing something with the appearances.
- Changed signature of GetInitialMatrix / ContentStreamProcessor constructor
from PdfRectangle back to what it was earlier, namely MediaBox and CropBox,
to prevent accidentally mixing the two up in the caller.
an arrray of 4 items representing a rectangle may define its values as indirect references. when converting to a rectangle we pass a pdf token scanner to resolve any indirect references.
highlight, link, strikeout, squiggly and underline annotation types may define a set of quadrilaterals using the quadpoints entry. this defines the regions to show/activate the annotation. the order of points in the quadpoints array does not match the specification so we provide a convenience class to access the point data rather than interpreting it as a rectangle: https://stackoverflow.com/questions/9855814/pdf-spec-vs-acrobat-creation-quadpoints.
the 3 font types mentioned are moved to the new fonts project, any referenced types are moved to the core project. most truetype classes are made public #8.