543 Commits

Author SHA1 Message Date
Gunnsteinn Hall
6e7b575f0f
Cross reference search speed improvements [v3] (#424)
* Change XrefTable to struct and add cache for speeding up search.  Speedup object lookup to use cache in hasObject (writer). Changed to empty struct to reduce allocations.
2019-04-18 19:22:45 +00:00
Adrian-George Bostan
69ab100a9e Make outline root an indirect object if it is a dict 2019-04-17 21:50:12 +00:00
Adrian-George Bostan
d34ba3c29e Set Pages dict Type if not set (#419) 2019-04-17 21:17:22 +00:00
Adrian-George Bostan
0d2e2fa2cd Add custom signing function for the adobeX509RSASHA1 signature handler (#414) 2019-04-15 20:21:48 +00:00
Gunnsteinn Hall
f8ac397bdf
NewPdfReaderLazy supports reading PDF files in lazy-load mode (#409)
* Lazy loading support NewPdfReaderLazy. 
* Change colorspace and annotations loading to lazy. Clean up page object loading.
* Clear up reference resolving and remove redundant traceToObject function.
* Add IsLogLevel function to logger.  Can be used to avoid calling resource intensive functions except when running trace only.
2019-04-14 22:22:41 +00:00
Gunnsteinn Hall
4ba3468f76
Image loading performance enhancements [v3] (#394)
* Avoid reading entire file to memory prior to loading. Better handling of grayscale images.  Improved allocations. Avoid redrawing RGBA images again if loaded. Update  CCITTFaxDecode handling accordingly.
2019-04-14 19:03:05 +00:00
Bert Van Hauwaert
1433f04194 Expand document information dictionary - v3 branch (#408)
* Add author, creationDate, keywords, modifiedDate, subject & title to the document information dictionary.
2019-04-14 18:34:55 +00:00
Adrian-George Bostan
d21dab045b No break space character metrics (#397)
* Use same metrics for no-break space and space
* Update font test to include nbsp case
2019-04-02 17:57:08 +00:00
Adrian-George Bostan
95b4e1cfc0 Remove unnecessary sample signature file 2019-03-28 17:19:39 +00:00
Adrian-George Bostan
7cd6479b61 Adjust external signature test case 2019-03-28 17:19:39 +00:00
Gunnsteinn Hall
ee1416433c Use StandardEncoding for builtin standard fonts (not WinAnsiEncoding). Fix testcases.
Add test cases and fix the encoding table also based on observed errors
2019-03-28 09:57:33 +00:00
Gunnsteinn Hall
936bf446fc Create page resources when making new page 2019-03-28 09:57:33 +00:00
Gunnsteinn Hall
346e064292 Set default encoder to WinAnsiEncoder when creating font for standard latin fonts
The WinAnsiEncoding has more symbols than the StandardEncoding so is more useful for latin texts and a better default.  Some clean up.
2019-03-28 09:57:33 +00:00
Gunnsteinn Hall
3cefc98874 Add extra nil check 2019-03-26 22:42:04 +00:00
Gunnsteinn Hall
d55811f379 Avoid adding nil objects to page objects 2019-03-26 22:42:04 +00:00
Gunnsteinn Hall
5b565c20ac Fix parsing signature dictionaries when Type not set (optional) 2019-03-26 22:42:04 +00:00
Gunnsteinn Hall
a7fddd5f7a Fix outline tree parsing when First pointing to a null object (inside indirect object) 2019-03-26 22:42:04 +00:00
Gunnsteinn Hall
6587363ac3 Fix unknown annotation error when using non-standard annotations.
Output a debug message rather than failing with error.  Guard when function returns nil.
2019-03-26 22:42:04 +00:00
Adrian-George Bostan
c3692615ee Update external signature test case to use the latest certificate 2019-03-24 09:43:29 +00:00
Gunnsteinn Hall
641fbf5551 Fix failing signature tests. Replaced old test certificate with one that lasts 100 years
Included instructions for generating the certificate
2019-03-24 08:55:23 +00:00
Adrian-George Bostan
e5a1d87b52 Update external signature test case 2019-03-15 20:10:12 +00:00
Adrian-George Bostan
8734b68fbe Fix typo in comment 2019-03-15 20:10:12 +00:00
Adrian-George Bostan
6b129bd7a7 Add external signature test case 2019-03-15 20:10:12 +00:00
Adrian-George Bostan
bdc3497716 Add empty signature support to the adobePKCS7Detached handler 2019-03-15 20:10:12 +00:00
Adrian-George Bostan
97a8e9fafc Remove commented code 2019-03-14 17:39:54 +00:00
Adrian-George Bostan
4036cd2562 Fix documentation related golint notices in the model package 2019-03-14 17:39:54 +00:00
Adrian-George Bostan
6a887be571 Fix code related golint notices in the model package 2019-03-14 17:39:54 +00:00
Gunnsteinn Hall
9d714ad639 Remove NewX for each standard font in std. Go through a single exported function instead. 2019-03-12 19:08:37 +00:00
Gunnsteinn Hall
a03198000b Update Jenkinsfile for matching examples branch. Address go vet. 2019-03-12 19:08:37 +00:00
Gunnsteinn Hall
aaa2b2ac1b Update font path in testcase 2019-03-12 19:08:37 +00:00
Gunnsteinn Hall
41ade9230d Remove extra GetRuneCharMetrics function - use GetRuneMetrics 2019-03-12 19:08:37 +00:00
Gunnsteinn Hall
9665959bcf Move model/fonts to model/internal/fonts - reducing export surface
- Move the folder
- Update imports
- Add type aliases to access needed types from model (fonts.StdFont, fonts.CharMetrics and the font names)
2019-03-12 19:08:37 +00:00
Adrian-George Bostan
e21121dc13 Update signature object ByteRange 2019-02-27 23:32:53 +02:00
Adrian-George Bostan
15c3f6abfa Remove duplicate code 2019-02-27 23:32:32 +02:00
Adrian-George Bostan
7c64fc1bbc Fix loading of AcroForms in the appender 2019-02-21 23:40:26 +02:00
Adrian-George Bostan
ba2e1fc576 Adjust appender test with the signature appearance implementation 2019-02-21 20:47:43 +02:00
Adrian-George Bostan
b33ad302be Add default values for the signature field 2019-02-21 20:24:06 +02:00
Adrian-George Bostan
657fe00a78 Fix signature validation 2019-02-21 00:20:47 +02:00
Adrian-George Bostan
2bd79b2dab Improve signature appearance appender test 2019-02-19 22:04:12 +02:00
Adrian-George Bostan
9ac33ed886 Add signature appearance appender test 2019-02-19 21:48:51 +02:00
Adrian-George Bostan
ab979aca95 Add initial signature appearance implementation 2019-02-19 21:48:32 +02:00
Adrian-George Bostan
38d71b46b4 Minor code documentation improvements 2019-02-19 17:59:38 +02:00
Gunnsteinn Hall
e93ffb25f4
Merge branch 'v3' into v3-a5i-pdf-sign 2019-02-18 21:58:35 +00:00
Nikita Kryuchkov
cc63340752
Merge branch 'v3' into v3-ccittfaxdecode 2019-02-18 08:33:18 +03:00
Gunnsteinn Hall
ff0e5fc38e
Merge branch 'v3' into encodings 2019-02-17 22:31:39 +00:00
nkryuchkov
54443dab7f Adapt code to the new changes from v3 2019-02-15 23:32:40 +03:00
nkryuchkov
fcf3e8786f Merge branch 'v3' into v3-ccittfaxdecode 2019-02-15 23:01:07 +03:00
Adrian-George Bostan
28ad01f4b9 Change the prototype of the appender Sign method 2019-02-15 20:59:17 +02:00
nkryuchkov
4c1f9e1c4b Remove log.Println() 2019-02-15 20:14:44 +03:00
Adrian-George Bostan
c2d1efb653 Combine PdfFieldSignature with PdfSignatureAppearance 2019-02-13 20:28:24 +02:00