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

Overview

UniPDF - PDF for Go

UniDoc UniPDF is a PDF library for Go (golang) with capabilities for creating and reading, processing PDF files. The library is written and supported by FoxyUtils.com, where the library is used to power many of its services.

GitHub (pre-)release License: UniDoc EULA GoDoc

Features

Multiple examples are provided in our example repository https://github.com/unidoc/unipdf-examples.

Contact us if you need any specific examples.

Installation

With modules:

go get github.com/unidoc/unipdf/v3

How can I convince myself and my boss to buy unipdf rather using a free alternative?

The choice is yours. There are multiple respectable efforts out there that can do many good things.

In UniDoc, we work hard to provide production quality builds taking every detail into consideration and providing excellent support to our customers. See our testimonials for example.

Security. We take security very seriously and we restrict access to github.com/unidoc/unipdf repository with protected branches and only the founders have access and every commit is reviewed prior to being accepted.

The profits are invested back into making unipdf better. We want to make the best possible product and in order to do that we need the best people to contribute. A large fraction of the profits made goes back into developing unipdf. That way we have been able to get many excellent people to work and contribute to unipdf that would not be able to contribute their work for free.

Contributing

CLA assistant

All contributors must sign a contributor license agreement before their code will be reviewed and merged.

Support and consulting

Please email us at [email protected] for any queries.

If you have any specific tasks that need to be done, we offer consulting in certain cases. Please contact us with a brief summary of what you need and we will get back to you with a quote, if appropriate.

Licensing Information

This software package (unipdf) is a commercial product and requires a license code to operate.

The use of this software package is governed by the end-user license agreement (EULA) available at: https://unidoc.io/eula/

To obtain a Trial license code to evaluate the software, please visit https://unidoc.io/

Comments
  • Finding bounding boxes of substrings of extracted text.

    Finding bounding boxes of substrings of extracted text.

    This PR combines the TextComponent idea from https://github.com/unidoc/unidoc/compare/v3...gunnsth:giggiu16-text-extraction-origtext with a mechanism for mapping substrings in extracted text positions described in the comments below.

    Addresses parts of #35.

    // TextMark maps extracted text to the location of the text on the PDF page and other // properties of the rendered text such the font. // Offset is the offset of the start of the textMark.text in extracted text. // BBox is the bounding box of the textMark. // Text is the extracted text // Meta is set true for characters that don't appear in the input PDF. // You can find the location of substrings in the extracted text as follows: // Use ToTextLocation() to return the extracted text as a []TextMark sorted by Offset. // substring := extracted[start:end+1] // binary search the []TextMark for start and end. // The bounding box of substring on the PDF page is the union of the TextMark.BBox's with // start <= TextMark.Offset < end // // getBBox() in test_text.go shows how to compute bounding boxes of substrings of extracted text. // The following code extracts the text on PDF page page into text then finds the bounding box // bbox of substring term in text. (indexRunes() works like strings.Index except that it // returns number of runes rather than numberof bytes) // // ex, _ := New(page) // // handle errors // pageText, _, _, err := ex.ExtractPageText() // // handle errors // text := pageText.Text() // textMarks := pageText.Marks() // // start := indexRunes(text, term) // end := start + len([]rune(term)) // spanMarks, err := textMarks.RangeOffset(start, end) // // handle errors // bbox, ok := spanMarks.BBox() // // handle errror


    This change is Reviewable

    opened by peterwilliams97 25
  • [BUG] Issue with Go 1.16

    [BUG] Issue with Go 1.16

    Description

    As I am on a Macbook M1, I have the Go version 1.16 installed and I can't get unipdf compiles with Go 1.16 (works with 1.15 on another Mac)

    Actual Behavior

    Steps to reproduce the behavior:

    1. Install Go 1.16 beta
    2. Copy one of unipdf examples
    3. go run main.go
    4. See error:
    github.com/unidoc/unipdf/v3/model
    <autogenerated>:1: internal compiler error: child dcl collision on symbol _febf within "".(*PdfAppender).replaceObject"
    
    opened by alexjomin 13
  • Text extraction code for columns.

    Text extraction code for columns.

    This is a major update to the text extraction code that works with text arranged in columns.

    • extractor/text.go is now split across multiple text_*.go files.
    • the new design is summarised in the extractor README.

    Here are new PDFs and text extraction references files for extractor/text_test.go.

    You can also run pdf_extract_text.go to see the extraction. There is an updated version of this test here that makes it easier to test a corpus of PDFs.


    This change is Reviewable

    opened by peterwilliams97 13
  • Improve table rendering speed

    Improve table rendering speed

    I use unipdf to generate a pdf file, the file has 10 columns, 652 lines, Chinese characters, the generated table is 42 pages long, the entire process consumes 33.76 seconds, the font used is microsoft.ttf, how to optimize to provide performance, improve rendering speed?

    bug 
    opened by schooltech 10
  • Action support

    Action support

    Added actions (See Section 12.6 p. 412) Added filespec (See Section 7.11.3 p. 102)

    Return was added in the creator so you can add annotations to a newly created page.


    This change is Reviewable

    opened by becoded 9
  • [BUG] 4002 error in Adobe Appearance Integrity Report for digital signature

    [BUG] 4002 error in Adobe Appearance Integrity Report for digital signature

    Description

    When we create any digital signature on document Adobe Appearance Integrity Report always show 4002 error for digital signature. image

    Expected Behavior

    Add digital signature without any errors from Adobe Appearance Integrity Report

    Actual Behavior

    Steps to reproduce the behavior:

    1. Add any digital signature
    2. Open signature tab and click to "Click to view this version image
    3. Click on view report button image
    4. See error image
    pending 
    opened by falgonua 8
  • Render unicode font characters

    Render unicode font characters

    Description

    I'm trying to render font glyph from the NotoEmoji.ttf font (Freely available from Google). NotoEmoji-Regular.ttf.zip

    If I pass a string with the correct unicode point eg: \u3299 or \U00003299 this successfully renders. However if I use a unicode that needs extra bytes this fails to render. eg \U0001F60E

    Expected Behavior

    All available glyphs in the font to render correctly based on the unicode value.

    Actual Behavior

    No char is rendered

    Attachments

    font, _ = model.NewCompositePdfFontFromTTFFile("./NotoEmoji-Regular.ttf")
    p := c.NewStyledParagraph()
    t := p.Append("\U0001F60E")
    t.Style.Font = font
    c.Draw(p)
    

    Ps. I'm currently evaluating unipdf before buying a license (including unioffice)

    fonts 
    opened by rogchap 7
  • [BUG] UniPdf/invoice Long textblock is cutoff on a page instead of being split across pages

    [BUG] UniPdf/invoice Long textblock is cutoff on a page instead of being split across pages

    Description

    Given a large contiguous text block (no line breaks/carriage returns), sections such as invoice.SetTerms or the base AddSection do not automatically break content across pages.

    Expected Behavior

    It would be awesome if this text content was split to new pages when encountering the end of a page or pages.

    Actual Behavior

    Steps to reproduce the behavior: Using the pdf_invoice_simple.go as a starting point, simply update the content for SetTerms to be a long contiguous block of text.

    Attachments

    Attached is an example pdf and the modified pdf_invoice_simple.go

    pdf_invoice_simple.zip

    opened by venison 7
  • [BUG] Protected files cannot be signed

    [BUG] Protected files cannot be signed

    Description

    A PDF that's already password protected, or one that's created with unipdf's Encrypt() can no longer be digitally signed using the Appender{}. It throws the error page 1 not found.

    Expected Behavior

    It should be possible to open a PDF, decrypt it using Decrypt(), and use an Appender{} to apply a digital signature.

    NewPdfAppender() makes a copy of an incoming reader https://github.com/unidoc/unipdf/blob/47ae7e277ef501ca413572ab9d42fada3f87c19f/model/appender.go#L136. It seems though that at this point, the decryption is lost. I hardcoded a .Decrypt() right after the copy is made and the error vanished, but the output lost all PDF contents and produced a blank page. This could potentially be due to the object comparison that happens in the update methods in the Appender.

    bug signatures 
    opened by knadh 7
  • Unable to extract and add again a font to a new pdf document

    Unable to extract and add again a font to a new pdf document

    Hello to all, I am trying to extract certain text from a PDF page, and writing it back on a new PDF document. I am experimenting with v3 branch, that have new api tro extract vectorized text from the page. In order to return all the text marks -that are private in the current version of the api- I created a new convencience struct returning from a new getter in PageText struct.

    The text extraction works well, the problem is that I am unable to set the font for a new paragraph element, created iterating returning marks, the same as the original one.

    I also tried to add the font before in the page and then to the paragraph, but I have only errors, such as:

    [DEBUG] simple.go:56 ERROR: NewSimpleTextEncoder. Unknown encoding "default" [DEBUG] simple.go:56 ERROR: NewSimpleTextEncoder. Unknown encoding "custom" error is: unsupported font encoding

    or, with another PDF files:

    [DEBUG] ttfparser.go:527 parseCmapVersion: format=0 length=262 language=0 [DEBUG] ttfparser.go:732 No PostScript name information is provided for the font.

    This is the test code I am using: Gist You can pull the library with changes here: Repo Link

    I attach the PDF files I'm testing on.

    Thank you in advance! newspaper.pdf

    opened by giggiu16 7
  • [BUG] image to pdf, size increase too much

    [BUG] image to pdf, size increase too much

    Description

    when converting image to pdf, the size increase too much

    Expected Behavior

    when converting image to pdf, the size is almost the same

    Actual Behavior

    when converting image in size 3m, the size of the pdf is almost 25m

    pending encoding/image 
    opened by tangximing 6
Releases(v3.40.0)
  • v3.40.0(Oct 28, 2022)

    This version contains new features and bug fixes.

    New Features:

    • UP-374 Custom handler for TOC customization
    • UP-373 sigutil.TimestampClient add support BeforeHTTPRequest callback for customization

    Bug Fixes:

    • UP-376 Incorrect text mark position of form XObject
    • UP-375 Incorrect X and Y starting point when page having cropbox
    • UP-372 Flattening annotations issue
    • UP-371 Form fields autosize issue when unable to get fields parent DA Object
    • UP-370 Panic when appending single punctuation chunk to StyledParagraph
    Source code(tar.gz)
    Source code(zip)
  • v3.39.0(Sep 24, 2022)

    This version contains new features and bug fixes.

    New Features:

    • UP-196 Report markup language support. Added support for XML like style markup for more flexibility and easier report creation. Currently supported components:
      • Styled paragraph (and text chunk)
      • Division
      • Table (and table cell)
      • Chart
      • Line
      • Image
      • Chapter (with subchapter and chapter heading customization support)

    Bug Fixes:

    • UP-366 JBIG2 encoder excessive (many gigabytes) memory usages when extracting PDF images
    • UP-365 Text word wrap on decimal number being split fix
    • UP-364 Flattened form fields text exceeds fields length fix
    Source code(tar.gz)
    Source code(zip)
  • v3.38.0(Sep 11, 2022)

    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.
    Source code(tar.gz)
    Source code(zip)
  • v3.37.0(Jul 14, 2022)

    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

    Source code(tar.gz)
    Source code(zip)
  • v3.36.0(Jun 27, 2022)

    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.

    Source code(tar.gz)
    Source code(zip)
  • v3.35.0(Jun 7, 2022)

    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:

    • Fix model flags required (form fields). Fixes unidoc/unipdf#494
    • Fix table spacing issue [USD-200]
    • Fix bug charcode to rune. Fixes https://github.com/unidoc/unipdf/issues/491
    Source code(tar.gz)
    Source code(zip)
  • v3.34.0(Apr 27, 2022)

    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

    • Initial support for UniChart renderer and creator chart component. This is a new feature intended to facilitate professional reporting with native PDF charts. [UP-333] Examples available in https://github.com/unidoc/unichart/tree/master/examples
    • PDF/A-2 profiles added with validation and optimization. [UP-311] [UP-312] [UP-313] [UP-315] [UP-316] Examples created in: https://github.com/unidoc/unipdf-examples/pull/184
    • GlobalSign support and examples. Relies on a new repository https://github.com/unidoc/globalsign-dss which is a client for GlobalSign signature services. [UP-247] This enables creating LTV signatures through the GlobalSign Atlas platform. Full example available at: https://github.com/unidoc/unipdf-examples/blob/master/signatures/pdf_sign_external_globalsign.go

    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]
    Source code(tar.gz)
    Source code(zip)
  • v3.33.0(Mar 13, 2022)

    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]

    Source code(tar.gz)
    Source code(zip)
  • v3.32.0(Feb 6, 2022)

    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.

    Source code(tar.gz)
    Source code(zip)
  • v3.31.0(Dec 14, 2021)

    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

    Source code(tar.gz)
    Source code(zip)
  • v3.30.0(Oct 23, 2021)

    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)

    Source code(tar.gz)
    Source code(zip)
  • v3.29.0(Sep 24, 2021)

    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

    Source code(tar.gz)
    Source code(zip)
  • v3.28.0(Aug 14, 2021)

    This minor release of UniPDF contains the following changes:

    New Features:

    Enhancements and fixes

    • More resilient error handling in PDF optimizers [UP-244]
    • Creator: Allow frontpage to contain multiple pages [UP-235]
    • Creator: Fix page-wrapping for images in table [UP-237]
    • Digital signing: adbe.x509.rsa_sha1 handler - Detect algorithm from pkcs#1 package [UP-238]
    • Form fields: Fix text alignment for appearance generation due to encoding issue [UP-246]
    Source code(tar.gz)
    Source code(zip)
  • v3.27.0(Jul 30, 2021)

    This minor release of UniPDF contains the following changes:

    New features:

    • Support for filling image form fields. [UP-228]
    • Row span support for tables in the creator [UP-236]

    Enhancements and fixes:

    • Fixes in form fill appearance with several bugs in text field appearance generation fixed. More detail to follow. [UP-219]
    • Fix problem in image optimizer with "unsupported encoding parameter" issue [UP-190]
    • Fix issue with image optimizer with "invalid operand" error [UP-190]
    • Fix image optimizer PPI calculation with more advanced content stream processor [UP-160]
    • Fix error when Rotate page object was float [UP-229]
    • Fix error when AES buf length was < 16 [UP-229]
    Source code(tar.gz)
    Source code(zip)
  • v3.26.1(Jun 22, 2021)

  • v3.26.0(May 31, 2021)

    This minor release of UniPDF contains the following changes:

    • [UP-206] Add styled paragraph text vertical align options
    • [UP-215] Resume decoding CCITTFax image upon failure
    Source code(tar.gz)
    Source code(zip)
  • v3.25.0(May 11, 2021)

    This minor release of UniPDF contains the following changes:

    • [UP-207] Composite font widths fix
    • [UP-210] Fix graphic state
    • [UP-211] Fix GetNamedDestinations and add GetNameDictionary method
    • [UP-208] Add character horizontal scaling support for styled paragraph
    Source code(tar.gz)
    Source code(zip)
  • v3.24.0(Apr 24, 2021)

  • v3.23.0(Apr 17, 2021)

    This minor release includes:

    • Add text overflow constants
    • Integrate text overflow options in the styled paragraph component
    • Add page finalize callback function for creator instances
    • Minor clip path calculation improvement
    Source code(tar.gz)
    Source code(zip)
  • v3.22.0(Apr 7, 2021)

    This minor release of UniPDF has the following updates:

    • Add model.PdfPage.Size method
    • Improve text rendering [UP-188]
    • Fix crash on font subsetting. Fixes https://github.com/unidoc/unipdf/issues/451
    Source code(tar.gz)
    Source code(zip)
  • v3.21.0(Mar 24, 2021)

    This minor release of UniPDF has the following updates:

    • Added outline size and outline color support for creator text chunks (which are the building blocks of styled paragraphs). [UP-194]
    • Added CMYK color support for all components in the creator package. [UP-194]
    • Improved color support for all the geometric shapes defined in the contentstream/draw package. [UP-194]
    • Improved Type 3 font text extraction support [UP-118]
    • PageProcessCallback added with error passback for PdfReader.ToWriter of PageCallback [UP-193]
    • Concurrency map access fixes [USD-60]
    • Fix core.DCTEncoder.EncodeBytes for GrayScale images [UP-192]

    NOTE: all the model.PdfColorDeviceRGB fields have been changed to the model.PdfColor interface in order to support colors defined in different color spaces (e.g. model.PdfColorDeviceRGB, model.PdfColorDeviceGray, PdfColorDeviceCMYK, etc.).

    Most code bases should not be affected and everything should continue to work without any changes. However, due to the use of an interface, there is a low chance of a breaking change in the draw package where the methods of the model.PdfColorDeviceRGB struct are used in the context of the shape color fields (e.g. Rectangle.FillColor.R()) will have to be type asserted (Rectangle.FillColor.(*model.PdfColorDeviceRGB).R()).

    Source code(tar.gz)
    Source code(zip)
  • v3.20.0(Mar 16, 2021)

    This new minor release includes:

    • Fixes for the concurrent read/write on the font maps [UP-173]
    • Add text rise support for styled paragraphs [UP-167]
    • Improve poly-shapes support in creator package
    • Metered license fixes
    • Account for page rotation when rendering PDF files [UP-165]
    • Resolve ColorSpace subtype reference to avoid error [UP-178]
    • Add global PDF rotation [UP-175]
    Source code(tar.gz)
    Source code(zip)
  • v3.19.1(Feb 22, 2021)

    New patch release of UniPDF v3.19.1 includes:

    • Workaround to make newly released Go 1.16 compile
    • Rendering improvements, handling of hard image masks
    • Rendering improvement: handle invisible text in rendering mode
    • Fix styled paragraph splitting on table page wrap
    Source code(tar.gz)
    Source code(zip)
  • v3.19.0(Feb 11, 2021)

    This new minor release includes:

    • Multiple image handling optimization fixes [UP-120]
    • Rendering: add option to control rendered image sizes [UP-159]
    • Rendering performance improvements [UP-144]
    Source code(tar.gz)
    Source code(zip)
  • v3.18.0(Jan 26, 2021)

    UniPDF v3.18.0 contains new features and multiple fixes.

    New features

    • Add underline support for the text chunks of styled paragraph [UP-138] Example: https://github.com/unidoc/unipdf-examples/blob/master/report/pdf_formatted_text.go
    • Simplified use. Init PdfWriter from PdfReader data [UP-49]
    • Support for an image custom encoding handler [UP-156]
    • Support for specific annotation filtering function in flattening process [UP-136]

    Improvements and fixes.

    • Fix duplicate words in text extraction [UP-135]
    • Rendering improvements and test suite revamped
    • Fixes in text decoding (extractor)
    • Update text extraction test [UP-147]
    Source code(tar.gz)
    Source code(zip)
  • v3.17.0(Jan 8, 2021)

    UniPDF v3.17.0

    UniPDF v3.17.0 is a new minor version release with multiple fixes and improvements.

    • Metered license support has been added for users with SaaS metered API key licenses.
    • Fixes in loading certain LZW encoded objects
    • Added a timestamping client and improved reliability of testcases relying on timestamping servers.
    • Text extraction improvements. Fixes a crash and improves extraction quality for certain cases.
    • Fix regression where output images would appear as black boxes in certain cases
    • Minor fix preventing overwriting AcroForm object
    • Fix rendering regressions and add test coverage to avoid happening in the future
    • Fix margins when adding images in series to Creator (creator package)
    Source code(tar.gz)
    Source code(zip)
  • v3.16.0(Dec 7, 2020)

    UniPDF v3.16.0

    New minor release of UniPDF contains new features.

    New features:

    • Improves the creator package, adding enhanced wrapping support for cells with long content so that they can wrap across pages. To enable this support, one calls the function:
    func (table *Table) EnableRowWrap(enable bool) {
    

    The row wrapping feature if off by default for backward compatibility but is enabled by setting the row wrap to true.

    Source code(tar.gz)
    Source code(zip)
  • v3.15.0(Nov 24, 2020)

    UniPDF v3.15.0

    New minor release of UniPDF contains new features.

    New features:

    • Support for custom document properties and metadata [USD-35, UP-111] AddCustomInfo function for PdfInfo to set own custom properties. New example for setting custom metadata: https://github.com/unidoc/unipdf-examples/blob/master/metadata/pdf_metadata_set_docinfo.go Updated and simplified example for getting metadata: https://github.com/unidoc/unipdf-examples/blob/master/metadata/pdf_metadata_get_docinfo.go
    Source code(tar.gz)
    Source code(zip)
  • v3.14.0(Nov 12, 2020)

    UniPDF v3.14.0

    New minor release of UniPDF contains multiple new features, enhancements and bug fixes.

    New features:

    • Long-term validation LTV signature support [UP-13] New examples: https://github.com/unidoc/unipdf-examples/tree/master/signatures/ltv

    Enhancements:

    • Allow customization of invoice address email and phone labels (creator) [UP-113]
    • Export text orientation info in TextMark (extractor) [UP-98, USD-30]
    • Add options for the AdobeX509RSASHA1 signature handler to enable disabling extra sign call [UP-82, USD-21]
    • Improved functionality for getting and setting document information [UP-106, USD-35] Added DocInfo, GetPdfInfo on reader, and SetDocInfo on writer

    Fixes:

    • Address issue where Info fields where not decrypted [UP-105, USD-35]
    • Text encoding fixes in text/table extraction [UP-101, USD-33]
    • Fixed bug in document metadata where setting modified date updated created date [UP-106, USD-34]
    • Fix crashes and recursion loops found by fuzzing and test corpus [UP-83, UP-87, UP-110, UP-112]
    • Various minor fixes found by linters [UP-100]
    Source code(tar.gz)
    Source code(zip)
  • v3.13.0(Oct 19, 2020)

    Minor version v3.13.0 of UniPDF contains the following:

    New features

    • Support for adding digital signature appearance with an image, or a combination of image and text, with a watermark option. [UP-61] Example: pdf_image_sign_appearance.go

    Fixes and enhancements

    • Fixed form field and annotation appearance generation to match handling by Acrobat Reader [USD-27]. NOTE: Output appearance of borders could change for some customers, but should match that of most common viewers. Recommend testing before going in production.

    • Improved support for unicode emojis by supporting the relevant truetype font tables [UP-84]

    • Fix word wrap when filling form fields with multi line text [UP-85 USD-19]

    • Further improvements in table extractions [UP-86] Addresses feedback in: https://github.com/unidoc/unipdf/issues/38#issuecomment-683933145

    • Creator AddPage handling updated to work better when applying creator content on top of rotated pages etc. [USD-20] Makes it much more powerful to use the creator to apply content on top of arbitrary PDF files. The user can rely on the upper left corner always being in upper-left corner and consistent orientation with a PDF viewer. NOTE: Could lead to strange results for users already manually accounting for page rotations with own code. Recommend testing before going into production.

    Source code(tar.gz)
    Source code(zip)
Owner
UniDoc
PDF and Office (docx, xlsx, pptx) libraries for Golang
UniDoc
Golang wrapper for Exiftool : extract as much metadata as possible (EXIF, ...) from files (pictures, pdf, office documents, ...)

go-exiftool go-exiftool is a golang library that wraps ExifTool. ExifTool's purpose is to extract as much metadata as possible (EXIF, IPTC, XMP, GPS,

null 144 Nov 26, 2022
A Docker-powered stateless API for PDF files.

Gotenberg provides a developer-friendly API to interact with powerful tools like Chromium and LibreOffice to convert many documents (HTML, Markdown, Word, Excel, etc.) to PDF, transform them, merge them, and more!

Gotenberg 4.2k Nov 28, 2022
A simple library for generating PDF written in Go lang

gopdf gopdf is a simple library for generating PDF document written in Go lang. Features Unicode subfont embedding. (Chinese, Japanese, Korean, etc.)

Signin Technology 1.8k Nov 23, 2022
Convert document to pdf with golang

Convert document to pdf Build docker: docker build --pull --rm -f "Dockerfile" -t convertdocument:latest "." docker run -p 3000:3000 registry.gitlab.

null 0 Nov 29, 2021
A PDF document generator with high level support for text, drawing and images

GoFPDF document generator Package go-pdf/fpdf implements a PDF document generator with high level support for text, drawing and images. Features UTF-8

null 161 Nov 10, 2022
Read data from rss, convert in pdf and send to kindle. Amazon automatically convert them in azw3.

Kindle-RSS-PDF-AZW3 The Kindle RSS PDF AZW3 is a personal project. The Kindle RSS PDF AZW3 is a personal project. I received a Kindle for Christmas, a

Elia 0 Jan 10, 2022
GoCsv is a library written in pure Go to use csv data more comfortable

GoCsv GoCsv is a library written in pure Go to use csv data more comfortable Supported Go version golang >= 1.13 Installation go get github.com/shr004

Herald 4 Nov 1, 2022
app-services-go-linter plugin analyze source tree of Go files and validates the availability of i18n strings in *.toml files

app-services-go-linter app-services-go-linter plugin analyze source tree of Go files and validates the availability of i18n strings in *.toml files. A

Red Hat Developer 2 Nov 29, 2021
A PDF processor written in Go.

pdfcpu: a Go PDF processor pdfcpu is a PDF processing library written in Go supporting encryption. It provides both an API and a CLI. Supported are al

pdfcpu 3.5k Nov 27, 2022
PDF tools for reMarkable tablets

rm-pdf-tools - PDF tools for reMarkable Disclaimer: rm-pdf-tools is currently in a very early version, bugs are to be expected. Furthermore, the inten

Niels Saurer 13 Oct 14, 2022
A command line tool for mainly exporting logbook records from Google Spreadsheet to PDF file in EASA format

Logbook CLI This is a command line tool for mainly exporting logbook records from Google Spreadsheet to PDF file in EASA format. It also supports rend

Vladimir Simakhin 0 Feb 6, 2022
PDF file parser

#pdf A pdf document parsing and modifying library The libary provides functions to parse and show elements in PDF documents. It checks the validity

null 0 Nov 7, 2021
create PDF from ASCII File for Cable labels

CableLable create PDF from ASCII File for Cable labels file format is one label per line, a line containing up to 3 words, each word is a line on the

null 0 Nov 8, 2021
Ghostinthepdf - This is a small tool that helps to embed a PostScript file into a PDF

This is a small tool that helps to embed a PostScript file into a PDF in a way that GhostScript will run the PostScript code during the

Emil Lerner 134 Nov 9, 2022
Go-wk - PDF Generation API with wkhtmltopdf

Simple PDF Generation API with wkhtmltopdf Quick start Clone the repo locally an

Gustavo Andrioli 0 Jan 25, 2022
Newser is a simple utility to generate a pdf with you favorite news articles

Newser A simple utility to crawl some news sites or other resources and download content into a pdf Building Make sure you have config.yaml setup and

Nenad 80 Nov 9, 2022
PDF Annotator of Nightmares 🎃

PDFrankenstein is a GUI tool that intends to fill the gap on Linux where a good capable PDF annotator like Adobe Acrobat does not exist. What can you

Mansour Behabadi 160 Nov 19, 2022
Processing large file - go

not_yet_hit_the_wall Processing large file - go After reading Marcel Lanz's tweet (seems somebody liked it, and it was shown in my twitter's home), an

Radhika Isswandhana 10 Nov 18, 2021