All Versions
20
Latest Version
Avg Release Cycle
36 days
Latest Release
1464 days ago

Changelog History
Page 1

  • v0.3.7 Changes

    November 04, 2020

    πŸš€ This release introduces basic support for CJKV and multi plane Unicode fonts in general.

    In order to produce stamps/watermarks using your favorite TrueType font you need to install it as a user font:

    Go-> pdfcpu font install SimSun.ttf
    installing to /Users/horstrutter/Library/Application Support/pdfcpu/fonts...
    SimSun
    

    πŸ‘Œ Supported are also TrueType collections:

    Go-> pdfcpu font install Songti.ttc
    installing to /Users/horstrutter/Library/Application Support/pdfcpu/fonts...
    STSongti-SC-Black
    STSongti-SC-Bold
    STSongti-TC-Bold
    STSongti-SC-Light
    STSong
    STSongti-TC-Light
    STSongti-SC-Regular
    STSongti-TC-Regular
    

    The following command lists all fonts available:

    Go-> pdfcpu font list
    Corefonts:
      Courier
      Courier-Bold
      Courier-BoldOblique
      Courier-Oblique
      Helvetica
      Helvetica-Bold
      Helvetica-BoldOblique
      Helvetica-Oblique
      Symbol
      Times-Bold
      Times-BoldItalic
      Times-Italic
      Times-Roman
      ZapfDingbats
    
    Userfonts(/Users/horstrutter/Library/Application Support/pdfcpu/fonts):
      STSong (43033 glyphs)
      STSongti-SC-Black (8535 glyphs)
      STSongti-SC-Bold (43033 glyphs)
      STSongti-SC-Light (43033 glyphs)
      STSongti-SC-Regular (43033 glyphs)
      STSongti-TC-Bold (43033 glyphs)
      STSongti-TC-Light (43033 glyphs)
      STSongti-TC-Regular (43033 glyphs)
      SimSun (22141 glyphs)
    

    Now you are ready to stamp your file:

    Go-> pdfcpu stamp add -mode text "θΏ™ζ˜―δΈ€δΈͺζ΅‹θ―•" "fo:SimSun" in.pdf out.pdf
    writing out.pdf...
    pages: all
    

    image

    There is also a command for producing font cheat sheets.
    pdfcpu will produce a single-page PDF for each Unicode plane covered in the current dir:

    Go-> pdfcpu font cheat SimSun
    creating cheatsheets for: SimSun
    
    Go-> lsd Sim*
    -rw-r--r--@ 1 horstrutter staff 5.9M Oct 27 22:31 SimSun_BMP.pdf
    

    image

    image

    Open issues:

    • right to left languages
    • horizontal vs. vertical glyph selection
    • πŸ‘Œ support for *.otf files using CFF

    Thank you everybody for filing issues and PRs.
    πŸ‘ You are a big help in making pdfcpu even better
    🍱 Happy coding πŸ’š

    πŸ”„ Changelog

    βœ… be6f998 Add CJVK font tests
    89ecdcd Add Henrik ReinstΓ€dtler to contributors
    πŸ“œ 7a03716 Add config.yml parsing for wasm
    3447d04 Add font cheatsheet cmd
    πŸ‘ be1af10 Add support for TrueType collections
    πŸ‘ 5c15907 Add support for Type0 fonts
    718a3f0 Bump version
    πŸ— 15cec79 Correct position of build tag in parseConfig.go
    63d5b3d Fix #233
    0abfbc1 Fix conversion points to inches.
    βœ… adad3e0 Fix font test
    πŸ”€ 478c2c9 Merge branch 'cjkv' into master
    πŸ— 070b2d4 Remove not needed build tag in parseConfig_js.go
    9c1b20f fix panic on zero index

  • v0.3.6 Changes

    September 29, 2020

    Hello!

    The focus of this release is the pdfcpu config dir.
    πŸ”§ This dir contains config.yml which represents the current default configuration.
    config.yml will be loaded on restarting pdfcpu either via the API or the CLI.

    You can find out about the location of the config dir via pdfcpu version -v

    πŸ‘€ Since there seem to be usecases where it makes sense to bypass the config dir
    you can pass the new flag -config disable into any call executed on the cmd line
    and in your Go backend you may call api.DisableConfigDir() to achieve the same.
    Just a friendly reminder that in such a scenario user fonts (possibly for stamping) are not available.

    You can also pass a custom path to an existing directory like in config /User/pdf
    and pdfcpu will create a pdfcpu config dir within. Like this you can manage multiple config dirs.
    Just make sure you pass the corresponding config dir you'd like to use before your pdfcpu operation.

    .
    β”œβ”€β”€ config.yml
    └── fonts
        β”œβ”€β”€ Geneva.gob
        β”œβ”€β”€ OldTypewriter.gob
        └── Roboto-Regular.gob
    

    The config dir also contains a dir called fonts which is the home for user fonts installed via eg. pdfcpu fonts install abc.ttf
    πŸš€ More about this in the next release which will be all about fonts.

    Thank you all for reporting bugs and filing issues.
    🍱 Stay tuned and happy coding πŸ’š

    πŸ”„ Changelog

    βœ… 67f0c34 Add low level test for collect
    βœ… e77e4e4 Add low level test for split
    4f10ad0 Fix #218
    9328d3b Fix #220
    7a20978 Fix #221
    f5a85ae Fix #222
    113adaf Fix #223
    4c18535 Fix #224
    6b2e3b4 Fix #231, #232, bump version
    d8572c7 Fix attachment literal creations
    218a002 Handle config dir & introduce config.yml

  • v0.3.5 Changes

    August 30, 2020

    πŸš€ This is a bug fix release mostly.

    πŸš€ The api is being extended step by step to support working with io.Readers across the board. For example this release contains all necessary changes and additions for attachment processing and extraction of images, fonts, pages, content and metadata.

    Check out:

    βœ… api/test/attachments_test.go:
    βœ… func TestAttachmentsLowLevel(t *testing.T)

    βœ… api/test/extract_test.go:
    βœ… func TestExtractImagesLowLevel(t *testing.T)
    βœ… func TestExtractFontsLowLevel(t *testing.T)
    βœ… func TestExtractPagesLowLevel(t *testing.T)
    βœ… func TestExtractContentLowLevel(t *testing.T)
    πŸ“‡ func TestExtractMetadataLowLevel(t *testing.T)

    🍱 Thank you all for taking the time and filing issues πŸ’š

    πŸ”„ Changelog

    πŸ‘ 27a1239 Add io.Reader support to attachment processing
    e408740 Add jozuenoon and joonas-fi as contributors
    ec0e42a Fix #100
    6faa4ad Fix #145, bump version
    a9ba4ec Fix #213
    be1e0eb Fix #215
    71b1f67 Fix validation for a few corner cases
    ef81799 Handle non *os.File buffers. (Fix #207) (#208)
    c336114 Ignore illegal previous xref table section offset.
    πŸ”¨ 0d377dd Refactor api/cli file structure.
    ⚑️ 252fc8d Update dependencies
    5bece43 wip

  • v0.3.4 Changes

    June 28, 2020

    Hello!

    πŸ›  We are rolling out another bugfix release.

    An api extension also makes it easier for you to watermark PDFs from your backend.
    πŸ”§ As usually you may pass in a nil *pdfcpu.Configuration and pdfcpu will lazily use a default configuration
    πŸ“¦ thereby decoupling you from the pdfcpu package:

    func AddTextWatermarksFile(inFile, outFile string, selectedPages []string, onTop bool, text, desc string, conf *pdfcpu.Configuration) error
    func AddImageWatermarksFile(inFile, outFile string, selectedPages []string, onTop bool, fileName, desc string, conf *pdfcpu.Configuration) error
    func AddPDFWatermarksFile(inFile, outFile string, selectedPages []string, onTop bool, fileName, desc string, conf *pdfcpu.Configuration) error 
    
    func UpdateTextWatermarksFile(inFile, outFile string, selectedPages []string, onTop bool, text, desc string, conf *pdfcpu.Configuration) error 
    func UpdateImageWatermarksFile(inFile, outFile string, selectedPages []string, onTop bool, fileName, desc string, conf *pdfcpu.Configuration) error 
    func UpdatePDFWatermarksFile(inFile, outFile string, selectedPages []string, onTop bool, fileName, desc string, conf *pdfcpu.Configuration) 
    

    πŸ‘€ If you want to use ReadSeekers and Writers you may use the following helpers to configure your watermark:

    func TextWatermark(text, desc string, onTop, update bool) (*pdfcpu.Watermark, error)
    func ImageWatermark(fileName, desc string, onTop, update bool) (*pdfcpu.Watermark, error)
    func PDFWatermark(fileName, desc string, onTop, update bool) (*pdfcpu.Watermark, error)
    

    There is also a way now to get the permission bits of a PDF file:

    func GetPermissionsFile(inFile string, conf *pdf.Configuration) (*int16, error)
    

    You may also now change a PDFs title, author or subject using the propertiescommand:

    pdfcpu properties add 'Title = My title'
    pdfcpu properties add 'Author = Me'
    pdfcpu properties add 'Subject = My subject'
    pdfcpu properties add 'Title = My title' 'Subject = My subject' 'Author = Me'
    

    Thanks everybody for taking the time and filing issues for discovered bugs!
    🍱 You all πŸ™ are a big help in making pdfcpu a great tool.

    🍱 Happy coding πŸ’š

    πŸ”„ Changelog

    2ee5072 Bump version
    0e49c13 Fix #196
    0f48029 Fix #191
    13bc9a0 Fix #197
    7cf00c8 Fix #201, #202
    1f68247 Fix #100, #199
    d8b8be9 Fix #177
    43b3751 Add minusworld as contributor.
    πŸ”€ 9250952 Merge pull request #200 from minusworld/patch-1
    βœ… 66fb319 Fix test that was matching the same variable.
    ⚑️ b0be069 Update funding.yml
    e8c64ce Fix #102
    78ce79a Fix #180
    a9145ce Create FUNDING.yml
    f1b22f1 Fix #195
    85288be Fix #187
    a9c1f4d Fix #194
    43b72c3 Fix #193
    58a1e27 Fix #174
    ed59dc3 Fix #192

  • v0.3.3 Changes

    May 25, 2020

    πŸš€ This is a maintenance release featuring a couple of extensions for text based watermarking/stamping.
    Have a look at some examples.
    πŸ“š The documentation of said features will be available on pdfcpu.io shortly.

    🍱 Happy coding & Thank you for using pdfcpu πŸ’š

    πŸ”„ Changelog

    195cc73 Add Carlos Eduardo Witte as contributor
    9184889 Extend watermarking
    πŸ‘ 2396969 Fix #149, Add cmd prefix support to help
    6d5c8c0 Fix #153
    3ccfa0f Fix #155
    f3a25d9 Fix #156
    4a9adac Fix #157, bump version
    760a5aa Fix #159
    b2e52e8 Fix #160
    215fc52 Fix #164
    4c0473c Fix #166
    a7901a1 Fix #170,#173,#175
    6220ebf Fix #181,#182
    abe118f Fix #183, #184
    4b5cc24 Fix #188
    33e7eff Fix add keywords
    ba4e619 Fix coverage.sh
    πŸ›  cc558fe Fixed ToMillimetres() (#162)
    πŸ›  198349c Fixed a bug in paperSize.go toMillimetres, which was returning d.Height twice instead of d.Width and d.Height; and fixed ToMillimeters and ToCentimeters spelling errors.
    πŸ›  bfe4c05 Fixed func toMillimetres() which was returning d.Height twice instead of d.Width and d.Height
    βͺ 1ff4f53 Revert "Fixed a bug in paperSize.go toMillimetres, which was returning d.Height twice instead of d.Width and d.Height; and fixed ToMillimeters and ToCentimeters spelling errors."

  • v0.3.2 Changes

    January 04, 2020

    Hello!

    πŸš€ This release is packed with a couple of new features:

    Multi-Stamping

    This is an enhancement to pdfcpu's PDF stamp command.
    From now on when adding a PDF stamp and no specific stamp page is defined pdfcpu will apply each page of the stamp.pdf one-by-one to the input file and after that it repeatedly uses the last page of stamp.pdf if the input file has more pages. This will allow you to apply corporate designs to your PDFs in one simple step like so:
    pdfcpu stamp add -mode pdf stamp.pdf 'rot:0, pos:bl, scale: 1.0 rel' in.pdf out.pdf

    If you want to stamp with a specific page of stamp.pdf you need to define this like in stamp.pdf:3
    πŸ‘€ See also #146.

    πŸš€ The first release of 2020 also introduces four new commands:

    • keywords
    • properties
    • portfolio
    • collect

    Manage search keywords

    🚚 List, add, remove document keywords.
    Keywords are also part of pdfcpu info.
    Please also refer to pdfcpu help keywords.

    usage: pdfcpu keywords list [-v(erbose)|vv] [-q(uiet)] [-upw userpw] [-opw ownerpw] inFile
           pdfcpu keywords add [-v(erbose)|vv] [-q(uiet)] [-upw userpw] [-opw ownerpw] inFile keyword...
           pdfcpu keywords remove [-v(erbose)|vv] [-q(uiet)] [-upw userpw] [-opw ownerpw] inFile [keyword...]
    

    Manage document properties

    🚚 List, add, remove document properties.
    Properties are also part of pdfcpu info.
    Please also refer to pdfcpu help properties.

    usage: pdfcpu properties list [-v(erbose)|vv] [-q(uiet)] [-upw userpw] [-opw ownerpw] inFile
           pdfcpu properties add [-v(erbose)|vv] [-q(uiet)] [-upw userpw] [-opw ownerpw] inFile keyValuePair...
           pdfcpu properties remove [-v(erbose)|vv] [-q(uiet)] [-upw userpw] [-opw ownerpw] inFile [key...]
    

    Portfolio

    🚚 List, add, remove, extract portfolio entries.
    pdfcpu attachment remains the command for managing plain attachments, whereas pdfcpu portfolio manages portfolio entries that will presented as such by Adobe Reader.
    In a nutshell the behavior of this command reflects the old attachment command.
    Please also refer to pdfcpu help portfolio.
    πŸ‘€ See also #112.

    usage: pdfcpu portfolio list [-v(erbose)|vv] [-q(uiet)] [-upw userpw] [-opw ownerpw] inFile
           pdfcpu portfolio add [-v(erbose)|vv] [-q(uiet)] [-upw userpw] [-opw ownerpw] inFile file[,desc]...
           pdfcpu portfolio remove [-v(erbose)|vv] [-q(uiet)] [-upw userpw] [-opw ownerpw] inFile [file...]
           pdfcpu portfolio extract [-v(erbose)|vv] [-q(uiet)] [-upw userpw] [-opw ownerpw] inFile outDir [file...]
    

    Collect

    Create a custom PDF page sequence.
    Pages may appear multiple times in any way you prefer:
    pdfcpu collect -pages 5,1-3,1-3 in.pdf out.pdf
    Please also refer to pdfcpu help collect.

    usage: pdfcpu collect [-v(erbose)|vv] [-q(uiet)] -pages selectedPages [-upw userpw] [-opw ownerpw] inFile [outFile]
    

    There is also an important change to the insert page command:

    ✨ Enhanced insert page command

    0️⃣ pdfcpu pages insert now features mode before|after. mode defaults to before.
    This will allow you to insert pages at the end of your document:
    βœ… pdfcpu pages insert -mode after -pages l test.pdf
    πŸ‘€ l ... last page. See also #140,#148

    πŸ›  Like always there are also a couple of bug fixes.
    Thank you so much for using pdfcpu!
    🍱 Have fun! πŸ’š

    πŸ”„ Changelog

    055056b Add collect cmd
    683591d Add new cmds: keywords, properties
    789c1fd Fix #112
    990136b Fix #140
    71c52af Fix #143
    9f62b17 Fix #144
    eb8f480 Fix #146
    df75777 Fix #148
    623e0df Fix #152
    ⚑️ 3a5e89f Update README.md

  • v0.3.1 Changes

    December 09, 2019

    πŸš€ This release introduces TrueType font support for stamps/watermarks.

    • πŸ‘‰ Use pdfcpu fonts install to install a list of ttf fonts. (pdfcpu f i also works)
    • πŸ–¨ Use pdfcpu fonts list to print the list of supported/installed fonts. (pdfcpu f lalso works)
    • βœ… Run TestCreateFontSamples in api_test.go anytime to produce sample pages for all installed fonts.

    πŸš€ We are also introducing a pdfcpu config dir with this release using the os.UserConfigDir introduced with go 1.13. hence we also had to bump the required minimum version for building to go1.13.

    🐳 We finally also have a docker file and a couple of bugs have been fixed.

    πŸš€ Thanks to everybody contributing to this release be it by submitting issues or PRs! πŸ’š

    πŸ”„ Changelog

    ⚑️ 6440804 Update min go version to 1.13
    23dcd69 Add Sam Giffney as contributor
    πŸ‘ c4192ba Add TrueType font support
    🐳 9927baa Merge pull request #139 from s01ipsist/dockerize
    🐳 06aa5e8 Add Dockerfile and usage instructions
    c20cd91 Fix #137
    7519e68 Fix #138
    8d41ed1 Fix #133
    41b9a79 Add ryarnyah as contributor
    πŸ”€ 9f4f093 Merge pull request #131 from ryarnyah/fix/go-fuzz-read
    f99a631 Add Invalid filter to NewFilter to fix crash found with go-fuzz
    e7fdde8 Fix #126

  • v0.3 Changes

    November 15, 2019

    πŸš€ Another watermark focused release comes with full support for the Adobe standard/core fontset.
    πŸ–¨ The new pdfcpu fonts command prints the fontnames of all supported fonts:

    Go-> pdfcpu fonts
    Courier
    Courier-Bold
    Courier-BoldOblique
    Courier-Oblique
    Helvetica
    Helvetica-Bold
    Helvetica-BoldOblique
    Helvetica-Oblique
    Symbol
    Times-Bold
    Times-BoldItalic
    Times-Italic
    Times-Roman
    ZapfDingbats
    

    βœ… pkg/testdata/fontsamples contains single page PDF files - each stamped with the full character set of one of the supported fonts for your reference. The corresponding test for producing these files is located here:
    βœ… pkg/api/api_test.go: TestCreateFontSamples

    πŸ‘ All characters regular or special are supported like € or eg. the german Γ€ΓΆΓΌΓ„Γ–ΓœΓŸ

    πŸ‘ In order to fully support creating watermarks/stamps containing any character a cli change was necessary:

    pdfcpu stamp add [-v(erbose)|vv] [-q(uiet)] [-pages selectedPages] [-upw userpw] [-opw ownerpw] -mode text|image|pdf string|file description inFile [outFile]
    pdfcpu stamp remove [-v(erbose)|vv] [-q(uiet)] [-pages selectedPages] [-upw userpw] [-opw ownerpw] inFile [outFile]
    pdfcpu stamp update [-v(erbose)|vv] [-q(uiet)] [-pages selectedPages] [-upw userpw] [-opw ownerpw] -mode text|image|pdf string|file description inFile [outFile]
    
    pdfcpu watermark add [-v(erbose)|vv] [-q(uiet)] [-pages selectedPages] [-upw userpw] [-opw ownerpw] -mode text|image|pdf string|file description inFile [outFile]
    pdfcpu watermark remove [-v(erbose)|vv] [-q(uiet)] [-pages selectedPages] [-upw userpw] [-opw ownerpw] inFile [outFile]
    pdfcpu watermark update [-v(erbose)|vv] [-q(uiet)] [-pages selectedPages] [-upw userpw] [-opw ownerpw] -mode text|image|pdf string|file description inFile [outFile]
    

    πŸ‘ The mode flag is now required to set one of three supported watermark types: text|image|pdf
    πŸš€ A corresponding new argument holds a string or an image or pdf file name. As of this release description is a required configuration string for options only.

    ⚑️ Please update your scripts accordingly!

    The api was improved for PDF Context manipulation during backend processing. The recommended pattern is:

    1. Get a pdf.Context: func ReadContextFile(inFile string) (*pdf.Context, error)
    2. Manipulate the context
    3. Write the pdf.Context: func WriteContextFile(ctx *pdf.Context, outFile string) error

    πŸ”„ Changelog

    ⚑️ 1e3294b Update README.md, travis & bump version
    d1e947c Fix #117
    d1472e1 Add cmd: pdfcpu fonts
    862d9ee Fix #113
    ee90fab Fix #114
    c961839 Fix #119
    9575f75 Add Dmitry Harnitski as contributor
    ac888fe Fix Color Lookup for Flat encoded image (#130)
    dc388b8 Add Mateusz Burniak as contributor
    8519366 feat: Introduce function PageCountFile (#123)
    6a45354 Add minenok-tutu as contributor
    πŸ”€ 110892a Merge in PR
    edeb2bd constant export (#121)
    c97ac72 Fix relaxed Outline dict validation
    ⚑️ ccc83ac Update README.md
    27d554f Fix usage of parms in watermark examples .
    8c9e503 Fix examples.

  • v0.2.5 Changes

    September 23, 2019

    πŸ”„ Changelog

    πŸš€ Focus of this release is enhanced stamping & watermarking.
    ⚑️ Finally pdfcpu is able to add, update and remove stamps & watermarks for selected pages.
    Go to here and scroll all the way down for examples of a typical stamp lifecycle.

    Stamps and watermarks are conceptually the same with the distinction that
    watermarks are rendered before the page content whereas stamps get rendered after the page content.

    What applies to stamping applies to watermarking as well.
    πŸš€ Starting with this release in the realm of pdfcpu:

    • βž• A page stamp is the result of repeatedly Adding stamps to an individual page.
    • ⚑️ Updating the stamp for a selected page will replace this page stamp.
    • Removing a stamp for an individual page removes the page stamp.

    Unfortunately there have been changes to the CLI for the sake of consistency:

    pdfcpu stamp add [-v(erbose)|vv] [-q(uiet)] [-pages selectedPages] [-upw userpw] [-opw ownerpw] description inFile [outFile]
    pdfcpu stamp remove [-v(erbose)|vv] [-q(uiet)] [-pages selectedPages] [-upw userpw] [-opw ownerpw] inFile [outFile]
    pdfcpu stamp update [-v(erbose)|vv] [-q(uiet)] [-pages selectedPages] [-upw userpw] [-opw ownerpw] description inFile [outFile]
    

    ⚑️ Please update your scripts for adding stamps & watermarks accordingly and as a reminder:
    pdfcpu is still Alpha!

    πŸ“œ The command config parameter parser supports prefixes now,
    Just make sure you supply enough characters to for a unique prefix that can be identified.
    Eg. o: .5 is ambiguous because there is opacity and offset but op: 0.5or off: 0 15will work.

    You can also now position individual stamps which enables more complex page stamps/watermarks.
    ⚑️ Until pdfcpu.io is updated please refer to pdfcpu help stamp and pdfcpu help watermark.

    πŸ‘ pdfcpu import is now optionally supporting a desired destination resolution via the dpi command description string parameter. Please refer to pdfcpu help import for more.

    98e24ae Add api.PageDims
    5b4caaf Ensure correct PDF version before writing.
    4d4296a Fix #101, #103, #104, #107, #108, #109
    954206e Make LastModified optional rather than required in validatePieceDict (#106)
    ⚑️ 87915e4 Update contributors in README.md

  • v0.2.4 Changes

    August 27, 2019
    • pdfcpu info also displays pagesize(s) in points now . Use -u to set units to inch, cm or mm.
    • api.PageDims(inFile string) returns a slice of page dimensions.
    • πŸ“¦ pdfcpu/ccitt is removed as pdfcpu starts using the new x/image/ccitt package.
    • pdfcpu/lzw and pdfcpu/tiff are outsourced to hhrutter/lzw and hhrutter/tiff

    πŸ”„ Changelog

    73a6312 Fix #100
    2943473 Fix #104
    πŸ›  f49dee9 Minor fixes.
    🚚 fc3b384 Move lzw and tiff into separate repos