1725 Commits

Author SHA1 Message Date
UniDoc Build
87cbc66cbd prepare release 2020-10-05 19:28:24 +00:00
Gunnsteinn Hall
6ea4d7271f
Merge pull request #414 from unidoc-build/prep-rc-v3.12.1
Prepare release of UniPDF v3.12.1
v3.12.1
2020-09-29 14:06:58 +00:00
UniDoc Build
22ca2c0eed prepare release 2020-09-28 23:18:17 +00:00
Gunnsteinn Hall
9cbf29cfdb
Merge pull request #413 from unidoc-build/prep-rc-v3.12.0
Prepare release of UniPDF v3.12.0
v3.12.0
2020-09-22 00:43:19 +00:00
UniDoc Build
9107a86674 prepare release 2020-09-21 01:20:10 +00:00
Gunnsteinn Hall
13c908a7c9
Merge pull request #410 from unidoc-build/prep-rc-v3.11.1
Prepare release of UniPDF v3.11.1
v3.11.1
2020-09-14 14:46:37 +00:00
UniDoc Build
b991a36456 prepare release 2020-09-14 09:32:45 +00:00
Gunnsteinn Hall
16b59e59af
Merge pull request #408 from unidoc-build/prep-rc-v3.11.0
Prepare release UniPDF v3.11.0
v3.11.0
2020-09-07 12:04:04 +00:00
UniDoc Build
fd3b669a36 prepare release 2020-09-07 00:23:12 +00:00
Gunnsteinn Hall
e181b14be6
Merge pull request #407 from unidoc-build/prep-rc-v3.10.1
Prepare release v3.10.1
v3.10.1
2020-08-31 22:41:24 +00:00
UniDoc Build
61b6580cb9 prepare release 2020-08-31 21:12:07 +00:00
Gunnsteinn Hall
3e38be1237
Merge pull request #402 from unidoc-build/prep-rc-v3.10.0
Release v3.10.0
v3.10.0
2020-08-28 07:31:01 +00:00
UniDoc Build
1501d07a74 prepare release 2020-08-27 21:45:09 +00:00
Alfred Hall
dcb84ad71a
Merge pull request #397 from unidoc/license-update
Update license
2020-08-08 00:17:13 +00:00
Gunnsteinn Hall
acc579f9c3 Update license 2020-08-07 23:35:05 +00:00
Gunnsteinn Hall
60bb6967ad
Merge pull request #393 from gunnsth/release/v3.9.0
Prepare unipdf release v3.9.0
v3.9.0
2020-07-15 07:57:44 +00:00
Gunnsteinn Hall
c7febe5a81 Prepare unipdf v3.9.0 release 2020-07-14 22:06:01 +00:00
Adrian-George Bostan
42a3cfb67d
Add FDF support for form fill rendering test (#389) 2020-07-03 20:33:40 +00:00
Adrian-George Bostan
8ca13a3ab5
Add form fill render tests (#387)
* Add form fill render tests

* Update Jenkins file
2020-07-02 23:31:35 +00:00
Adrian-George Bostan
564133c5b3
Refactor creator render test functionality (#386) 2020-07-01 19:51:28 +00:00
Peter Williams
88fda44e0a
Text extraction code for columns. (#366)
* 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.

* First version of text extraction that recognizes columns

* Added an expanation of the text columns code to README.md.

* fixed typos

* Abstracted textWord depth calculation. This required change textMark to *textMark in a lot of code.

* Added function comments.

* Fixed text state save/restore.

* Adjusted inter-word search distance to make paragrah division work for thanh.pdf

* Got text_test.go passing.

* Reinstated hyphen suppression

* Handle more cases of fonts not being set in text extraction code.

* Fixed typo

* More verbose logging

* Adding tables to text extractor.

* Added tests for columns extraction.

* Removed commented code

* Check for textParas that are on the same line when writing out extracted text.

* Absorb text to the left of paras into paras e.g. Footnote numbers

* Removed funny character from text_test.go

* Commented out a creator_test.go test that was broken by my text extraction changes.

* Big changes to columns text extraction code for PR.

Performance improvements in several places.
Commented code.

* Updated extractor/README

* Cleaned up some comments and removed a panic

* Increased threshold for truncating extracted text when there is no license 100 -> 102.

This is a workaround to let a test in creator_test.go pass.

With the old text extraction code the following extracted text was 100 chars. With the new code it
is 102 chars which looks correct.

"你好\n你好你好你好你好\n河上白云\n\nUnlicensed UniDoc - Get a license on https://unidoc.io\n\n"

* Improved an error message.

* Removed irrelevant spaces

* Commented code and removed unused functions.

* Reverted PdfRectangle changes

* Added duplicate text detection.

* Combine diacritic textMarks in text extraction

* Reinstated a diacritic recombination test.

* Small code reorganisation

* Reinstated handling of rotated text

* Addressed issues in PR review

* Added color fields to TextMark

* Updated README

* Reinstated the disabled tests I missed before.

* Tightened definition for tables to prevent detection of tables where there weren't any.

* Compute line splitting search range based on fontsize of first word in word bag.

* Use errors.Is(err, core.ErrNotSupported) to distinguish unsupported font errorrs.

See https://blog.golang.org/go1.13-errors

* Fixed some naming and added some comments.

* errors.Is -> xerrors.Is and %w -> %v for go 1.12 compatibility

* Removed code that doesn't ever get called.

* Removed unused test
2020-06-30 19:33:10 +00:00
Adrian-George Bostan
ca7f479b7c
Form fill field rotation (#385)
* Refactor text field rotation

* Add rotation support for checkbox fields

* Add rotation support for combobox fields

* Add rotation support for text combobox fields

* Add documentation for the applyRotation of the AppearanceStyle
2020-06-30 18:34:03 +00:00
Adrian-George Bostan
54e965785b
Add cached Stream method for CMap objects (#382)
* Add cached Stream method for CMaps

* Use CMap Stream method when creating font PDF dictionary objects
2020-06-27 00:30:18 +00:00
Adrian-George Bostan
4f96762674
Add fill and stroke colors for extracted text marks (#381)
* Add fill and stroke colors for text marks

* Add extractor text color test case

* Fix fillColor field comment typo
2020-06-24 09:55:58 +00:00
Adrian-George Bostan
7bf2f62c3b
Skip referenced pages which are not present in the catalog (#377)
* Skip referenced pages which are not present in the catalog

* Improve documentation for the copyObject method of the writer

* Add creator test case for checking referenced page destinations
2020-06-18 15:06:06 +00:00
Gunnsteinn Hall
ae20c30ae4
Merge pull request #376 from gunnsth/dev-merge-master
Merge master into development
2020-06-16 22:08:23 +00:00
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