1699 Commits

Author SHA1 Message Date
Gunnsteinn Hall
1b1158ed94 Merge remote-tracking branch 'upstream/master' into dev-merge-master 2020-06-16 21:45:48 +00:00
Gunnsteinn Hall
dbd2364470 Merge branch 'development' of https://github.com/unidoc/unipdf into development 2020-06-16 21:19:49 +00:00
Gunnsteinn Hall
11f692bc3a
Font subsetting and font optimization improvements (#362)
* Track runes in IdentityEncoder (for subsetting), track decoded runes

* Working with the identity encoder in font_composite.go

* Add GetFilterArray to multi encoder.  Add comments.

* Add NewFromContents constructor to extractor only requiring contents and resources

* golint fixes

* Optimizer compress streams - improved detection of raw streams

* Optimize - CleanContentStream optimizer that removes redundant operands

* WIP Optimize - clean fonts

Will support both font file reduction and subsetting. (WIP)

* Optimize - image processing - try combined DCT and Flate

* Update options.go

* Update optimizer.go

* Create utils.go for optimize with common methods needed for optimization

* Optimizer - add font subsetting method

Covers XObject Forms, annotaitons etc.  Uses extractor package to extract text marks covering what fonts and glyphs are used.  Package truetype used for subsetting.

* Add some comments

* Fix cmap parsing rune conversion

* Error checking for extractor.  Add some comments.

* Update Jenkinsfile

* Update modules
2020-06-16 21:19:10 +00:00
Gunnsteinn Hall
8ab0b6ff45
Merge pull request #372 from gunnsth/release/v3.8.0
Prepare unipdf release v3.8.0
v3.8.0
2020-06-16 08:35:52 +00:00
Gunnsteinn Hall
deb563b581 Prepare release v3.8.0 2020-06-15 20:17:12 +00:00
Gunnsteinn Hall
c7c50ffc37 Merge remote-tracking branch 'upstream/master' into release/v3.8.0 2020-06-15 20:16:22 +00:00
Gunnsteinn Hall
9e5a17eace Merge branch 'development' of https://github.com/unidoc/unipdf into development 2020-06-15 20:15:52 +00:00
Adrian-George Bostan
99ef1b861d
Combo field appearance (#370)
* Fix combo field appearances not being shown

* Fix V object type for choice and button fields

* Refactor form fill for combo and checkbox fields

* Add fill test case for text, combo and checkbox fields

* Prevent panic when flattening forms using a nil appearance generator
2020-06-10 16:58:00 +00:00
Adrian-George Bostan
6cb58f6327
Add configurable font fallback options for form fields (#368)
* Add configurable fallback font support for form fill/flatten

* Add appearance font to AcroForm DR

* Refactor DA process method

* Remove unnecessary font default size variable

* Minor refactor in the appearance generation functions

* Improve processDA appearance style method

* Use original font container if present in DR

* Maintain original appearance font autosizing behavior
2020-06-09 15:16:54 +00:00
Adrian-George Bostan
6b8d5c42f7
Fix outline null object check (#367) 2020-06-05 11:46:55 +00:00
Peter Williams
5777ee1394
Handle multibyte entries in CMaps. (#353)
* Fixed filename:page in logging

* Got CMap working for multi-rune entries

* Treat CMap entries as strings instead of runes to handle multi-byte encodings.

* Added a test for multibyte encoding.

* Changed rune->CharCode maps to string->CharCode.

* Removed unintentional changes.

* Updated comments to match new function definitions.

* Changed some []rune APIs to string

* Fixes for reviewer comments.
2020-06-03 13:55:15 +00:00
Gunnsteinn Hall
4508e17036
Merge pull request #364 from adrg/flatten-text-field-rotation
Account for rotation when generating flattened text field appearances
2020-05-29 17:35:58 +00:00
Adrian-George Bostan
d6e1cb5761 Account for rotation when generating flattened text field appearances 2020-05-29 17:49:00 +03:00
Gunnsteinn Hall
f99c0cd58f
Merge pull request #363 from gunnsth/release/v3.7.1
Prepare unipdf release v3.7.1
v3.7.1
2020-05-26 08:32:22 +00:00
Gunnsteinn Hall
4b80c3bff1 Update version.go 2020-05-25 23:35:47 +00:00
Gunnsteinn Hall
81588f196e Merge remote-tracking branch 'upstream/development' into release/v3.7.1 2020-05-25 23:35:14 +00:00
Adrian-George Bostan
d078608da4
Account for parent CTM when calculating positions of extracted forms (#349)
* Take parent CTM into account for form field text

* Pass a modified  graphics state instance to new text objects
2020-05-25 23:34:44 +00:00
Gunnsteinn Hall
e8d29245a2 Prepare release v3.7.1 2020-05-25 23:07:17 +00:00
Gunnsteinn Hall
f7215be3eb Merge remote-tracking branch 'upstream/master' into release/v3.7.1 2020-05-25 23:04:37 +00:00
Gunnsteinn Hall
ef7c2e6b5b Merge branch 'development' of https://github.com/unidoc/unipdf into development 2020-05-25 22:54:19 +00:00
Adrian-George Bostan
5efaa02e23
Use page indirect object for internal outline destinations (#359)
* Use page indirect object for internal outlines

* Use page indirect object in creator outline destinations

* Adapt creator test case to test outline creation and retrieval
2020-05-22 16:19:43 +00:00
Adrian-George Bostan
033f410eac
Account for inverted annotation rects when calculation appearance bounds (#357) 2020-05-20 17:58:54 +00:00
Adrian-George Bostan
d2941b5477
Add reader method for checking if the AcroForm needs repair (#356)
* Add AcroFormNeeds repair method

* Add AcroForm repair check test case
2020-05-20 16:04:02 +00:00
Adrian-George Bostan
80d51c5532
Add reader AcroForm repair functionality (#351)
* Add method for retrieving widget parent form field

* Add reader method for repairing AcroForm

* Add AcroForm repair test case

* Add AcroForm repair options

* RepairAcroForm documentation improvements
2020-05-19 12:42:07 +00:00
Adrian-George Bostan
6246921ab3
Fix table right-aligned content (#348)
* Fix cell content width in right-aligned table cells

* Add table horizontal alignment test case

* Fix import style
2020-05-12 15:47:52 +00:00
Gunnsteinn Hall
ad2a1e9c9d
Subsetting fixes (#346)
* Update unitype lib which improves subsetting

* Add text extraction check to creator font subsetting example

Helps ensure ToUnicode map is set correctly.

* Clean up import

* Fix spelling
2020-05-12 07:15:09 +00:00
Gunnsteinn Hall
ca1bba918f Merge branch 'development' of https://github.com/unidoc/unipdf into development 2020-05-11 00:07:37 +00:00
Adrian-George Bostan
aef6e5e976
Fix CMap generation and serialization for composite fonts (#344)
* Fix CMap charcode mapping serialization

* Improve CMap generation in the NewCompositePdfFontFromTTF function
2020-05-08 00:15:09 +00:00
Gunnsteinn Hall
6af0bb8250 Merge branch 'development' of https://github.com/unidoc/unipdf into development 2020-05-06 21:13:47 +00:00
Adrian-George Bostan
f60e313cdb
Fix incorrect render of invoice totals (#342)
* Fix rendering invoice totals area on page breaks

* Improve invoice simple test case
2020-05-06 20:12:44 +00:00
Gunnsteinn Hall
22e282c106
Merge pull request #338 from gunnsth/release/v3.7.0
Prepare unipdf release v3.7.0
v3.7.0
2020-05-05 19:58:15 +00:00
Gunnsteinn Hall
690d12fcac Prepare release v3.7.0 2020-05-05 00:20:29 +00:00
Gunnsteinn Hall
c07f160296 Merge branch 'development' of ssh://github.com/unidoc/unipdf into development 2020-05-05 00:17:59 +00:00
Gunnsteinn Hall
9ef2f27694
Support for subsetting fonts (#335)
* Subsetting of TrueType CID fonts using unitype

* Simplify call to SubsetRegistered so can be done right after loading font via creator finalizer

* Add an EnableFontSubsetting function on the creator to simplify font subsetting for creator users
2020-05-05 00:17:27 +00:00
Gunnsteinn Hall
f445a10391
Merge pull request #336 from unidoc/master
Master into development
2020-05-02 14:23:01 +00:00
Gunnsteinn Hall
1a6fda031b Merge branch 'development' of https://github.com/unidoc/unipdf into development 2020-05-02 14:15:48 +00:00
Adrian-George Bostan
c17719d232
Invoice component improvements (#334)
* Add invoice address heading field

* Update invoice test cases

* Add default value to buyer address heading

* Add Street2 and State address fields

* Add configurable address separator field

* Improve invoice test cases
2020-05-01 12:56:43 +00:00
Adrian-George Bostan
30db3448f7
Add support for multi-block styled paragraphs (#331)
* Add support for multi-block styled paragraphs

* Fix context space when drawing division inside tables

* Update context height when drawing tables

* Update advanced invoice test case

* Add basic multi-block styled paragraph test case
2020-04-29 19:22:00 +00:00
Gunnsteinn Hall
edd8684dcb Merge remote-tracking branch 'upstream/master' into development 2020-04-25 23:29:09 +00:00
Adrian-George Bostan
d84d0c4375
Form fill fixes (#328)
* Parse form fields with embedded widget annotations

* Try matching fields both by partial and full names on form fill

* Use default font if widget font is not found when generating appearance

* Add JSON extract and fill test case
2020-04-24 16:48:06 +00:00
Gunnsteinn Hall
0a9a9582e0
Merge pull request #327 from gunnsth/release/v3.6.2
Prepare unipdf release v3.6.2
v3.6.2
2020-04-23 11:24:54 +00:00
Gunnsteinn Hall
db242dbcff Update version.go for 3.6.2 2020-04-23 01:36:32 +00:00
Adrian-George Bostan
cb0166e96b
Add low level PageLabels support (#325)
* Add reader method for retriving the PageLabels entry from the catalog
* Add writer method for setting the PageLabels entry in the catalog.
* Add creator method for adding page labels for the output file
* Add creator page labels test case
* Minor page labels test case correction
2020-04-22 21:17:33 +00:00
Alexey Pavlyukov
a69d788171
Add timestamp signature handler (#301)
* Add timestamp signature handler

* Add timestamp signature handler test

* fix PR issues

* fix PR issues

* fix PR issues

* Fix

Co-authored-by: Gunnsteinn Hall <gunnsteinn.hall@gmail.com>
2020-04-22 20:21:53 +00:00
Adrian-George Bostan
6678fc040a
Cache raw CMap data (#324) 2020-04-21 21:53:36 +00:00
Alfred Hall
bc5c0d95d3
Merge pull request #320 from gunnsth/dev-writer-error-handling
Fix error handling in Writer
2020-04-18 17:13:40 +00:00
Alfred Hall
8a6826a043
Merge pull request #319 from gunnsth/dev-compositefont-memory-loading
Add NewCompositePdfFontFromTTF to load composite TTF from memory
2020-04-18 13:56:19 +00:00
Gunnsteinn Hall
6308fc8014 Fix error handling in write, with a testcase. 2020-04-18 13:48:44 +00:00
Gunnsteinn Hall
fa5f13501b Fixes 2020-04-18 11:12:26 +00:00
Gunnsteinn Hall
d23d4b8c79 Add NewCompositePdfFontFromTTF to load composite TTF from memory 2020-04-18 10:37:10 +00:00