github pdfcpu/pdfcpu v0.3.4

latest releases: v0.7.0, v0.6.0, v0.5.0...
3 years ago

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

Don't miss a new pdfcpu release

NewReleases is sending notifications on new releases.