Commit Graph

102 Commits

Author SHA1 Message Date
BobLd
ae5d3627e0 Add AddPageFactory() methods and GetPage<T>() to PdfDocument. Make public IPageFactory<TPage>, PageFactoryBase<TPage>, IResourceStore, ILookupFilterProvider, IPageContentParser, IPdfTokenScanner, UserSpaceUnit, ResourceColorSpace 2023-07-01 18:33:17 +01:00
Eliot Jones
2be4c69c16 set nightly release version
also toggles class back to public for nightly
versions #538
2023-06-05 21:37:34 +01:00
Eliot Jones
4118ae0df4 temp hide pdftextremover #538 2023-06-05 21:09:41 +01:00
BobLd
a4284aa5a8 Implement Pattern color space and Shading, seal IColor classes, stop using decimal in colors and use double instead 2023-05-18 20:24:55 +01:00
kapiosk
2d72d62c59
Updated created basic AcroFormExtensions for fields (#599)
* Created basic AcroFormExtensions for fields

* Update AcroFormExtensions.cs

* Added AcroFormExtensions in PublicApiScannerTests
2023-04-18 17:53:05 +01:00
BobLd
8c08aa2efe Implement Lab and DeviceN color spaces and fix bug in SetNonStrokingColorspace() for Transparency Group XObjects 2023-04-16 19:34:38 +01:00
mvantzet
0e39bc0b76
Annotations named destinations (#579)
* 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>
2023-04-10 17:14:14 +01:00
Yufei Huang
a3a9d1a2b5
Support adding outline bookmarks to existing pdf document (#552)
Support adding outline bookmarks to existing pdf document
2023-03-23 10:21:11 +00:00
BobLD
d3f8e83b27 Make some necessary classes public 2023-03-17 21:43:15 +00:00
BobLD
c56705d4ff Implement pdf functions and add type 0, 2 and 4 function tests 2023-03-08 18:59:16 +00:00
mvantzet
94c62e1b65 Forgot to commit this updated test, to allow ITokenWriter and PdfTextRemover
to be public.
2022-12-21 09:35:29 +01:00
Eliot Jones
b0a5f4c8d0 fix test, again 2022-02-19 16:27:21 -04:00
Eliot Jones
109e0df0c4 fix test 2022-02-19 16:19:11 -04:00
Kasper Frank
da821e27e1 Add support for CalGray and CalRGB colorspaces 2021-05-30 14:07:41 +02:00
Kasper Frank
2fa003730a Add (limited) support for the ICCBased color space 2021-05-27 13:01:51 +02:00
BobLd
30dbc4cd41
Merge pull request #282 from BobLd/266-layers
Optional content (aka layers collections) partial extraction
2021-02-15 09:27:43 +00:00
Eliot Jones
25cc3c8634
Merge pull request #279 from plaisted/edit-docs-v2
Add pages from PdfDocument to PdfDocumentBuilder
2021-02-14 09:58:08 -04:00
Eliot Jones
c19742a2ae make converter public and add separation color space 2021-02-08 18:40:28 -04:00
BobLd
78e6e582cd Partial optional content extraction: Add page.GetOptionalContents() and add tests. 2021-02-07 12:42:20 +00:00
Plaisted
7f42ad0af9 refactored previous work to fit pr #250 2021-02-06 12:24:53 -06:00
BobLd
54f7f7a84a Update PublicApiScannerTests with new public methods 2020-11-23 12:53:35 +00:00
BobLd
5f75205e41 rename TextDirection into TextOrientation 2020-05-30 13:03:59 +01:00
Eliot Jones
09b951f667 expose font details on individual letters
also fixes a regression for image extraction
2020-04-25 17:15:26 +01:00
Eliot Jones
27e251f921 make filter provider and filter public and use tryget for image bytes 2020-04-25 09:42:24 +01:00
Eliot Jones
48aa9169c5 add whitespace size statistics to api scanner test 2020-04-19 17:10:46 +01:00
BobLd
b462c3bea4 update PublicApiScannerTests 2020-04-12 10:15:12 +01:00
BobLd
064fa4922a make Clipping internal
do not throw errors when CurrentPath is null
modify tests to match
2020-04-05 17:58:57 +01:00
Eliot Jones
5f45ee53bd #127 add basic pdf/a-1b level compliance to the document builder
adds color profiles/output intents and an xmp metadata stream to the document in order to be compliant with pdf/a-1b (basic). this compliance level is toggled on the builder since it will generate larger files and set to 'off/none' by default. pdf/a documents are also not able to use standard fonts so using a font when the compliance level is not none will throw.
2020-03-29 16:43:52 +01:00
Eliot Jones
2193063809 fix tests for public api and merge conflict
the cross reference parser tests behaviour had change, this fixes a compilation error from merge conflicts. also updates the merger tests to account for new version behaviour and checks the output document text. adds pdfmerger to the public api in the tests.
2020-03-02 17:00:16 +00:00
Eliot Jones
43574097f1 rename marked content elements and use factory
since the properties in marked content may be indirect references or belong to the page resources array, the value should be calculated during content processing. this change tidies up the marked content classes so they do not expose mutable data and uses the pdf token scanner overloads to load dictionary data.
2020-01-09 15:30:16 +00:00
BobLd
097692f1cb Move ArtifactType inside PdfArtifactMarkedContent 2020-01-09 11:24:32 +00:00
BobLd
7be36fdc58 Update PublicApiScannerTests 2 2020-01-08 11:07:27 +00:00
BobLd
4b929482cc Update PublicApiScannerTests 2020-01-08 10:46:49 +00:00
Eliot Jones
00bd285262 add support for quadpoints to annotations
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.
2020-01-05 16:23:07 +00:00
Eliot Jones
b29354e3e6 move compact font format fonts to fonts project 2020-01-05 12:08:01 +00:00
Eliot Jones
d09b33af4d move tokens to new project 2020-01-05 10:07:01 +00:00
Eliot Jones
1c38a2ae8a move pdfline to the core project 2020-01-05 09:33:59 +00:00
Eliot Jones
15525acbaa move document layout analysis and export to new project 2020-01-05 09:19:58 +00:00
Eliot Jones
a6541f1cfc fix test references
update references for unit tests to reference new core and fonts projects. all tests except the public api scanner tests now run successfully.
2020-01-04 22:56:41 +00:00
Eliot Jones
cf1b8651d6 make adler32checksum public
there's no reason to keep adler32checksum internal so it is made public in case people find it useful.
2020-01-04 10:27:07 +00:00
Eliot Jones
b15a3a9b57 tidy up truetype tables
* improves the naming of truetype related classes.
* uses correct numeric type for the loca table.
* makes a few related classes public.
2020-01-04 10:27:07 +00:00
BobLd
07f51712c6 Update PublicApiScannerTests 2020-01-03 12:31:23 +00:00
BobLd
3a060d9769 Update PublicApiScannerTests 2019-12-28 14:43:09 +00:00
Eliot Jones
e984180b3d add method to retrieve any embedded files 2019-12-21 16:16:36 +00:00
Eliot Jones
7296c3c125
merge pull request #105 from BobLd/master
whitespace covering algorithm and #104
2019-12-20 11:57:31 +00:00
BobLd
6dba5bb2b4 update PublicApiScannerTests 2019-12-18 11:43:39 +00:00
Eliot Jones
1fb416eee3 add convenience method to retrieve all hyperlinks and their text from annotations on a page 2019-12-18 11:41:02 +00:00
BobLd
1656411fcb Improving Geometry classes with Tests 2019-12-14 11:41:11 +00:00
Eliot Jones
75a6260501 make cropbox public 2019-12-06 17:34:51 +00:00
Eliot Jones
2e5c995322 make external nodes different to document nodes and finish reimplementation 2019-12-05 13:21:19 +00:00