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


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


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

Contact us if you need any specific examples.


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.


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/

  • 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
  • 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
  • [BUG] Issue with Go 1.16

    [BUG] Issue with Go 1.16


    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:
    <autogenerated>:1: internal compiler error: child dcl collision on symbol _febf within "".(*PdfAppender).replaceObject"
    opened by alexjomin 13
  • Digital signature with an image

    Digital signature with an image

    now i want to sign an pdf ,and i want to fill with an image,this time i only see fill with some text

    feature signatures 
    opened by sayhei 11
  • 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?

    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] Problem with Chinese when creating table of contents in creator package

    [BUG] Problem with Chinese when creating table of contents in creator package

    Is your feature request related to a problem? Please describe. Not support chinese when create pdf

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

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


    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
    opened by falgonua 8
  • [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


    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.


    Attached is an example pdf and the modified pdf_invoice_simple.go


    opened by venison 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] A rotated PDF cannot be rotated again

    [BUG] A rotated PDF cannot be rotated again


    A file can only be rotated once

    Expected Behavior

    Upon a second rotation attempt, I expected the pdf to either be rotated again or for an error to be returned.

    Actual Behavior

    Using this example on the same file twice in a row only changes the file once:

    go run pdf_rotate.go simple.pdf simple.pdf 90 # rotates the file by 90 degrees successfully
    go run pdf_rotate.go simple.pdf simple.pdf 180 # nothing happens, and no error is returned
    opened by leep-frog 1
  • Is there a function of converting PDF files to word files[FEATURE]

    Is there a function of converting PDF files to word files[FEATURE]

    Is there a function of converting PDF files to word files

    opened by rommer-luo 1
  • [FEATURE] PdfPage.Rotate value always nil

    [FEATURE] PdfPage.Rotate value always nil

    Not sure if this is a bug or a feature... Renaming to feature.


    Page rotate value is always Nil if Rotate flag is missing

    Expected Behavior

    Grab a PDF that's rotated that is missing the Rotate field. If there is no /Rotate field it should calculate the transformation off cm values. But instead it is nil so I think that code must be missing

    opened by DerrickMartinez 0
  • [BUG] NewImageFromData and ApplyStandard

    [BUG] NewImageFromData and ApplyStandard


    Adding a Image to a creator and applying a Standard (like PDFa1) throws an error

    Expected Behavior

    Added images should be of imageutil.RGBA so a standard can be applyed.

    Actual Behavior

    Steps to reproduce the behavior:

    cc := creator.New()
    cc.SetPdfWriterAccessFunc(func(w *model.PdfWriter) error {
      return nil
    img, err := cc.NewImageFromData(signSrc)
    cc.WriteToFile() //throws error: interface conversion: *imageutil.NRGBA32 is not imageutil.RGBA: missing method RGBAAt
    opened by polderudo 0
  • [FEATURE] add tint transform to translates spot values into a different color space

    [FEATURE] add tint transform to translates spot values into a different color space

    In some situation, have to add registration black (diecut line) on a pdf [URL]https://en.wikipedia.org/wiki/Registration_black

    possible to add tint transform in our code?

    opened by ghiewa 2
  • [BUG] VectorDrawable Height/ Width method doesn't take margins into account

    [BUG] VectorDrawable Height/ Width method doesn't take margins into account


    When calling Height() method on a VectorDrawable, or a specific implementing structure like table or paragraph, i'm receiving the height without the margins included which makes calculations on the heights (and widths) of a whole block inaccurate.

    c := creator.New()
    table := c.NewTable(1)
    table.SetMargins(0, 0, 10, 10) // 20 points
    p := c.NewParagraph("text")
    p.SetFontSize(10) // 10 points
    p.SetMargins(0, 0, 10, 10) // 20 points
    _ = table.NewCell().SetContent(p)

    Expected Behavior

    // output: 50

    Actual Behavior

    // output: 10
    bug creator 
    opened by klaidas 2
  • The Image size is altering when trying to Print 300 DPI in PDF

    The Image size is altering when trying to Print 300 DPI in PDF


    We have a image that is fixed size and is in 300 DPI. We want to add that image in the PDF. On doing so when we add the image in the PDF using Unidoc unipdf, the image overall size is reducing.

    Expected Behavior

    Since the size of the image and DPI is fixed i.e. DPI is 300 the size of the image in the output PDF should be of the same size as provided

    Actual Behavior

    Steps to reproduce the behavior:

    pageSize := creator.PageSize{creator.PageSizeA4[0], creator.PageSizeA4[1]} c.SetPageSize(pageSize) c.NewPage() img, err := getImage(c, imgPath, 22.2, 18.8, 80.35) _ = c.Draw(img) c.SetOptimizer(optimize.New(optimize.Options{ ImageQuality: 300, ImageUpperPPI: 300, }))

    err = c.WriteToFile(outputPath)

    The above bold text shows how we are specifying the Optimizer to create 300 DPI image.

    func getImage(c *creator.Creator, imgPath string, x float64, y float64, w float64) (*creator.Image, error) { img, err := c.NewImageFromFile(imgPath) if err != nil { common.Log.Debug("Error loading image: %v", err) return nil, err }

    //var xx = float64(300 * 1.0 / 25.4)
    new_x := x * creator.PPMM
    new_y := y * creator.PPMM
    new_w := w * creator.PPMM
    img.SetPos(new_x, new_y)
    return img, nil




    opened by Mahendershah 3
  • [FEATURE] Know absolute positioning of a paragraph which was drawn in a relative mode

    [FEATURE] Know absolute positioning of a paragraph which was drawn in a relative mode

    I want to separate paragraphs with a horizontal line. In order to do this I need one of two things:

    1. draw lines in relative mode or
    2. insert an empty paragraph (or styled paragraph) in relative mode, know it's absolute position and draw line there

    But I didn't found anything that lets me to do one of one of these. So I need a way of knowing absolute positioning of a paragraph (preferably) or a way of drawing lines in relative mode.

    opened by zgordan-vv 1
  • [Feature] Expose type contents/fields to help in testing/development (StyledParagraph, Table, TableCell, etc)

    [Feature] Expose type contents/fields to help in testing/development (StyledParagraph, Table, TableCell, etc)

    In trying to test logic related to PDF content building, we ran into issues with regards to verifying content. Additionally, the API for some renderable types don't seem consistent. For instance, the type creator.Paragraph has a public func Text() available to inspect/interrogate the contents of the paragraph. However, If I wanted to inspect the contents of creator.Table, or creator.StyledParagraph, etc, the content related data is private. If possible, it would be wonderful to just have access to say Cells in Table, with further access to each type's content or basic styling.

    The main argument for this is to help ease development. If we want to verify we are building up the right datastructures before rendering them/writing them to disk, for instance in a unit test scenario, it would be much easier to simply verify that our logic worked by interrogating these types rather than trying to write an integration style test for each branch of logic we might need. For example, if I had code that should build up a table with different content depending on some boolean logic, the only thing I can inspect is the column count and the row count, I have no way to inspect the cells that were added or further the content in each one. Even if I hold a reference to the cell I use in my test scenario, I still can't get access to it's content.

    We can work around some of this by testing content generation before adding it to a cell's content, or by avoiding types like creator.StyledParagraph for instance, but it would be a lot simpler if we just had access to the fields of the type. In some cases our only options are to write the pdf to disk and then do a visual diff, which means we need generated baseline pdf/images for each if statement in our code. The other option we've been exploring is to try to write to memory/disk and then read it in and use the extractor to inspect the tables content or other generated content. This approach is really just an arduous band-aid around the fact that we can't inspect the contents/fields of many of the types we are testing against.

    Basically, it would be a huge help to just have a public 'getter' for many of the fields in these types. I know it might take a bit to try and add something like this to everything, so if you are interested in starting with a smaller subset, I could provide a list of types we're actively working with that would help us out immensely.

    If I'm not making sense, I'd love to discuss further or show code examples for anything that might not be clear.

    opened by venison 3
  • [FEATURE] Can UniPDF extract vector lines?

    [FEATURE] Can UniPDF extract vector lines?

    I want to extract vector lines from pdf files, such as its coordinates, Can UniPDF do it?

    opened by yunqiang-sun 1
  • 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.


    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


    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.


    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


    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


    • 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


    • 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)
  • v3.12.3(Oct 13, 2020)

    Patch version v3.12.3 of UniPDF contains the following:

    Fixes and enhancements

    • Improved speed and memory usage of drawing creator blocks to pages. [USD-8]
    • Enhanced table extraction: More intelligent handling of rulings between cells. [UP-81]
    Source code(tar.gz)
    Source code(zip)
  • v3.12.2(Oct 6, 2020)

    This patch version 3.12.2 release of UniPDF contains the following fixes:


    • Fix in form field loading, better logic for differentiating non-terminal and terminal fields. Now properly handles linked fields.
    • Further improvements in table processing and extraction in the extractor package

    NOTE: The form field handling has been updated quite fundamentally but we have taken care to avoid regressions and done quite extensive testing. We recommend testing your code well while upgrading, especially if it works with fields.

    Source code(tar.gz)
    Source code(zip)
  • v3.12.1(Sep 29, 2020)

    UniPDF v3.12.1 is a patch version which contains few fixes.


    • pdfutil.NormalizePage updated to normalize MediaBox and CropBox to give consistent results
    • Improvements in table processing and extraction in the extractor package
    Source code(tar.gz)
    Source code(zip)
  • v3.12.0(Sep 22, 2020)

    UniPDF 3.12.0 contains both new features/enhancements (additions to export surface) as well as fixes.

    New features and enhancements

    • Added document timestamp signature handler option, which enables setting a fixed signature size instead of estimating it through the handler. This can save an extra call to the signature handler (and an extra API call if using an external handler). Example:
    sigLen := 6000 // Reserve 6000 bytes for signature.
    handler, err := sighandler.NewDocTimeStampWithOpts(
    		&sighandler.DocTimeStampOpts{SignatureSize: sigLen},


    • Improved page normalization function: pdfutil.NormalizePage. Now takes MediaBox and CropBox into account. Updated documentation for creator AddPage function to recommend calling pdfutil.NormalizePage prior to adding a page to avoid any surprising offsets or rotations due to some non-default settings.
    • Fixes in image handling, particularly regarding transparency. There was a regression in transparency handling from updated image handling in v3.10.0, which this corrects, as well as we have much expanded our test coverage to better cover different kinds of images.
    Source code(tar.gz)
    Source code(zip)
  • v3.11.1(Sep 14, 2020)

    UniPDF release v3.11.1 includes:

    • Table extraction quality and testing improvements, including fix for #38
    • Support for more SHA signature algorithms, fixes #401
    • Added pdfutil NormalizePage function to simplify normalization of page rotation
    Source code(tar.gz)
    Source code(zip)
  • v3.11.0(Sep 7, 2020)

    UniPDF release v3.11.0 contains:

    • New feature in creator for drawing poly shapes: Based on https://github.com/unidoc/unipdf/pull/396
    • Bug fixes in extractor addressing https://github.com/unidoc/unipdf/issues/394
    Source code(tar.gz)
    Source code(zip)
  • v3.10.1(Aug 31, 2020)

    Version 3.10.1 includes a couple of fixes:

    • Fix in lazy reader for a bug affecting some files
    • Relax package check removing module requirement
    Source code(tar.gz)
    Source code(zip)
  • v3.10.0(Aug 28, 2020)

    Version 3.10.0 includes a number of fixes, including substantial performance improvements.


    • Image handling refactored and optimized for speed and memory use.
    • Support for images with BPC other than 8, more generic handling.
    • Partial form handling, flattening a subset of fields
    • ApplyArea text added to extractor to enable extracting text from a defined region.
    • Fix applied in drawing signature appearance recengle, closing https://github.com/unidoc/unipdf/issues/369

    Note that UniPDF requires an electronic license code to operate. A free trial can be obtained at https://unidoc.io/

    Source code(tar.gz)
    Source code(zip)
  • v3.9.0(Jul 15, 2020)

    Version 3.9.0 includes multiple new features and improvements:

    • Improvements in text extraction quality supporting complex layouts such as multi columns.
    • Multiple improvements in form filling and appearance generation as well as added test coverage.
    • Improvements in font subsetting
    • More options for PDF optimization including automatic font cleanup and content stream reduction.

    Pull requests included:

    • #389 Add FDF support for form fill rendering test (#389) (@adrg)
    • #387 Add form fill render tests (#387) (@adrg)
    • #386 Refactor creator render test functionality (#386) (@adrg)
    • #366 Text extraction code for columns. (#366) (@peterwilliams97)
    • #385 Form fill field rotation (#385) (@adrg)
    • #382 Add cached Stream method for CMap objects (#382) (@adrg)
    • #381 Add fill and stroke colors for extracted text marks (#381) (@adrg)
    • #377 Skip referenced pages which are not present in the catalog (#377) (@adrg)
    • #362 Font subsetting and font optimization improvements (#362) (@gunnsth)
    Source code(tar.gz)
    Source code(zip)
  • v3.8.0(Jun 16, 2020)

    Version 3.8.0 highlights fixes and improvements in form filling. Custom fonts can now be used when filling forms. In addition contains fixes for field appearance generation. Improvements in multi-byte CMap handling for text extraction.

    Pull requests included:

    • #370 Combo field appearance (#370) (@adrg)
    • #368 Add configurable font fallback options for form fields (#368) (@adrg)
    • #367 Fix outline null object check (#367) (@adrg)
    • #353 Handle multibyte entries in CMaps. (#353) (@peterwilliams97)
    • #364 Account for rotation when generating flattened text field appearances (@adrg)
    Source code(tar.gz)
    Source code(zip)
PDF and Office (docx, xlsx, pptx) libraries for Golang
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 88 Nov 28, 2021
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 3.1k Dec 1, 2021
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.4k Dec 5, 2021
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 93 Dec 3, 2021
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
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
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 25, 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 2.8k Dec 6, 2021
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 Dec 4, 2021
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 2 Oct 30, 2021
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 109 Nov 27, 2021
Split text files into gzip files with x lines

hakgzsplit split lines of text into multiple gzip files

Luke Stephens (hakluke) 6 Aug 30, 2021
Easily create Go files from stub files

go-stubs Easily create .go files from stub files in your projects. Usage go get github.com/nwby/go-stubs Create a stub file: package stubs type {{.Mo

Sam Newby 3 Sep 26, 2021
Go (golang) library for reading and writing XLSX files.

XLSX Introduction xlsx is a library to simplify reading and writing the XML format used by recent version of Microsoft Excel in Go programs. Current s

Geoffrey J. Teale 5.2k Dec 4, 2021
Golang library for reading and writing Microsoft Excel™ (XLSX) files.

Excelize Introduction Excelize is a library written in pure Go providing a set of functions that allow you to write to and read from XLSX / XLSM / XLT

360 Enterprise Security Group, Endpoint Security, inc. 10.2k Dec 6, 2021