Unipdf Versions Save

Golang PDF library for creating and processing PDF files (pure go)

v3.38.0

1 year ago

This version contains new features, improvements and fixes.

New Features:

  • UP-347 Extractor options for applying the CropBox.
  • UP-344 Metered License API Key adds non persistent cache support.

Improvements:

  • UP-346 Improve error message handling on API Key license response.
  • UP-343 Github Actions Workflow add go version v1.18.

Bug Fixes:

  • UP-345 Word wrap with newline causing next words having line break fix.
  • UP-342 RTL Hebrew punctuation issue fix.
  • UP-339 First word of a wrapped line using the previous line's font when the text is in a table cell that wraps across the page fix.
  • UP-338 Issue adding subtable to a table with row wrapping enabled and multi-row cell fix.

v3.37.0

1 year ago

This version contains major new features and improvements.

New features and improvements

Redaction support for redacting sensitive information

  • As a user I want to redact text matching a regexp pattern such as personal id etc. [UP-252]
  • Create a redactor package for redacting information in PDF [UP-253]

Examples for this new feature can be found at: https://github.com/unidoc/unipdf-examples/tree/master/redact

RTL Language support for RTL languages such as Arabic

  • Support creating PDFs with right to left such as arabian text [UP-276]

We have been working on this feature for a while and implemented without without making big changes to our existing document creation engine. We are very happy with the result. Check out examples for this for RTL in Arabic text: https://github.com/unidoc/unipdf-examples/tree/master/arabic-text

Other

  • Improve Line component capabilities. [UP-336]

As a part of our efforts to improve reporting cababilities in the creator package, we have now revamped our Line component. The improvements include

  • Added relative positioning mode.
  • Added fit mode support (for adding full context width lines).
  • Added style support (solid, dashed).
  • Added opacity support.
  • Added margin support.
  • Added support for lines inside divisions.
  • Added support for lines inside tables.
  • Fixed some minor rendering inconsistencies.

Examples for the line component have been added here: https://github.com/unidoc/unipdf-examples/blob/master/drawing/pdf_draw_lines.go and can generate output such as: https://github.com/unidoc/unipdf-examples/blob/master/drawing/unipdf-draw-lines.pdf

v3.36.0

1 year ago

This version contains fixes and improvements.

Improvements and fixes:

  • LTV signatures. Add option to ignore CRL and OCSP in DSS when client is nil. Example: https://github.com/unidoc/unipdf-examples/pull/188

  • Add support for full context width creator images. Added img.SetFitMode(creator.FitModeFillWidth) to expand to available width.

  • Fix nil copy object handling [UP-335].

  • Support for word wrapping in styled paragraphs [USD-191]. Avoids issues where latin text is wrapped anywhere.

v3.35.0

1 year ago

This version is focused on improvements on the creator reporting capabilities, especially improvements for the division component and rounded corners support that facilitate creation of reports.

New features and improvements:

  • Add support for rectangle rounded corners (creator).
  • Implement option to set the background properties of division components (creator).
  • Table cell content shape. Add division and table to accept rectangle and ellipse (creator).

Bug fixes:

v3.34.0

2 years ago

Release notes - UniPDF - Version v3.34.0

UniPDF version 3.34.0 contains new features and multiple bug fixes. Notably, we have added a support for native PDF charts via our newly released UniChart library that is based on the powerful https://github.com/wcharczuk/go-chart library. In addition, PDF/A-2 validation and optimization has been completed.

NOTE: Ticket numbers are included for reference.

New features

Improvements and fixes

  • Invalid rotate page object [USD-188]
  • PDF/A-1 and PDF/A-2 optimization fixes [UP-316]
  • Fix problem with table cells not fitting paragraph size [USD-186]
  • Metered key improvements bug fix related to permissions [UP-334]

v3.33.0

2 years ago

Release notes - UniPDF - Version v3.33.0

UniPDF version 3.33.0 contains new features and multiple bug fixes. Notably, PDF/A-1A validation and generation has been completed and font extraction has been added.

NOTE: Ticket numbers are included for reference.

New features

  • Implement PDF/A-1A validation functions, A/B optimizer functions [UP-310, UP-309]

To try this out can use our examples for standard conversion and generation in https://github.com/unidoc/unipdf-examples/tree/master/pdfa and using the pdfa.NewProfile1A(nil) profile.

  • Add font extraction capability in extractor package [UP-73] Makes it easy to extract font and font data for a given range of pages or entire document.

The extractor has a new function

// ExtractFonts returns all font information from the page extractor, including// font name, font type, the raw data of the embedded font file (if embedded), font descriptor and more.  
//  
// The argument `previousPageFonts` is used when trying to build a complete font catalog for multiple pages or the entire document.  
// The entries from `previousPageFonts` are added to the returned result unless already included in the page, i.e. no duplicate entries.  
//  
// NOTE: If previousPageFonts is nil, all fonts from the page will be returned. Use it when building up a full list of fonts for a document or page range.  
func (e *Extractor) ExtractFonts(previousPageFonts *PageFonts) (*PageFonts, error) {

New Example: https://github.com/unidoc/unipdf-examples/blob/master/extract/pdf_extract_fonts.go

  • Add a flag to prevent a table from being split on a page break [UP-306 ]

Adds to creator's Table type:

// EnablePageWrap controls whether the table is wrapped across pages.
// If disabled, the table is moved in its entirety on a new page, if it
// does not fit in the available height. By default, page wrapping is enabled.
// If the height of the table is larger than an entire page, wrapping is
// enabled automatically in order to avoid unwanted behavior.
func (table *Table) EnablePageWrap(enable bool) {

Improvements and fixes

  • Outline destinations appear to be null for some types of PDFs [UP-323 ] Fixes problem reported in https://github.com/unidoc/unipdf/issues/482

  • Text extraction disorder occurs on this type of pdf [UP-322] Bug fix for certain case with particular CMap bfrange values.

  • Text extraction problem with mixed garbles/non-garbled text [UP-308 ] Bug fix for font cache name where multiple fonts could have same key, causing incorrect text mappings.

  • Problem with extracting images from CCITTDecode filter for a user provided file Bug fix for particular issue in CCITT encoding related to EOL handling. [UP-268]

v3.32.0

2 years ago

Release Notes - UniPDF - Version v3.32.0

UniPDF version 3.32.0 contains new features and multiple bug fixes. Notably new powerful support for DocMDP restrictions and validation has been added that allows controlled document permissions for digital signatures. In addition, we optimized our CCITTFaxdecode filter for better performance and made multiple other improvements. See more below.

NOTE: Ticket numbers are included for reference.

New features

Improved support for digital signatures and setting and validating DocMDP permissions has been implemented. As part of this we added flexible support for accessing older revisions of documents. The following functions are now available (in core package).

// GetRevisionNumber returns the current version of the Pdf document.
func (parser *PdfParser) GetRevisionNumber() int

// GetRevision returns PdfParser for the specific version of the Pdf document.
func (parser *PdfParser) GetRevision(revisionNumber int) (*PdfParser, error)

// GetUpdatedObjects returns pdf objects which were updated from the specific version (from prevParser).
func (parser *PdfParser) GetUpdatedObjects(prevParser *PdfParser) (map[int64]PdfObject, error)
  • New package model/mdp is used for Modify Detection Prevention (MDP) such as controlling what changes are allowed in document revisions of a PDF document.

  • Ability to set and control DocMDP permissions on digital signatures [UP-14]

New examples added for this can be found in: https://github.com/unidoc/unipdf-examples/pull/168/files which includes:

  • Example signatures/pdf_sign_docmdp.go shows how to sign a PDF document with defined DocMDP restrictions.

  • Example signatures/pdf_sign_docmdp_valid_changes.go shows how to sign a PDF document with specified DocMDP restrictions and add some valid changes that pass validation.

  • Example signatures/pdf_sign_docmdp_invalid_changes.go shows how to sign a PDF document with the DocMDP restriction and add some invalid changes that fail validation.

  • Example signatures/pdf_sign_get_revision.go shows how to retrieve the specific or previous revision of a PDF document

Improvements have also been made in the creator package for creating PDF documents.

  • creator: Add ability to flip pages [UP-288]

New function in the creator package:

// Flip flips the active page on the specified axes.
// If `flipH` is true, the page is flipped horizontally. Similarly, if `flipV`
// is true, the page is flipped vertically. If both are true, the page is
// flipped both horizontally and vertically.
// NOTE: the flip transformations are applied when the creator is finalized,
// which is at write time in most cases.
func (c *Creator) Flip(flipH, flipV bool) error {

Improvements and fixes

  • creator: Improve border component [UP-301] Fixed a bug with border calculations and added more testcases to ensure correct behavior.

Following user feedback we reviewed margin handling in a few components and addressed a few problems.

  • creator: Fix table margins inconsistencies [UP-293]
  • creator: Improve margin handling of Paragraph and StyledParagraph components [UP-294]

Bassed on user documents we investigated some problems related to font encodings and cmaps affecting both text extraction and text rendering. The following improvements were made based on this:

  • Text extraction CID Font single-byte mapping. Fixes text decoding bug. [UP-287]

  • Text extraction problem addressed: ExtractText() returning garbled text [UP-303]. Added special cases for prioritization of text encoders to get better outputs for simple fonts.

  • Rendering problem: Output characters showing missing glyph instead of characters [UP-302]. Improved cmap handling in font glyph rendering package in github.com/unidoc/freetype which was forked from github.com/golang/freetype and improved for PDF rendering needs (mainly cmaps).

Additional fixes were made:

  • CCITT decoding support has been improved and optimized fixing [UP-131] Performance improvement - CCITTFax Decoder input and output should use bitwise.Reader and bitwise.Writer

  • model/pdfa: content stream optimizer fix. [UP-304]. Fixed a problem causing PDF/A optimization to miss colorspace optimization when no images were in the file.

v3.31.0

2 years ago

Release notes - UniPDF - Version v3.31.0

UniPDF version 3.31.0 contains new features and multiple bug fixes. Major changes have been done related to experimental PDF/A support (which is still in beta) and the quality of verifiers and standardizers improved significantly. The list of changes is as follows.

New features

Support for advanced XMP Metadata has been added. (examples to be added soon).

Improvements

[UP-281] Improvements in PDF/A implementation prototype.

  • Implemented PDF/A verification rules 6.7.9-2, 6.8.2-1, 6.8.3-1
  • Implemented advanced XMP Metadata API
  • Implemented advanced XMP Metadata optimizers that persist previous data
  • Fixed issue with the blank page output size (0x0)
  • Fixes issue with PDF/A optimization of Annotations
  • Fixes issue with PDF/A optimization of Content streams, inline images and XObject Forms with internal content streams.

NOTE: Experimental PDF/A Profile1Options no longer contains UUIDGenerator field.

Bug fixes

[UP-284] PdfAppender.Write() overrides PdfInfo

[UP-283] Margins aren't accounted for when drawing (creator)

[UP-280] Unable to extract specific text - missing text (extractor package)

[UP-272] "Invalid operand" being thrown when flattening fields with pdfreader

[UP-214] Render Bug: Text jumbled on page

[UP-202] USD-81 UniPDF render bug: poorly rendered text

v3.30.0

2 years ago

UniPDF version 3.30.0 contains new features and multiple bug fixes. The list of changes is as follows.

Bug

UP-266 ExtractPageText is throwing an error: range check

UP-260 Image extraction hangs and memory keeps increasing

UP-264 Loaded fonts cause panics for concurrent map read and writes

Task

UP-271 Update pkcs7 package to 0.1.0 (contains multiple fixes for digital signatures)

UP-270 Implement QA and testing process for PDF/A validation

UP-262 PDF Page Rotation hierarchy handling (fixes bugs when Rotate is specified on parent Pages element)

v3.29.0

2 years ago

UniPDF version 3.29.0 contains new features and multiple bug fixes. Notably, PDF/A verification for fonts has been implemented. In addition, digital signing of encrypted PDF files is now supported.

The list of changes is as follows.

Bug

UP-259 ERROR: UniDoc pdfReader failed to ExtractPageText: pageNum=1 err=range check error

UP-256 invalid Page Rotate object

UP-255 Another instance of Split operation failed on v3.28.0

UP-254 Unexpected behaviour when the contents of the a cell that has a rowspan > 1 exceeds the height of the rest of the table.

UP-242 Signing invalidates document

UP-240 Optimizer issue: Failed creating multi encoder: invalid filter in multi filter array

UP-142 Rendering issue where image content is blacked out

UP-141 Path drawing looks different than in Adobe

Enhancements

UP-239 As a user I want to encrypt pdfs and allow signing encrypted pdfs so only intended users can view and sign them

UP-263 Implement PDF/A font verifiers

UP-241 creator - Add example for table rowspan

New examples