Commit Graph

1152 Commits

Author SHA1 Message Date
Eliot Jones
636936330a Merge pull request #326 from kasperdaff/ccitt-fax-filter-fixes
Fixes for recent CCITT Fax Filter implementation
2021-05-15 12:26:02 -04:00
Daniel Franklin
e49de04c77 Fixes null reference exception 2021-05-12 01:28:09 +07:00
Kasper Frank
21bac62b95 Look in the correct array when resolving decode parameters 2021-05-10 11:58:42 +02:00
Kasper Frank
9f6dd5375d DecodeParms might be an indirect reference 2021-05-10 09:01:57 +02:00
Eliot Jones
16d26effc5 0.1.5-alpha002 2021-05-09 13:05:54 -04:00
Eliot Jones
97e831c321 handle narrow whitespaces in default text extractor #319
where the gap is small but much larger than all previous gaps at this
font size (and still larger than some minimum threshold) then break
the word at this gap boundary.
2021-05-09 12:59:53 -04:00
Kasper Frank
30039aa6d3 Decode fix for CCITTFax Group 3 (1 dimensional version) 2021-05-09 18:45:26 +02:00
Eliot Jones
264cf7b8a8 fix write token for paint shading #325 2021-05-09 12:33:22 -04:00
Eliot Jones
421dd74840 fix bug in encryption handler. couple of code style tweaks 2021-05-09 12:31:51 -04:00
Kasper Frank
eaba3d1c6c CCITT Fax doesn't have to be image masks 2021-05-07 14:19:42 +02:00
Kasper Frank
65a4c141ba Consolidate DictionaryToken extension methods 2021-05-07 12:55:36 +02:00
Kasper Frank
f8990a79b8 Add indexed color space for stencils 2021-05-07 12:37:02 +02:00
Kasper Frank
8c6f705d2a Basic unit tests of CCITT Fax filter decoding 2021-05-07 08:29:47 +02:00
Kasper Frank
9c2cd89de4 Add support for the CCITTFaxDecode filter 2021-05-07 08:29:46 +02:00
Kasper Frank
c285c567e8 Fixes compiler error 2021-05-05 11:35:39 +02:00
Kasper Frank
bd968ff074 Improves support for indexed colorspace images. Also adds rudimentary unit tests of PngFromPdfImageFactory. 2021-05-05 11:14:52 +02:00
Wesley Moret
268947fb5e Allow to have a metadata stream in the document information entry (#322) 2021-05-01 11:44:56 -04:00
Eliot Jones
c7c4adf441 correctly detect encrypted string encoding when decrypting #313 2021-04-30 10:22:50 -04:00
Kasper Frank
b225033916 The palette of an indexed color space can be stored in a StringToken 2021-04-29 10:23:15 +02:00
Kasper Frank
e26a95a337 CMYK has four color components 2021-04-26 14:58:07 +02:00
Eliot Jones
9ae0a5ec15 allow stream filters to contain indirect references to name tokens 2021-04-25 16:22:22 -04:00
romain v
b8135129cb fix null token handling
in document creation
2021-04-02 16:36:04 +02:00
Eliot Jones
12ad8278e3 don't lose object stream offsets when brute-forcing offsets 2021-03-01 14:18:19 -04:00
Eliot Jones
b930924b9b 0.1.5-alpha001 2021-02-28 13:55:25 -04:00
Eliot Jones
6a1fa544d2 default height from font matrix for type 0 fonts when height missing #287 2021-02-28 13:48:23 -04:00
Eliot Jones
13247a5218 #301 add missing arial bold standard14 name 2021-02-28 13:33:07 -04:00
Eliot Jones
7c0fd48afa #299 #241 add correct fallback cmap for korea1-3 and missing japan cmap 2021-02-28 13:27:16 -04:00
Eliot Jones
89ee5f5358 skip completely null dictionaries #300 2021-02-23 20:07:14 -04:00
Eliot Jones
cc81541ce2 avoid infinite loop in #291, logic issue is still present for png predictor 2021-02-23 15:04:28 -04:00
Eliot Jones
560e8ae858 don't throw when reading corrupt truetype name table #292 2021-02-21 12:27:11 -04:00
Eliot Jones
becc772242 check for offsets exceeding file length for xref parsing #293 2021-02-21 12:04:17 -04: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
BobLd
3b1a7f79ca Add test with no optional content, return IReadOnlyDictionary<>, use pdfScanner in OC constructor 2021-02-14 21:40:40 +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
BobLd
4cd1f60f5b Move GetOptionalContents into Experimental and get optional marked content recursively 2021-02-13 15:01:06 +00:00
Plaisted
4b8925a442 fix missing change 2021-02-10 20:56:51 -06:00
Plaisted
ef0bcd2055 changes for intital InusualZ review 2021-02-10 20:18:03 -06:00
Plaisted
509164447b review changes from Poltuu, test coverage for token replacement 2021-02-10 12:27:12 -06:00
Eliot Jones
68dd3f5a75 add device cmyk support for png conversion 2021-02-08 18:40:28 -04:00
Eliot Jones
c19742a2ae make converter public and add separation color space 2021-02-08 18:40:28 -04:00
Eliot Jones
9fc44f50d2 fix indexing into indexed color space by using table 2021-02-08 18:40:28 -04:00
Eliot Jones
6c293011a2 keep the bytes factory call which was accidentally removed 2021-02-08 18:40:28 -04:00
Eliot Jones
fad06eac27 add full color space details and transformation into full bytes for indexed 2021-02-08 18:40:28 -04:00
Plaisted
e7f96c0b16 add changes from unsaved file 2021-02-08 12:53:02 -06:00
Plaisted
6e1cf89cf9 clean up pagebuilder, switch merger to use pdfdocumentbuilder 2021-02-08 12:37:09 -06:00
Romain V
c008340b2b fixes NullToken for a font (#284)
font was in a streamObject, PdfTokenScanner.ParseObjectStream would return a NullToken
DirectObjectFinder.Get would then throw on line 79, even thus it should handle null tokens (i.e. ResourceStore.LoadFontDictionary line 152)
2021-02-08 11:19:39 -04:00
Plaisted
ca0b90523e fix bug where default stream reader wrote header for every object 2021-02-07 10:51:02 -06:00
Plaisted
c6ed29bda4 cleanup stream writing to only write multiple when needed 2021-02-07 10:37:31 -06:00
Eliot Jones
6f49b2e29e Fix buggy font (#283)
* Adds checksum on font file reading

* fix name table parsing on broken table

* only warn if checksum invalid, avoid exception with bounds check #258

also returns a null object when the object generation number exceeds
ushort.maxvalue since this is the maximum allowed value and this
broke tests attempting to parse all objects in the file from #258

* remove potentially problematic document

it might be sensitive data

* use ttf from file to test without including full file

Co-authored-by: romain v <rvergnory@lucca.fr>
2021-02-07 12:23:11 -04:00
Eliot Jones
9d99ac4e9b handle completely null content #243 2021-02-07 12:22:07 -04:00