Commit Graph

1394 Commits

Author SHA1 Message Date
Eliot Jones
11df5b520d update y if preceding letter was blank #603 2023-05-22 20:40:36 +01:00
Eliot Jones
471dca8327 amend default word extractor logic #603
default word extractor consumed words sorted
by descending y value order and had a check for
when the following letter had a value more than 0.5
units different to the current baseline (from first letter)
position. however we were checking if the new value was
more than the current baseline which it could never
be since the letter was always guaranteed to have an
equal or lower y value based on initial sort (since pdf
y dimension runs top to bottom)
2023-05-22 20:22:19 +01:00
Eliot Jones
98be67d93b
Merge pull request #629 from thinkbeforecoding/fix/copyfrom
Fix: copyfrom resources collisions
2023-05-22 19:59:14 +01:00
BobLd
d244c10a94 Add caching to DeviceN and Separation colors spaces when rendering images 2023-05-22 09:27:37 +01:00
jchassaing
876808b1eb Fix: Missing cultureinfo fails tests on non-US systems 2023-05-22 09:06:40 +02:00
jchassaing
08f4b4a372 Fix: Handle Fm resources and GS (gfx state) in page copyFrom 2023-05-22 09:05:14 +02:00
Eliot Jones
c3dd69388d normalize some line endings 2023-05-21 19:17:14 +01:00
Eliot Jones
bb4c6f2f1e add capacity to glyph list dictionaries 2023-05-21 19:13:14 +01:00
Eliot Jones
976d8929a1 Merge branch 'master' of github.com:UglyToad/PdfPig 2023-05-21 14:58:45 +01:00
Eliot Jones
fc2f7b9325 add intelligent error recovery for known dictionaries #511
if we're parsing a known dictionary (e.g. all keys are required
and there are no additional optional keys) and we encounter
an error we provide the possibility to recover by assuming
a dictionary end token after all required tokens are consumed
if parsing by looking for dictionary end failed due to a format
exception
2023-05-21 14:58:39 +01:00
BobLd
616978a178 Use IPdfTokenScanner in PdfFunctionType3 create function 2023-05-21 14:56:12 +01:00
BobLd
903218854c Refactor PdfFunctionParser to account for indirect reference tokens 2023-05-21 13:44:57 +01:00
Eliot Jones
32a562f02a address compiler warnings, swap rijndael for aes 2023-05-21 13:44:36 +01:00
BobLd
9acfac4fdf Handle many functions in Shading 2023-05-21 13:03:23 +01:00
Eliot Jones
0b8252e930 do not require tounicode to be valid even if present #354 #619
these issues reported that parsing was failing due to a missing
token being reference in the tounicode entry. since neither
issue included a sample file it's impossible to determine the
right fix accurately, however since the tounicode entry is
optional in the spec we can try being more lenient here, this
might just result in more errors once we try to use the font
but the logger will at least prevent parsing the entire document
failing
2023-05-21 12:34:27 +01:00
Eliot Jones
6b9c3be9f8 tidy up some small formatting issues 2023-05-21 12:20:57 +01:00
Eliot Jones
2073e036ef Merge branch 'master' of github.com:UglyToad/PdfPig 2023-05-18 20:30:20 +01:00
Eliot Jones
2a1a09d1fa handle missing optional named destinations 2023-05-18 20:30:17 +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
Eliot Jones
fc59d1e58f try making nightly release dependent on test passing 2023-05-18 20:05:06 +01:00
Eliot Jones
c68c195ea8 update package target frameworks 2023-05-18 19:59:58 +01:00
Eliot Jones
23aeb66566 bump integration test runner version 2023-05-17 20:34:10 +01:00
Eliot Jones
35ff13732e remove completely out of support net 4.5 2023-05-17 20:20:05 +01:00
Yufei Huang
3898f09a5f Pdf merger support copy links 2023-04-22 13:54:31 +01:00
mvantzet
147b8997cc
Fix glyph bounding box for Type3 font with zero height (#610)
* For Type3 font with a zero width/height bounding box, set it to a sensible
default using the font matrix. This ensures the letter bounding boxes will
not have height 0.

* Also added a test to check for non-zero height in the sample Type3 PDF

* Prevent division by zero error

---------

Co-authored-by: mvantzet <mark@radialsg.com>
2023-04-19 08:55:34 +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
cdc3d7722a Set rendering intent in operation 2023-04-16 19:34:54 +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
BobLd
0d15c395ea Revert "Update run_integration_tests.yml"
This reverts commit 92f47df9f6.
2023-04-16 19:29:15 +01:00
BobLd
9eb791ae58 Fix integration tests for #595 2023-04-14 13:16:54 +01:00
BobLd
42e4171c31 Fix integration tests for #579 (3) 2023-04-13 19:27:54 +01:00
BobLd
906066ec58 Fix integration tests for #579 (2) 2023-04-13 18:56:57 +01:00
BobLd
46a04c21f5 Fix integration tests for #579 2023-04-12 17:56:21 +01:00
BobLD
b8a98fbed2 Properly implement color spaces 2023-04-12 07:25:09 +01:00
Eliot Jones
db0583edea
Merge pull request #597 from UglyToad/BobLd-patch-1
Update run_integration_tests.yml
2023-04-11 20:46:32 +02:00
Eliot Jones
6bca81fca2
Merge pull request #596 from GiovanniNova/master
Support for full-size images without specifing size
2023-04-11 20:43:33 +02:00
BobLd
92f47df9f6
Update run_integration_tests.yml
Update integration tests action dotnet version from 2.1.x to 3.1.x
2023-04-10 17:41:05 +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
GiovanniNova
cdc91eeef7 Support for full-size images without specifing size 2023-04-10 11:14:20 -03:00
Alejandro
2e0622b652 Possibility to set CreationDate and ModifiedDate in DocumentInformationBuilder 2023-04-02 12:35:58 +01:00
Yufei Huang
bd4eedfcac make Bookmarks constructor public 2023-03-30 18:06:04 +01:00
BobLd
2dabaf1348
Update System.Drawing.Common version in Tests (#584) 2023-03-26 19:42:35 +01:00
BobLd
93a2f318aa
Fix Type 3 font height and fix #500 (#585) 2023-03-26 19:20:20 +01:00
BobLd
58b3394d01
Setting C# version to latest in Examples and ConsoleRunner projects (#582) 2023-03-25 19:15:01 +00:00
Fred Natzke
10fa9eceb9
FixIssue576-AddPng-WithTransparency SMask hardcoded as 8 bitsPerComponent not 1. (#577) 2023-03-25 16:30:02 +00:00
BobLd
3dd9a5685d
Fix PR #552 failing integration tests (#580) 2023-03-25 16:29:28 +00: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
a486114c8d
Merge pull request #573 from GiovanniNova/master
Fixes #567, ReadShort now casts to and returns an ushort
2023-03-22 18:49:46 +00:00
GiovanniNova
aeb08744cb Fixes #567, ReadShort now casts to and returns an ushort 2023-03-21 11:13:48 -03:00
BobLd
c024e6abd0
Merge pull request #570 from UglyToad/alpha-operator
AlphaConstants and more named graphics state
2023-03-19 20:52:13 +00:00