A PDF processor written in Go.

Overview

pdfcpu: a Go PDF processor

Test Coverage Status GoDoc Go Report Card Hex.pm Latest release

pdfcpu is a PDF processing library written in Go supporting encryption. It provides both an API and a CLI. Supported are all versions up to PDF 1.7 (ISO-32000).

Motivation

This is an effort to build a comprehensive PDF processing library from the ground up written in Go. Over time pdfcpu aims to support the standard range of PDF processing features and also any interesting use cases that may present themselves along the way.

       

     

 

Focus

The main focus lies on strong support for batch processing and scripting via a rich command line. At the same time pdfcpu wants to make it easy to integrate PDF processing into your Go based backend system by providing a robust command set.

Command Set

Documentation

  • The main entry point is pdfcpu.io.
  • For CLI examples also go to pdfcpu.io. There you will find explanations of all the commands and their parameters.
  • For API examples of all pdfcpu operations please refer to GoDoc.

GoDoc

Reminder

  • Always make sure your work is based on the latest commit!
  • pdfcpu is still Alpha - bugfixes are committed on the fly and will be mentioned in the next release notes.
  • Follow pdfcpu for news and release announcements.
  • For quick questions or discussions get in touch on the Gopher Slack in the #pdfcpu channel.

Demo Screencast

(using older version with a smaller command set)

asciicast

Installation

Download

Get the latest binary here.

Using GOPATH

Required go version for building: go1.15 and up

go get github.com/pdfcpu/pdfcpu/cmd/...
cd $GOPATH/src/github.com/pdfcpu/pdfcpu/cmd/pdfcpu
go install
pdfcpu version

Using Go Modules

git clone https://github.com/pdfcpu/pdfcpu
cd pdfcpu/cmd/pdfcpu
go install
pdfcpu version

Using Homebrew (macOS)

brew install pdfcpu
pdfcpu version

Run in a Docker container

docker build -t pdfcpu .
# mount current folder into container to process local files
docker run -it --mount type=bind,source="$(pwd)",target=/app pdfcpu ./pdfcpu validate -mode strict /app/pdfs/a.pdf

Contributing

What

  • Please open an issue if you find a bug or want to propose a change.
  • Feature requests - always welcome!
  • Bug fixes - always welcome!
  • PRs - anytime!
  • pdfcpu is stable but still Alpha and occasionally undergoing heavy changes.

How

  • If you want to report a bug please attach the very verbose (pdfcpu cmd -vv ...) output and ideally a test PDF that you can share.
  • Always make sure your contribution is based on the latest commit.
  • Please sign your commits.

Reporting Crashes

Unfortunately crashes do happen :( For the majority of the cases this is due to a diverse pool of PDF Writers out there and millions of PDF files using different versions waiting to be processed by pdfcpu. Sometimes these PDFs were written more than 20(!) years ago. Often there is an issue with validation - sometimes a bug in the parser. Many times even using relaxed validation with pdfcpu does not work. In these cases we need to extend relaxed validation and for this we are relying on your help. By reporting crashes you are helping to improve the stability of pdfcpu. If you happen to crash on any pdfcpu operation be it on the command line or in your Go backend these are the steps to report this:

Regardless of the pdfcpu operation, please start using the pdfcpu command line to validate your file:

pdfcpu validate -v &> crash.log

or to produce very verbose output

pdfcpu validate -vv &> crash.log

will produce what's needed to investigate a crash. Then open an issue and post crash.log or its contents. Ideally post a test PDF you can share to reproduce this. You can also email to [email protected] or if you prefer Slack you can get in touch on the Gopher slack #pdfcpu channel.

If processing your PDF with pdfcpu crashes during validation and can be opened by Adobe Reader and Mac Preview chances are we can extend relaxed validation and provide a fix. If the file in question cannot be opened by both Adobe Reader and Mac Preview we cannot help you!

Contributors

Thanks goes to these wonderful people:


Horst Rutter

haldyr

Vyacheslav

Erik Unger

Richard Wilkes

minenok-tutu

Mateusz Burniak

Dmitry Harnitski

ryarnyah

Sam Giffney

Carlos Eduardo Witte

minusworld

Witold Konior

joonas.fi

Henrik Reinstรคdtler

VMorozov-wh

Benoit KUGLER

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Disclaimer

Usage of pdfcpu assumes you know about and respect all copyrights of any PDF content you may be processing. This applies to the PDF files as such, their content and in particular all embedded resources like font files or images. Credit goes to Renee French for creating our beloved Gopher.

License

Apache-2.0

Powered By

Comments
  •  index out of range

    index out of range

    Hi, I get an index out of range error for a file. I can't share the PDF file with you here but I can share it in private email so you can reproduce it. Is this okay?

    Here is the code:

    package main
    
    import (
    	"log"
    	"os"
    
    	"github.com/pdfcpu/pdfcpu/pkg/api"
    )
    
    func main() {
    	if len(os.Args) < 3 {
    		log.Printf("\nUsage:\n\t%s <inputfile> <output-dir>\n\n", os.Args[0])
    	}
    
    	inputFile := os.Args[1]
    	outputDir := os.Args[2]
    
    	f, err := os.Open(inputFile)
    	if err != nil {
    		log.Fatalf("Unable to open file '%s': %v", inputFile, err)
    	}
    
    	err = api.ExtractImages(f, outputDir, nil, nil)
    	if err != nil {
    		log.Fatalf("Unable to extract images from '%s' into '%s': %v", inputFile, outputDir, err)
    	}
    }
    

    And here is the output:

    [email protected]:~/git/p/ds(reorg)$ bin/pdfsplit 1.pdf /tmp
    panic: runtime error: index out of range
    
    goroutine 1 [running]:
    github.com/pdfcpu/pdfcpu/ccitt.(*pixelBuf).setPix(...)
    	/Users/borud/go/pkg/mod/github.com/pdfcpu/[email protected]/ccitt/reader.go:85
    github.com/pdfcpu/pdfcpu/ccitt.(*pixelBuf).addRun(0xc0000102a0, 0x86, 0x408, 0xd9, 0x11f6301)
    	/Users/borud/go/pkg/mod/github.com/pdfcpu/[email protected]/ccitt/reader.go:93 +0xab
    github.com/pdfcpu/pdfcpu/ccitt.(*decoder).handlePass(0xc0000f6120)
    	/Users/borud/go/pkg/mod/github.com/pdfcpu/[email protected]/ccitt/reader.go:329 +0x73
    github.com/pdfcpu/pdfcpu/ccitt.(*decoder).decodeGroup4(0xc0000f6120)
    	/Users/borud/go/pkg/mod/github.com/pdfcpu/[email protected]/ccitt/reader.go:601 +0xb8
    github.com/pdfcpu/pdfcpu/ccitt.(*decoder).decode(0xc0000f6120)
    	/Users/borud/go/pkg/mod/github.com/pdfcpu/[email protected]/ccitt/reader.go:629 +0x44
    github.com/pdfcpu/pdfcpu/ccitt.(*decoder).Read(0xc0000f6120, 0xc000116000, 0x200, 0x200, 0x30, 0x28, 0xc0000a9908)
    	/Users/borud/go/pkg/mod/github.com/pdfcpu/[email protected]/ccitt/reader.go:643 +0x31
    bytes.(*Buffer).ReadFrom(0xc000010240, 0x1644198, 0xc0000f6120, 0x16441d8, 0xc000010240, 0x5a0000c0000fa701)
    	/usr/local/Cellar/go/1.12.7/libexec/src/bytes/buffer.go:207 +0xbd
    io.copyBuffer(0x1277ca0, 0xc000010240, 0x1644198, 0xc0000f6120, 0x0, 0x0, 0x0, 0xc000010210, 0xc000044c00, 0x0)
    	/usr/local/Cellar/go/1.12.7/libexec/src/io/io.go:388 +0x2fc
    io.Copy(...)
    	/usr/local/Cellar/go/1.12.7/libexec/src/io/io.go:364
    github.com/pdfcpu/pdfcpu/pkg/filter.ccittDecode.Decode(0xc000010210, 0x1277cc0, 0xc0000101e0, 0x0, 0x0, 0x0)
    	/Users/borud/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/filter/ccittDecode.go:80 +0x33c
    github.com/pdfcpu/pdfcpu/pkg/pdfcpu.decodeStream(0xc000188460, 0xc0000fa750, 0x122e109)
    	/Users/borud/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/filter.go:165 +0x4b5
    github.com/pdfcpu/pdfcpu/pkg/pdfcpu.ExtractImageData(0xc0000fa330, 0x11, 0x11, 0xc0000a9ce2, 0x1)
    	/Users/borud/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/extract.go:88 +0x5be
    github.com/pdfcpu/pdfcpu/pkg/api.doExtractImages(0xc0000fa330, 0xc000091290, 0x0, 0x0)
    	/Users/borud/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/api/extract.go:71 +0x262
    github.com/pdfcpu/pdfcpu/pkg/api.ExtractImages(0x1279880, 0xc00008c078, 0x7ffeefbffb41, 0x4, 0x0, 0x0, 0x0, 0xc0000f6000, 0xd4, 0xc0000f2000)
    	/Users/borud/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/api/extract.go:115 +0x1bd
    main.main()
    	/Users/borud/git/p/ds/cmd/pdfsplit/main.go:27 +0x181
    
    bug 
    opened by borud 19
  • unable to extract images from a pdf where BitPerComponent is not 8

    unable to extract images from a pdf where BitPerComponent is not 8

    Hi, I've encountered this error:

    https://github.com/pdfcpu/pdfcpu/blob/f99879e05a77296a55075b3a684f399a52c400c4/pkg/filter/flateDecode.go#L239

    I'm trying to extract images from a PDF file where one of the images has a bpc of 1. I'm willing to implement the solution for my use-case, but I'll have to understand how the image is encoded if possible.

    bug 
    opened by mrg0lden 18
  • parse: handle stream dict /Length 0 gracefully

    parse: handle stream dict /Length 0 gracefully

    The attached files bug3im1.pdf and bug3im2.pdf were created by ImageMagick. The only difference is that the second one was sent to the stdout which was redirected to the file.

    > magick.exe -density 300 bug3.pdf -threshold 77% -type bilevel -compress Group4 bug3im1.pdf
    > magick.exe -density 300 bug3.pdf -threshold 77% -type bilevel -compress Group4 pdf:- > bug3im2.pdf
    

    Why the two files are not identical, I have no idea. But the fact is that both files are considered as valid with relaxed mode:

    lidating(mode=relaxed) bug3im1o.pdf ...
    validation ok
    

    And both has the same problem in strict mode:

    validation error (try -mode=relaxed): dict=xObjectStreamDict required entry=Subtype missing
    

    When we optimize them with pdfcpu optimize the first looks ok, but the ccitt stream disappears of the second one.

    Both files are considered as valid pdf 1.3 by Acrobat Preflight.

    I don't know if this is a bug in optimize or a bug in validate but the behavior is not normal, IMO.

    opened by kpym 17
  • Handling files processed with ocrmypdf

    Handling files processed with ocrmypdf

    I am scanning documents which also includes OCR information.

    The problem: searching them still isn't great. I either need to rely on the OS level indexing, or use something like pdfgrep - which is very slow. The normal grep does not seem to work on the OCR data. That's why I also export the OCR information as a sidecar txt file. Which means I can just use grep. Which is of course not really great as I now are dealing with 2 files.

    So I had the idea: Maybe I could add the OCR information to the PDF in a way that a normal grep could find the data anyway.

    I looked at some file format information and IIUC I could maybe add the OCR information at the beginning of the PDF as comment.

    Is this similar to what the add keyword feature does? Or is there a way to add comments?

    opened by tcurdt 17
  • writeStream: missing eol before keyword endstream

    writeStream: missing eol before keyword endstream

    I'm currently using the pdfcpu golang api (v0.3.6) and came across an error that I was also able to reproduce using the latest release (v0.3.8), both from golang api as well as using the standalone pdfcpu executable on win64.

    When extracting a single page out of a PDF document and opening the resulting file in PDF XChange Editor (Free version), it complains that there would be an error in the XREF table. It still displays the PDF. Opening the same file in Acrobat Reader or xpdf does not yield any errors, so I do not know whether this might only be a small issue or perhaps even wrong alert.

    I tested this with different PDF documents from different sources. Also checked that the original documents from which I extracted the pages did not show any error when opening in PDF XChange Editor.

    The command that I used to extract was nothing special: pdfcpu.exe extract -m page -p 1 input.pdf outputDir. Please find attached a sample input and output file from testing.

    input.pdf input_page_1.pdf

    opened by Blesmol 16
  • Using pdfcpu API from []byte

    Using pdfcpu API from []byte

    Hello,

    It seems all API is oriented to read and write content from and to file (os.file). Is there a simple way to use it from and to []byte (in order to include them in back of an HTTP API for ex.) ?

    opened by protheusfr 16
  • validateString: missing object

    validateString: missing object

    I am not sure whether this is pdfcpu not supporting PDF/A-2B or ocrmypdf/tesseract generating an invalid pdf. Any idea?

    $ ocrmypdf -l eng+deu 2018-07-25-no-ocr.pdf no-ocr.pdf
       INFO -    1: [tesseract] Too few characters. Skipping this page
    WARNING -    1: [tesseract] unsure about page orientation
       INFO - Optimize ratio: 1.00 savings: -0.0%
       INFO - Optimize did not improve the file - discarded
       INFO - Output file is a PDF/A-2B (as expected)
    
    $ pdfcpu validate no-ocr.pdf 
    validating(mode=relaxed) no-ocr.pdf ...
    validation error (try -mode=relaxed): validateString: missing object
    $ pdfcpu validate -mode relaxed no-ocr.pdf 
    validating(mode=relaxed) no-ocr.pdf ...
    validation error (try -mode=relaxed): validateString: missing object
    
    $ pdfcpu validate -verbose no-ocr.pdf 
    validating(mode=relaxed) no-ocr.pdf ...
    DEBUG: 2018/07/25 21:15:05 readPDFFile: begin
    INFO: 2018/07/25 21:15:05 PDF Version 1.5 conforming reader
    DEBUG: 2018/07/25 21:15:05 readXRefTable: begin
    DEBUG: 2018/07/25 21:15:05 offsetLastXRefSection at 124604
    DEBUG: 2018/07/25 21:15:05 Offset last xrefsection: 125033
    DEBUG: 2018/07/25 21:15:05 buildXRefTableStartingAt: begin
    DEBUG: 2018/07/25 21:15:05 headerVersion begin
    DEBUG: 2018/07/25 21:15:05 headerVersion: end, found header version: 1.6
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 125033
    DEBUG: 2018/07/25 21:15:05 line: <xref>
    DEBUG: 2018/07/25 21:15:05 buildXRefTableStartingAt: found xref section
    DEBUG: 2018/07/25 21:15:05 parseXRefSection begin
    DEBUG: 2018/07/25 21:15:05 parseXRefSection: <0 22>
    DEBUG: 2018/07/25 21:15:05 parseXRefTableSubSection: begin
    DEBUG: 2018/07/25 21:15:05 detected xref subsection, startObj=0 length=22
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #0 is unused, next free is object#0, generation=65535
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #1 is in use at offset=568, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 1
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #2 is in use at offset=124700, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 2
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #3 is in use at offset=509, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 3
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #4 is in use at offset=334, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 4
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #5 is in use at offset=15, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 5
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #6 is in use at offset=315, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 6
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #7 is in use at offset=659, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 7
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #8 is in use at offset=714, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 8
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #9 is in use at offset=120057, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 9
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #10 is in use at offset=119330, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 10
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #11 is in use at offset=120194, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 11
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #12 is in use at offset=848, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 12
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #13 is in use at offset=786, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 13
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #14 is in use at offset=816, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 14
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #15 is in use at offset=119300, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 15
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #16 is in use at offset=122061, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 16
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #17 is in use at offset=124587, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 17
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #18 is in use at offset=120429, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 18
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #19 is in use at offset=119551, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 19
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #20 is in use at offset=119791, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 20
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: begin
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Object #21 is in use at offset=120684, generation=0
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: Insert new xreftable entry for Object 21
    DEBUG: 2018/07/25 21:15:05 parseXRefTableEntry: end
    DEBUG: 2018/07/25 21:15:05 parseXRefTableSubSection: end
    DEBUG: 2018/07/25 21:15:05 parseXRefSection: All subsections read!
    DEBUG: 2018/07/25 21:15:05 parseXRefSection: parsing trailer dict..
    DEBUG: 2018/07/25 21:15:05 line (len 7) <trailer>
    DEBUG: 2018/07/25 21:15:05 parseXRefSection: trailerString: (len:114) <<< /Size 22 /Root 1 0 R /Info 2 0 R /ID [<A428500E88C8CBAD76387BC06F087FB4><A428500E88C8CBAD76387BC06F087FB4>] >> >
    DEBUG: 2018/07/25 21:15:05 parseXRefSection: trailerDict:
    <<
      <ID, [<A428500E88C8CBAD76387BC06F087FB4> <A428500E88C8CBAD76387BC06F087FB4>]>
      <Info, (2 0 R)>
      <Root, (1 0 R)>
      <Size, 22>
    >>
    DEBUG: 2018/07/25 21:15:05 parseTrailerDict begin
    DEBUG: 2018/07/25 21:15:05 parseTrailerInfo begin
    DEBUG: 2018/07/25 21:15:05 parseTrailerInfo: Root object: (1 0 R)
    DEBUG: 2018/07/25 21:15:05 parseTrailerInfo: Info object: (2 0 R)
    DEBUG: 2018/07/25 21:15:05 parseTrailerInfo: ID object: [<A428500E88C8CBAD76387BC06F087FB4> <A428500E88C8CBAD76387BC06F087FB4>]
    DEBUG: 2018/07/25 21:15:05 parseTrailerInfo end
    DEBUG: 2018/07/25 21:15:05 parseTrailerDict end
    DEBUG: 2018/07/25 21:15:05 parseXRefSection end
    DEBUG: 2018/07/25 21:15:05 buildXRefTableStartingAt: end
    DEBUG: 2018/07/25 21:15:05 EnsureValidFreeList begin
    DEBUG: 2018/07/25 21:15:05 EnsureValidFreeList: empty free list.
    DEBUG: 2018/07/25 21:15:05 readXRefTable: end
    DEBUG: 2018/07/25 21:15:05 dereferenceXRefTable: begin
    DEBUG: 2018/07/25 21:15:05 decodeObjectStreams: begin
    DEBUG: 2018/07/25 21:15:05 decodeObjectStreams: end
    DEBUG: 2018/07/25 21:15:05 dereferenceObjects: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 0
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 1
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 1
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#1, offset:568
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 568
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:568
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=0
    DEBUG: 2018/07/25 21:15:05 object: small obj w/o stream, parse until endobj
    DEBUG: 2018/07/25 21:15:05 dict: end, #1
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 1 of 22
    <<<
      <Metadata, (21 0 R)>
      <OutputIntents, [(17 0 R)]>
      <Pages, (3 0 R)>
      <Type, Catalog>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no pdfObjectStreamDict
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 2
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 2
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#2, offset:124700
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 124700
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:124700
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 928 bytes
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=0
    DEBUG: 2018/07/25 21:15:05 object: small object w/o stream, parse until endobj
    DEBUG: 2018/07/25 21:15:05 dict: end, #2
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 2 of 22
    <<<
      <CreationDate, <nil>>
      <Creator, (\376\377\000o\000c\000r\000m\000y\000p\000d\000f\000 \0007\000.\0000\000.\0000\000 \000/\000 \000T\000e\000s\000s\000e\000r\000a\000c\000t\000 \000O\000C\000R\000-\000P\000D\000F\000 \0003\000.\0000\0005\000.\0000\0002)>
      <ModDate, (D:20180725191320+00'00')>
      <Producer, (GPL Ghostscript 9.23)>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no pdfObjectStreamDict
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 3
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 3
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#3, offset:509
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 509
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:509
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=0
    DEBUG: 2018/07/25 21:15:05 object: small obj w/o stream, parse until endobj
    DEBUG: 2018/07/25 21:15:05 dict: end, #3
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 3 of 22
    <<<
      <Count, 1>
      <Kids, [(4 0 R)]>
      <Type, Pages>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no pdfObjectStreamDict
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 4
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 4
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#4, offset:334
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 334
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:334
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=0
    DEBUG: 2018/07/25 21:15:05 object: small obj w/o stream, parse until endobj
    DEBUG: 2018/07/25 21:15:05 dict: end, #4
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 4 of 22
    <<<
      <Contents, (5 0 R)>
      <MediaBox, [0 0 598 843]>
      <Parent, (3 0 R)>
      <Resources, <<
        <ExtGState, (13 0 R)>
        <Font, (15 0 R)>
        <ProcSet, [PDF ImageC Text]>
        <XObject, (14 0 R)>
      >>>
      <Type, Page>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no pdfObjectStreamDict
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 5
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 5
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#5, offset:15
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 15
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:15
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 keywordStreamRightAfterEndOfDict: begin
    DEBUG: 2018/07/25 21:15:05 keywordStreamRightAfterEndOfDict: end, true
    DEBUG: 2018/07/25 21:15:05 buffer: endInd=293 streamInd=46
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=53
    DEBUG: 2018/07/25 21:15:05 object: small stream within buffer, parse until stream
    DEBUG: 2018/07/25 21:15:05 pdfFilterPipeline: begin
    DEBUG: 2018/07/25 21:15:05 pdfFilterPipeline: end w/o decode parms
    DEBUG: 2018/07/25 21:15:05 streamDict: end, Streamobject #5
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: begin
    <<
      <Filter, FlateDecode>
      <Length, (6 0 R)>
    >>
    DEBUG: 2018/07/25 21:15:05 int64Object begin: 6
    DEBUG: 2018/07/25 21:15:05 dereferencedObject: dereferencing object 6
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#6, offset:315
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 315
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:315
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=0
    DEBUG: 2018/07/25 21:15:05 object: small obj w/o stream, parse until endobj
    DEBUG: 2018/07/25 21:15:05 int64Object end: 6
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: new indirect streamLength:229
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 68
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: seeked to offset:68
    DEBUG: 2018/07/25 21:15:05 readContentStream: begin streamLength:229
    DEBUG: 2018/07/25 21:15:05 readContentStream: count=229, buflen=229(E5)
    DEBUG: 2018/07/25 21:15:05 readContentStream: end
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: end: len(streamDictRaw)=229
    DEBUG: 2018/07/25 21:15:05 saveDecodedStreamContent: begin decode=false
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 5 of 22
    <<<
      <Filter, FlateDecode>
      <Length, (6 0 R)>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no stream content
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 6
    DEBUG: 2018/07/25 21:15:05 logStream: no pdfObjectStreamDict
    DEBUG: 2018/07/25 21:15:05 handleCachedStreamDict: using cached object 6 of 22
    <229>
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 7
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 7
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#7, offset:659
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 659
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:659
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=0
    DEBUG: 2018/07/25 21:15:05 object: small obj w/o stream, parse until endobj
    DEBUG: 2018/07/25 21:15:05 dict: end, #7
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 7 of 22
    <<<
      <BM, Normal>
      <TK, true>
      <Type, ExtGState>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no pdfObjectStreamDict
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 8
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 8
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#8, offset:714
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 714
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:714
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=0
    DEBUG: 2018/07/25 21:15:05 object: small obj w/o stream, parse until endobj
    DEBUG: 2018/07/25 21:15:05 dict: end, #8
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 8 of 22
    <<<
      <Ordering, (Identity)>
      <Registry, (Adobe)>
      <Supplement, 0>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no pdfObjectStreamDict
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 9
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 9
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#9, offset:120057
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 120057
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:120057
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=0
    DEBUG: 2018/07/25 21:15:05 object: small obj w/o stream, parse until endobj
    DEBUG: 2018/07/25 21:15:05 dict: end, #9
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 9 of 22
    <<<
      <BaseFont, WWVJXR+GlyphLessFont>
      <DescendantFonts, [(10 0 R)]>
      <Encoding, Identity-H>
      <Subtype, Type0>
      <ToUnicode, (20 0 R)>
      <Type, Font>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no pdfObjectStreamDict
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 10
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 10
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#10, offset:119330
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 119330
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:119330
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=0
    DEBUG: 2018/07/25 21:15:05 object: small obj w/o stream, parse until endobj
    DEBUG: 2018/07/25 21:15:05 dict: end, #10
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 10 of 22
    <<<
      <BaseFont, WWVJXR+GlyphLessFont>
      <CIDSystemInfo, (8 0 R)>
      <CIDToGIDMap, (19 0 R)>
      <DW, 500>
      <FontDescriptor, (11 0 R)>
      <Subtype, CIDFontType2>
      <Type, Font>
      <W, [32 [500] 69 [500] 73 [500] 83 [500 500] 87 [500] 8216 [500] 8222 [500]]>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no pdfObjectStreamDict
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 11
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 11
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#11, offset:120194
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 120194
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:120194
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=0
    DEBUG: 2018/07/25 21:15:05 object: small obj w/o stream, parse until endobj
    DEBUG: 2018/07/25 21:15:05 dict: end, #11
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 11 of 22
    <<<
      <Ascent, 1000>
      <AvgWidth, 500>
      <CapHeight, 1000>
      <Descent, 0>
      <Flags, 65569>
      <FontBBox, [0 0 500 1000]>
      <FontFile2, (18 0 R)>
      <FontName, WWVJXR+GlyphLessFont>
      <ItalicAngle, 0>
      <MaxWidth, 500>
      <MissingWidth, 500>
      <StemV, 75>
      <Type, FontDescriptor>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no pdfObjectStreamDict
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 12
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 12
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#12, offset:848
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 848
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:848
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 keywordStreamRightAfterEndOfDict: begin
    DEBUG: 2018/07/25 21:15:05 keywordStreamRightAfterEndOfDict: end, true
    DEBUG: 2018/07/25 21:15:05 buffer: endInd=-1 streamInd=126
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=133
    DEBUG: 2018/07/25 21:15:05 object: big stream, we parse object until stream
    DEBUG: 2018/07/25 21:15:05 pdfFilterPipeline: begin
    DEBUG: 2018/07/25 21:15:05 pdfFilterPipeline: end w/o decode parms
    DEBUG: 2018/07/25 21:15:05 streamDict: end, Streamobject #12
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: begin
    <<
      <BitsPerComponent, 8>
      <ColorSpace, DeviceRGB>
      <Filter, DCTDecode>
      <Height, 1627>
      <Length, 118301>
      <Subtype, Image>
      <Width, 1154>
    >>
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 981
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: seeked to offset:981
    DEBUG: 2018/07/25 21:15:05 readContentStream: begin streamLength:118301
    DEBUG: 2018/07/25 21:15:05 readContentStream: count=118301, buflen=118301(1CE1D)
    DEBUG: 2018/07/25 21:15:05 readContentStream: end
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: end: len(streamDictRaw)=118301
    DEBUG: 2018/07/25 21:15:05 saveDecodedStreamContent: begin decode=false
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 12 of 22
    <<<
      <BitsPerComponent, 8>
      <ColorSpace, DeviceRGB>
      <Filter, DCTDecode>
      <Height, 1627>
      <Length, 118301>
      <Subtype, Image>
      <Width, 1154>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no stream content
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 13
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 13
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#13, offset:786
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 786
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:786
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=0
    DEBUG: 2018/07/25 21:15:05 object: small obj w/o stream, parse until endobj
    DEBUG: 2018/07/25 21:15:05 dict: end, #13
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 13 of 22
    <<<
      <R7, (7 0 R)>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no pdfObjectStreamDict
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 14
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 14
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#14, offset:816
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 816
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:816
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=0
    DEBUG: 2018/07/25 21:15:05 object: small obj w/o stream, parse until endobj
    DEBUG: 2018/07/25 21:15:05 dict: end, #14
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 14 of 22
    <<<
      <R12, (12 0 R)>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no pdfObjectStreamDict
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 15
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 15
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#15, offset:119300
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 119300
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:119300
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=0
    DEBUG: 2018/07/25 21:15:05 object: small obj w/o stream, parse until endobj
    DEBUG: 2018/07/25 21:15:05 dict: end, #15
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 15 of 22
    <<<
      <R9, (9 0 R)>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no pdfObjectStreamDict
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 16
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 16
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#16, offset:122061
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 122061
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:122061
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 keywordStreamRightAfterEndOfDict: begin
    DEBUG: 2018/07/25 21:15:05 keywordStreamRightAfterEndOfDict: end, true
    DEBUG: 2018/07/25 21:15:05 buffer: endInd=-1 streamInd=49
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=56
    DEBUG: 2018/07/25 21:15:05 object: big stream, we parse object until stream
    DEBUG: 2018/07/25 21:15:05 pdfFilterPipeline: begin
    DEBUG: 2018/07/25 21:15:05 pdfFilterPipeline: end w/o decode parms
    DEBUG: 2018/07/25 21:15:05 streamDict: end, Streamobject #16
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: begin
    <<
      <Filter, FlateDecode>
      <Length, 2452>
      <N, 3>
    >>
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 122117
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: seeked to offset:122117
    DEBUG: 2018/07/25 21:15:05 readContentStream: begin streamLength:2452
    DEBUG: 2018/07/25 21:15:05 readContentStream: count=2452, buflen=2452(994)
    DEBUG: 2018/07/25 21:15:05 readContentStream: end
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: end: len(streamDictRaw)=2452
    DEBUG: 2018/07/25 21:15:05 saveDecodedStreamContent: begin decode=false
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 16 of 22
    <<<
      <Filter, FlateDecode>
      <Length, 2452>
      <N, 3>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no stream content
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 17
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 17
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#17, offset:124587
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 124587
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:124587
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=0
    DEBUG: 2018/07/25 21:15:05 object: small object w/o stream, parse until endobj
    DEBUG: 2018/07/25 21:15:05 dict: end, #17
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 17 of 22
    <<<
      <DestOutputProfile, (16 0 R)>
      <OutputConditionIdentifier, (sRGB)>
      <S, GTS_PDFA1>
      <Type, OutputIntent>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no pdfObjectStreamDict
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 18
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 18
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#18, offset:120429
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 120429
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:120429
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 keywordStreamRightAfterEndOfDict: begin
    DEBUG: 2018/07/25 21:15:05 keywordStreamRightAfterEndOfDict: end, true
    DEBUG: 2018/07/25 21:15:05 buffer: endInd=248 streamInd=43
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=50
    DEBUG: 2018/07/25 21:15:05 object: small stream within buffer, parse until stream
    DEBUG: 2018/07/25 21:15:05 pdfFilterPipeline: begin
    DEBUG: 2018/07/25 21:15:05 pdfFilterPipeline: end w/o decode parms
    DEBUG: 2018/07/25 21:15:05 streamDict: end, Streamobject #18
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: begin
    <<
      <Filter, FlateDecode>
      <Length, 187>
    >>
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 120479
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: seeked to offset:120479
    DEBUG: 2018/07/25 21:15:05 readContentStream: begin streamLength:187
    DEBUG: 2018/07/25 21:15:05 readContentStream: count=187, buflen=187(BB)
    DEBUG: 2018/07/25 21:15:05 readContentStream: end
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: end: len(streamDictRaw)=187
    DEBUG: 2018/07/25 21:15:05 saveDecodedStreamContent: begin decode=false
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 18 of 22
    <<<
      <Filter, FlateDecode>
      <Length, 187>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no stream content
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 19
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 19
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#19, offset:119551
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 119551
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:119551
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 keywordStreamRightAfterEndOfDict: begin
    DEBUG: 2018/07/25 21:15:05 keywordStreamRightAfterEndOfDict: end, true
    DEBUG: 2018/07/25 21:15:05 buffer: endInd=233 streamInd=43
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=50
    DEBUG: 2018/07/25 21:15:05 object: small stream within buffer, parse until stream
    DEBUG: 2018/07/25 21:15:05 pdfFilterPipeline: begin
    DEBUG: 2018/07/25 21:15:05 pdfFilterPipeline: end w/o decode parms
    DEBUG: 2018/07/25 21:15:05 streamDict: end, Streamobject #19
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: begin
    <<
      <Filter, FlateDecode>
      <Length, 172>
    >>
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 119601
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: seeked to offset:119601
    DEBUG: 2018/07/25 21:15:05 readContentStream: begin streamLength:172
    DEBUG: 2018/07/25 21:15:05 readContentStream: count=172, buflen=172(AC)
    DEBUG: 2018/07/25 21:15:05 readContentStream: end
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: end: len(streamDictRaw)=172
    DEBUG: 2018/07/25 21:15:05 saveDecodedStreamContent: begin decode=false
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 19 of 22
    <<<
      <Filter, FlateDecode>
      <Length, 172>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no stream content
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 20
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 20
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#20, offset:119791
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 119791
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:119791
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 keywordStreamRightAfterEndOfDict: begin
    DEBUG: 2018/07/25 21:15:05 keywordStreamRightAfterEndOfDict: end, true
    DEBUG: 2018/07/25 21:15:05 buffer: endInd=259 streamInd=43
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=50
    DEBUG: 2018/07/25 21:15:05 object: small stream within buffer, parse until stream
    DEBUG: 2018/07/25 21:15:05 pdfFilterPipeline: begin
    DEBUG: 2018/07/25 21:15:05 pdfFilterPipeline: end w/o decode parms
    DEBUG: 2018/07/25 21:15:05 streamDict: end, Streamobject #20
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: begin
    <<
      <Filter, FlateDecode>
      <Length, 198>
    >>
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 119841
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: seeked to offset:119841
    DEBUG: 2018/07/25 21:15:05 readContentStream: begin streamLength:198
    DEBUG: 2018/07/25 21:15:05 readContentStream: count=198, buflen=198(C6)
    DEBUG: 2018/07/25 21:15:05 readContentStream: end
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: end: len(streamDictRaw)=198
    DEBUG: 2018/07/25 21:15:05 saveDecodedStreamContent: begin decode=false
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 20 of 22
    <<<
      <Filter, FlateDecode>
      <Length, 198>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no stream content
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 21
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: dereferencing object 21
    DEBUG: 2018/07/25 21:15:05 pdfObject: begin, obj#21, offset:120684
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 120684
    DEBUG: 2018/07/25 21:15:05 object: seeked to offset:120684
    DEBUG: 2018/07/25 21:15:05  buffer: begin
    DEBUG: 2018/07/25 21:15:05 growBufBy: Read 1024 bytes
    DEBUG: 2018/07/25 21:15:05 keywordStreamRightAfterEndOfDict: begin
    DEBUG: 2018/07/25 21:15:05 keywordStreamRightAfterEndOfDict: end, true
    DEBUG: 2018/07/25 21:15:05 buffer: endInd=-1 streamInd=52
    DEBUG: 2018/07/25 21:15:05 buffer: end, returned bufsize=1024 streamOffset=59
    DEBUG: 2018/07/25 21:15:05 object: big stream, we parse object until stream
    DEBUG: 2018/07/25 21:15:05 pdfFilterPipeline: begin
    DEBUG: 2018/07/25 21:15:05 streamDict: end, Streamobject #21
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: begin
    <<
      <Length, 1300>
      <Subtype, XML>
      <Type, Metadata>
    >>
    DEBUG: 2018/07/25 21:15:05 newPositionedReader: positioned to offset: 120743
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: seeked to offset:120743
    DEBUG: 2018/07/25 21:15:05 readContentStream: begin streamLength:1300
    DEBUG: 2018/07/25 21:15:05 readContentStream: count=1300, buflen=1300(514)
    DEBUG: 2018/07/25 21:15:05 readContentStream: end
    DEBUG: 2018/07/25 21:15:05 LoadEncodedStreamContent: end: len(streamDictRaw)=1300
    DEBUG: 2018/07/25 21:15:05 saveDecodedStreamContent: begin decode=false
    DEBUG: 2018/07/25 21:15:05 dereferenceObject: end obj 21 of 22
    <<<
      <Length, 1300>
      <Subtype, XML>
      <Type, Metadata>
    >>>
    DEBUG: 2018/07/25 21:15:05 logStream: no stream content
    DEBUG: 2018/07/25 21:15:05 dereferenceObjects: end
    DEBUG: 2018/07/25 21:15:05 identifyRootVersion: begin
    DEBUG: 2018/07/25 21:15:05 dereferenceXRefTable: end
    DEBUG: 2018/07/25 21:15:05 readPDFFile: end
    INFO: 2018/07/25 21:15:05 validating
    DEBUG: 2018/07/25 21:15:05 *** validateXRefTable begin ***
    DEBUG: 2018/07/25 21:15:05 *** validateRootObject begin ***
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=Type
    DEBUG: 2018/07/25 21:15:05 validateNameEntry end: entry=Type
    DEBUG: 2018/07/25 21:15:05 validateResources: This page node has 1 pages
    DEBUG: 2018/07/25 21:15:05 validateRectangleEntry begin: entry=MediaBox
    DEBUG: 2018/07/25 21:15:05 validateNumberArrayEntry begin: entry=MediaBox
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=MediaBox
    DEBUG: 2018/07/25 21:15:05 dict=pageDict entry MediaBox is nil
    DEBUG: 2018/07/25 21:15:05 validateRectangleEntry begin: entry=CropBox
    DEBUG: 2018/07/25 21:15:05 validateNumberArrayEntry begin: entry=CropBox
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=CropBox
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry CropBox is nil
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=Rotate
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry Rotate is nil
    DEBUG: 2018/07/25 21:15:05 validatePagesDict: PageNode: (4 0 R)
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=BaseFont
    DEBUG: 2018/07/25 21:15:05 validateNameEntry end: entry=BaseFont
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=DescendantFonts
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry end: entry=DescendantFonts
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=Type
    DEBUG: 2018/07/25 21:15:05 validateNameEntry end: entry=Type
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=Subtype
    DEBUG: 2018/07/25 21:15:05 validateNameEntry end: entry=Subtype
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=BaseFont
    DEBUG: 2018/07/25 21:15:05 validateNameEntry end: entry=BaseFont
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=CIDSystemInfo
    DEBUG: 2018/07/25 21:15:05 validateDictEntry end: entry=CIDSystemInfo
    DEBUG: 2018/07/25 21:15:05 validateStringEntry begin: entry=Registry
    DEBUG: 2018/07/25 21:15:05 validateStringEntry end: entry=Registry
    DEBUG: 2018/07/25 21:15:05 validateStringEntry begin: entry=Ordering
    DEBUG: 2018/07/25 21:15:05 validateStringEntry end: entry=Ordering
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=Supplement
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry end: entry=Supplement
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=FontDescriptor
    DEBUG: 2018/07/25 21:15:05 validateDictEntry end: entry=FontDescriptor
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=FontName
    DEBUG: 2018/07/25 21:15:05 validateNameEntry end: entry=FontName
    DEBUG: 2018/07/25 21:15:05 validateStringEntry begin: entry=FontFamily
    DEBUG: 2018/07/25 21:15:05 dict=fdDict entry FontFamily is nil
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=FontStretch
    DEBUG: 2018/07/25 21:15:05 dict=fdDict entry FontStretch is nil
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=FontWeight
    DEBUG: 2018/07/25 21:15:05 dict=fdDict entry FontWeight is nil
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=Flags
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry end: entry=Flags
    DEBUG: 2018/07/25 21:15:05 validateRectangleEntry begin: entry=FontBBox
    DEBUG: 2018/07/25 21:15:05 validateNumberArrayEntry begin: entry=FontBBox
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=FontBBox
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry end: entry=FontBBox
    DEBUG: 2018/07/25 21:15:05 validateNumberArrayEntry end: entry=FontBBox
    DEBUG: 2018/07/25 21:15:05 validateRectangleEntry end: entry=FontBBox
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=ItalicAngle
    DEBUG: 2018/07/25 21:15:05 validateNumber begin
    DEBUG: 2018/07/25 21:15:05 validateNumber end 
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry end: entry=ItalicAngle
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=Ascent
    DEBUG: 2018/07/25 21:15:05 validateNumber begin
    DEBUG: 2018/07/25 21:15:05 validateNumber end 
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry end: entry=Ascent
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=Descent
    DEBUG: 2018/07/25 21:15:05 validateNumber begin
    DEBUG: 2018/07/25 21:15:05 validateNumber end 
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry end: entry=Descent
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=Leading
    DEBUG: 2018/07/25 21:15:05 dict=fdDict entry Leading is nil
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=CapHeight
    DEBUG: 2018/07/25 21:15:05 validateNumber begin
    DEBUG: 2018/07/25 21:15:05 validateNumber end 
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry end: entry=CapHeight
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=XHeight
    DEBUG: 2018/07/25 21:15:05 dict=fdDict entry XHeight is nil
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=StemV
    DEBUG: 2018/07/25 21:15:05 validateNumber begin
    DEBUG: 2018/07/25 21:15:05 validateNumber end 
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry end: entry=StemV
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=StemH
    DEBUG: 2018/07/25 21:15:05 dict=fdDict entry StemH is nil
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=AvgWidth
    DEBUG: 2018/07/25 21:15:05 validateNumber begin
    DEBUG: 2018/07/25 21:15:05 validateNumber end 
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry end: entry=AvgWidth
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=MaxWidth
    DEBUG: 2018/07/25 21:15:05 validateNumber begin
    DEBUG: 2018/07/25 21:15:05 validateNumber end 
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry end: entry=MaxWidth
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=MissingWidth
    DEBUG: 2018/07/25 21:15:05 validateNumber begin
    DEBUG: 2018/07/25 21:15:05 validateNumber end 
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry end: entry=MissingWidth
    DEBUG: 2018/07/25 21:15:05 validateStreamDictEntry begin: entry=FontFile2
    DEBUG: 2018/07/25 21:15:05 validateStreamDictEntry end: entry=FontFile2
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=Length1
    DEBUG: 2018/07/25 21:15:05 dict=fontFileStreamDict entry Length1 is nil
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=Length2
    DEBUG: 2018/07/25 21:15:05 dict=fontFileStreamDict entry Length2 is nil
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=Length3
    DEBUG: 2018/07/25 21:15:05 dict=fontFileStreamDict entry Length3 is nil
    DEBUG: 2018/07/25 21:15:05 validateStreamDictEntry begin: entry=Metadata
    DEBUG: 2018/07/25 21:15:05 dict=dict entry Metadata is nil
    DEBUG: 2018/07/25 21:15:05 validateStringEntry begin: entry=CharSet
    DEBUG: 2018/07/25 21:15:05 dict=fdDict entry CharSet is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=Style
    DEBUG: 2018/07/25 21:15:05 dict=fdDict entry Style is nil
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=Lang
    DEBUG: 2018/07/25 21:15:05 dict=fdDict entry Lang is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=FD
    DEBUG: 2018/07/25 21:15:05 dict=fdDict entry FD is nil
    DEBUG: 2018/07/25 21:15:05 validateStreamDictEntry begin: entry=CIDSet
    DEBUG: 2018/07/25 21:15:05 dict=fdDict entry CIDSet is nil
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=DW
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry end: entry=DW
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=W
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry end: entry=W
    DEBUG: 2018/07/25 21:15:05 validateNumberArray begin
    DEBUG: 2018/07/25 21:15:05 validateNumberArray end
    DEBUG: 2018/07/25 21:15:05 validateNumberArray begin
    DEBUG: 2018/07/25 21:15:05 validateNumberArray end
    DEBUG: 2018/07/25 21:15:05 validateNumberArray begin
    DEBUG: 2018/07/25 21:15:05 validateNumberArray end
    DEBUG: 2018/07/25 21:15:05 validateNumberArray begin
    DEBUG: 2018/07/25 21:15:05 validateNumberArray end
    DEBUG: 2018/07/25 21:15:05 validateNumberArray begin
    DEBUG: 2018/07/25 21:15:05 validateNumberArray end
    DEBUG: 2018/07/25 21:15:05 validateNumberArray begin
    DEBUG: 2018/07/25 21:15:05 validateNumberArray end
    DEBUG: 2018/07/25 21:15:05 validateNumberArray begin
    DEBUG: 2018/07/25 21:15:05 validateNumberArray end
    DEBUG: 2018/07/25 21:15:05 validateNumberArrayEntry begin: entry=DW2
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=DW2
    DEBUG: 2018/07/25 21:15:05 dict=CIDFontDict entry DW2 is nil
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=W2
    DEBUG: 2018/07/25 21:15:05 dict=CIDFontDict entry W2 is nil
    DEBUG: 2018/07/25 21:15:05 validateStreamDictEntry begin: entry=ToUnicode
    DEBUG: 2018/07/25 21:15:05 validateStreamDictEntry end: entry=ToUnicode
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=Type
    DEBUG: 2018/07/25 21:15:05 dict=xObjectStreamDict entry Type is nil
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=Subtype
    DEBUG: 2018/07/25 21:15:05 validateNameEntry end: entry=Subtype
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=Width
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry end: entry=Width
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=Height
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry end: entry=Height
    DEBUG: 2018/07/25 21:15:05 validateBooleanEntry begin: entry=ImageMask
    DEBUG: 2018/07/25 21:15:05 dict=imageStreamDict entry ImageMask is nil
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=BitsPerComponent
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry end: entry=BitsPerComponent
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=Intent
    DEBUG: 2018/07/25 21:15:05 dict=imageStreamDict entry Intent is nil
    DEBUG: 2018/07/25 21:15:05 validateNumberArrayEntry begin: entry=Decode
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=Decode
    DEBUG: 2018/07/25 21:15:05 dict=imageStreamDict entry Decode is nil
    DEBUG: 2018/07/25 21:15:05 validateBooleanEntry begin: entry=Interpolate
    DEBUG: 2018/07/25 21:15:05 dict=imageStreamDict entry Interpolate is nil
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=Alternates
    DEBUG: 2018/07/25 21:15:05 dict=imageStreamDict entry Alternates is nil
    DEBUG: 2018/07/25 21:15:05 validateStreamDictEntry begin: entry=SMask
    DEBUG: 2018/07/25 21:15:05 dict=imageStreamDict entry SMask is nil
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=SMaskInData
    DEBUG: 2018/07/25 21:15:05 dict=imageStreamDict entry SMaskInData is nil
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=Name
    DEBUG: 2018/07/25 21:15:05 dict=imageStreamDict entry Name is nil
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=StructParent
    DEBUG: 2018/07/25 21:15:05 dict=imageStreamDict entry StructParent is nil
    DEBUG: 2018/07/25 21:15:05 validateStringEntry begin: entry=ID
    DEBUG: 2018/07/25 21:15:05 dict=imageStreamDict entry ID is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=OPI
    DEBUG: 2018/07/25 21:15:05 dict=imageStreamDict entry OPI is nil
    DEBUG: 2018/07/25 21:15:05 validateStreamDictEntry begin: entry=Metadata
    DEBUG: 2018/07/25 21:15:05 dict=dict entry Metadata is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=OC
    DEBUG: 2018/07/25 21:15:05 dict=imageStreamDict entry OC is nil
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=Type
    DEBUG: 2018/07/25 21:15:05 validateNameEntry end: entry=Type
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=LW
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry LW is nil
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=LC
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry LC is nil
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=LJ
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry LJ is nil
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=ML
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry ML is nil
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=D
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry D is nil
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=RI
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry RI is nil
    DEBUG: 2018/07/25 21:15:05 validateBooleanEntry begin: entry=OP
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry OP is nil
    DEBUG: 2018/07/25 21:15:05 validateBooleanEntry begin: entry=op
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry op is nil
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=OPM
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry OPM is nil
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=Font
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry Font is nil
    DEBUG: 2018/07/25 21:15:05 validateFunctionEntry begin: entry=BG
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry BG is nil
    DEBUG: 2018/07/25 21:15:05 validateFunctionEntry begin: entry=UCR
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry UCR is nil
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=FL
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry FL is nil
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=SM
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry SM is nil
    DEBUG: 2018/07/25 21:15:05 validateBooleanEntry begin: entry=SA
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry SA is nil
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=CA
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry CA is nil
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=ca
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry ca is nil
    DEBUG: 2018/07/25 21:15:05 validateBooleanEntry begin: entry=AIS
    DEBUG: 2018/07/25 21:15:05 dict=extGStateDict entry AIS is nil
    DEBUG: 2018/07/25 21:15:05 validateBooleanEntry begin: entry=TK
    DEBUG: 2018/07/25 21:15:05 validateBooleanEntry end: entry=TK
    DEBUG: 2018/07/25 21:15:05 validateRectangleEntry begin: entry=MediaBox
    DEBUG: 2018/07/25 21:15:05 validateNumberArrayEntry begin: entry=MediaBox
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=MediaBox
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry end: entry=MediaBox
    DEBUG: 2018/07/25 21:15:05 validateNumberArrayEntry end: entry=MediaBox
    DEBUG: 2018/07/25 21:15:05 validateRectangleEntry end: entry=MediaBox
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=PieceInfo
    DEBUG: 2018/07/25 21:15:05 dict=pageDict entry PieceInfo is nil
    DEBUG: 2018/07/25 21:15:05 validateDateEntry begin: entry=LastModified
    DEBUG: 2018/07/25 21:15:05 dict=pageDict entry LastModified is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=AA
    DEBUG: 2018/07/25 21:15:05 dict=pageDict entry AA is nil
    DEBUG: 2018/07/25 21:15:05 validateRectangleEntry begin: entry=CropBox
    DEBUG: 2018/07/25 21:15:05 validateNumberArrayEntry begin: entry=CropBox
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=CropBox
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry CropBox is nil
    DEBUG: 2018/07/25 21:15:05 validateRectangleEntry begin: entry=BleedBox
    DEBUG: 2018/07/25 21:15:05 validateNumberArrayEntry begin: entry=BleedBox
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=BleedBox
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry BleedBox is nil
    DEBUG: 2018/07/25 21:15:05 validateRectangleEntry begin: entry=TrimBox
    DEBUG: 2018/07/25 21:15:05 validateNumberArrayEntry begin: entry=TrimBox
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=TrimBox
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry TrimBox is nil
    DEBUG: 2018/07/25 21:15:05 validateRectangleEntry begin: entry=ArtBox
    DEBUG: 2018/07/25 21:15:05 validateNumberArrayEntry begin: entry=ArtBox
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=ArtBox
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry ArtBox is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=BoxColorInfo
    DEBUG: 2018/07/25 21:15:05 dict=pageDict entry BoxColorInfo is nil
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=Rotate
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry Rotate is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=Group
    DEBUG: 2018/07/25 21:15:05 dict=pageDict entry Group is nil
    DEBUG: 2018/07/25 21:15:05 validateStreamDictEntry begin: entry=Thumb
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry Thumb is nil
    DEBUG: 2018/07/25 21:15:05 validateIndRefArrayEntry begin: entry=B
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=B
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry B is nil
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=Dur
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry Dur is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=Trans
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry Trans is nil
    DEBUG: 2018/07/25 21:15:05 validateStreamDictEntry begin: entry=Metadata
    DEBUG: 2018/07/25 21:15:05 dict=dict entry Metadata is nil
    DEBUG: 2018/07/25 21:15:05 validateIntegerEntry begin: entry=StructParents
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry StructParents is nil
    DEBUG: 2018/07/25 21:15:05 validateStringEntry begin: entry=ID
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry ID is nil
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=PZ
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry PZ is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=SeparationInfo
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry SeparationInfo is nil
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=Tabs
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry Tabs is nil
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=TemplateInstantiated
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry TemplateInstantiated is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=PresSteps
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry PresSteps is nil
    DEBUG: 2018/07/25 21:15:05 validateNumberEntry begin: entry=UserUnit
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry UserUnit is nil
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=VP
    DEBUG: 2018/07/25 21:15:05 dict=pagesDict entry VP is nil
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=Version
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry Version is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=Extensions
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry Extensions is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=Names
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry Names is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=Dests
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry Dests is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=ViewerPreferences
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry ViewerPreferences is nil
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=PageLayout
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry PageLayout is nil
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=PageMode
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry PageMode is nil
    DEBUG: 2018/07/25 21:15:05 validateIndRefEntry begin: entry=Outlines
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry Outlines is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=AA
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry AA is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=URI
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry URI is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=AcroForm
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry AcroForm is nil
    DEBUG: 2018/07/25 21:15:05 validateStreamDictEntry begin: entry=Metadata
    DEBUG: 2018/07/25 21:15:05 validateStreamDictEntry end: entry=Metadata
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=Type
    DEBUG: 2018/07/25 21:15:05 validateNameEntry end: entry=Type
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=SubType
    DEBUG: 2018/07/25 21:15:05 dict=metaDataDict entry SubType is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=StructTreeRoot
    DEBUG: 2018/07/25 21:15:05 dict=RootDict entry StructTreeRoot is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=MarkInfo
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry MarkInfo is nil
    DEBUG: 2018/07/25 21:15:05 validateStringEntry begin: entry=Lang
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry Lang is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=SpiderInfo
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry SpiderInfo is nil
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=OutputIntents
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry end: entry=OutputIntents
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=Type
    DEBUG: 2018/07/25 21:15:05 validateNameEntry end: entry=Type
    DEBUG: 2018/07/25 21:15:05 validateNameEntry begin: entry=S
    DEBUG: 2018/07/25 21:15:05 validateNameEntry end: entry=S
    DEBUG: 2018/07/25 21:15:05 validateStringEntry begin: entry=OutputCondition
    DEBUG: 2018/07/25 21:15:05 dict=outputIntentDict entry OutputCondition is nil
    DEBUG: 2018/07/25 21:15:05 validateStringEntry begin: entry=OutputConditionIdentifier
    DEBUG: 2018/07/25 21:15:05 validateStringEntry end: entry=OutputConditionIdentifier
    DEBUG: 2018/07/25 21:15:05 validateStringEntry begin: entry=RegistryName
    DEBUG: 2018/07/25 21:15:05 dict=outputIntentDict entry RegistryName is nil
    DEBUG: 2018/07/25 21:15:05 validateStringEntry begin: entry=Info
    DEBUG: 2018/07/25 21:15:05 dict=outputIntentDict entry Info is nil
    DEBUG: 2018/07/25 21:15:05 validateStreamDictEntry begin: entry=DestOutputProfile
    DEBUG: 2018/07/25 21:15:05 validateStreamDictEntry end: entry=DestOutputProfile
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=PieceInfo
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry PieceInfo is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=OCProperties
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry OCProperties is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=Permissions
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry Permissions is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=Legal
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry Legal is nil
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=Requirements
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry Requirements is nil
    DEBUG: 2018/07/25 21:15:05 validateDictEntry begin: entry=Collection
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry Collection is nil
    DEBUG: 2018/07/25 21:15:05 validateBooleanEntry begin: entry=NeedsRendering
    DEBUG: 2018/07/25 21:15:05 dict=rootDict entry NeedsRendering is nil
    DEBUG: 2018/07/25 21:15:05 validatePagesAnnotations: This page node has 1 pages
    DEBUG: 2018/07/25 21:15:05 validateArrayEntry begin: entry=Annots
    DEBUG: 2018/07/25 21:15:05 dict=pageDict entry Annots is nil
    DEBUG: 2018/07/25 21:15:05 *** validateRootObject end ***
    DEBUG: 2018/07/25 21:15:05 *** validateDocumentInfoObject begin ***
    DEBUG: 2018/07/25 21:15:05 freeList begin
    STATS: 2018/07/25 21:15:05 XRefTable:
    *************************************************************************************************
    HeaderVersion: 1.6
    has 1 pages
    XRefTable:
                         Size: 22
                  Root object: (1 0 R)
                  Info object: (2 0 R)
                    ID object: [<A428500E88C8CBAD76387BC06F087FB4> <A428500E88C8CBAD76387BC06F087FB4>]
    XRefTable with 22 entres:
        0: f   next=       0 generation=65535
        1:   offset=     568 generation=0 pdfcpu.PDFDict type=Catalog 
    <<
      <Metadata, (21 0 R)>
      <OutputIntents, [(17 0 R)]>
      <Pages, (3 0 R)>
      <Type, Catalog>
    >>
        2:   offset=  124700 generation=0 pdfcpu.PDFDict 
    <<
      <CreationDate, <nil>>
      <Creator, (\376\377\000o\000c\000r\000m\000y\000p\000d\000f\000 \0007\000.\0000\000.\0000\000 \000/\000 \000T\000e\000s\000s\000e\000r\000a\000c\000t\000 \000O\000C\000R\000-\000P\000D\000F\000 \0003\000.\0000\0005\000.\0000\0002)>
      <ModDate, (D:20180725191320+00'00')>
      <Producer, (GPL Ghostscript 9.23)>
    >>
        3:   offset=     509 generation=0 pdfcpu.PDFDict type=Pages 
    <<
      <Count, 1>
      <Kids, [(4 0 R)]>
      <Type, Pages>
    >>
        4:   offset=     334 generation=0 pdfcpu.PDFDict type=Page 
    <<
      <Contents, (5 0 R)>
      <MediaBox, [0 0 598 843]>
      <Parent, (3 0 R)>
      <Resources, <<
        <ExtGState, (13 0 R)>
        <Font, (15 0 R)>
        <ProcSet, [PDF ImageC Text]>
        <XObject, (14 0 R)>
      >>>
      <Type, Page>
    >>
        5:   offset=      15 generation=0 pdfcpu.PDFStreamDict 
    <<
      <Filter, FlateDecode>
      <Length, (6 0 R)>
    >>
        6:   offset=     315 generation=0 pdfcpu.PDFInteger 
    229
        7:   offset=     659 generation=0 pdfcpu.PDFDict type=ExtGState 
    <<
      <BM, Normal>
      <TK, true>
      <Type, ExtGState>
    >>
        8:   offset=     714 generation=0 pdfcpu.PDFDict 
    <<
      <Ordering, (Identity)>
      <Registry, (Adobe)>
      <Supplement, 0>
    >>
        9:   offset=  120057 generation=0 pdfcpu.PDFDict type=Font subType=Type0 
    <<
      <BaseFont, WWVJXR+GlyphLessFont>
      <DescendantFonts, [(10 0 R)]>
      <Encoding, Identity-H>
      <Subtype, Type0>
      <ToUnicode, (20 0 R)>
      <Type, Font>
    >>
       10:   offset=  119330 generation=0 pdfcpu.PDFDict type=Font subType=CIDFontType2 
    <<
      <BaseFont, WWVJXR+GlyphLessFont>
      <CIDSystemInfo, (8 0 R)>
      <CIDToGIDMap, (19 0 R)>
      <DW, 500>
      <FontDescriptor, (11 0 R)>
      <Subtype, CIDFontType2>
      <Type, Font>
      <W, [32 [500] 69 [500] 73 [500] 83 [500 500] 87 [500] 8216 [500] 8222 [500]]>
    >>
       11:   offset=  120194 generation=0 pdfcpu.PDFDict type=FontDescriptor 
    <<
      <Ascent, 1000>
      <AvgWidth, 500>
      <CapHeight, 1000>
      <Descent, 0>
      <Flags, 65569>
      <FontBBox, [0 0 500 1000]>
      <FontFile2, (18 0 R)>
      <FontName, WWVJXR+GlyphLessFont>
      <ItalicAngle, 0>
      <MaxWidth, 500>
      <MissingWidth, 500>
      <StemV, 75>
      <Type, FontDescriptor>
    >>
       12:   offset=     848 generation=0 pdfcpu.PDFStreamDict 
    <<
      <BitsPerComponent, 8>
      <ColorSpace, DeviceRGB>
      <Filter, DCTDecode>
      <Height, 1627>
      <Length, 118301>
      <Subtype, Image>
      <Width, 1154>
    >>
       13:   offset=     786 generation=0 pdfcpu.PDFDict 
    <<
      <R7, (7 0 R)>
    >>
       14:   offset=     816 generation=0 pdfcpu.PDFDict 
    <<
      <R12, (12 0 R)>
    >>
       15:   offset=  119300 generation=0 pdfcpu.PDFDict 
    <<
      <R9, (9 0 R)>
    >>
       16:   offset=  122061 generation=0 pdfcpu.PDFStreamDict 
    <<
      <Filter, FlateDecode>
      <Length, 2452>
      <N, 3>
    >>
       17:   offset=  124587 generation=0 pdfcpu.PDFDict type=OutputIntent 
    <<
      <DestOutputProfile, (16 0 R)>
      <OutputConditionIdentifier, (sRGB)>
      <S, GTS_PDFA1>
      <Type, OutputIntent>
    >>
       18:   offset=  120429 generation=0 pdfcpu.PDFStreamDict 
    <<
      <Filter, FlateDecode>
      <Length, 187>
    >>
       19:   offset=  119551 generation=0 pdfcpu.PDFStreamDict 
    <<
      <Filter, FlateDecode>
      <Length, 172>
    >>
       20:   offset=  119791 generation=0 pdfcpu.PDFStreamDict 
    <<
      <Filter, FlateDecode>
      <Length, 198>
    >>
       21:   offset=  120684 generation=0 pdfcpu.PDFStreamDict 
    <<
      <Length, 1300>
      <Subtype, XML>
      <Type, Metadata>
    >>
    
    Empty free list.
    
    Total pages: 1
    No font info available.
    
    No image info available.
    
    
    STATS: 2018/07/25 21:15:05 Timing:
    STATS: 2018/07/25 21:15:05 read                 :  0.012s  84.2%
    STATS: 2018/07/25 21:15:05 validate             :  0.002s  15.8%
    STATS: 2018/07/25 21:15:05 total processing time:  0.015s
    
    STATS: 2018/07/25 21:15:05 Original:
    STATS: 2018/07/25 21:15:05 File Size            : 123 KB (125628 bytes)
    STATS: 2018/07/25 21:15:05 Total Binary Data    : 120 KB (122839 bytes) 97.8%
    STATS: 2018/07/25 21:15:05 Total Text   Data    : 3 KB (2789 bytes)  2.2%
    
    Fatal: validateString: missing object
    github.com/hhrutter/pdfcpu/pkg/pdfcpu.validateString
      HOME/.go/src/github.com/hhrutter/pdfcpu/pkg/pdfcpu/validateObjects.go:980
    github.com/hhrutter/pdfcpu/pkg/pdfcpu.validateCreationDate
      HOME/.go/src/github.com/hhrutter/pdfcpu/pkg/pdfcpu/validateInfo.go:30
    github.com/hhrutter/pdfcpu/pkg/pdfcpu.validateDocumentInfoDict
      HOME/.go/src/github.com/hhrutter/pdfcpu/pkg/pdfcpu/validateInfo.go:88
    github.com/hhrutter/pdfcpu/pkg/pdfcpu.validateDocumentInfoObject
      HOME/.go/src/github.com/hhrutter/pdfcpu/pkg/pdfcpu/validateInfo.go:124
    github.com/hhrutter/pdfcpu/pkg/pdfcpu.ValidateXRefTable
      HOME/.go/src/github.com/hhrutter/pdfcpu/pkg/pdfcpu/validateXReftable.go:21
    github.com/hhrutter/pdfcpu/pkg/api.Validate
      HOME/.go/src/github.com/hhrutter/pdfcpu/pkg/api/api.go:85
    github.com/hhrutter/pdfcpu/pkg/api.Process
      HOME/.go/src/github.com/hhrutter/pdfcpu/pkg/api/process.go:37
    main.process
      HOME/.go/src/github.com/hhrutter/pdfcpu/cmd/pdfcpu/main.go:258
    main.main
      HOME/.go/src/github.com/hhrutter/pdfcpu/cmd/pdfcpu/main.go:114
    runtime.main
      /usr/local/Cellar/go/1.10.3/libexec/src/runtime/proc.go:198
    runtime.goexit
      /usr/local/Cellar/go/1.10.3/libexec/src/runtime/asm_amd64.s:2361
    validation error (try -mode=relaxed)
    github.com/hhrutter/pdfcpu/pkg/api.Validate
      HOME/.go/src/github.com/hhrutter/pdfcpu/pkg/api/api.go:87
    github.com/hhrutter/pdfcpu/pkg/api.Process
      HOME/.go/src/github.com/hhrutter/pdfcpu/pkg/api/process.go:37
    main.process
      HOME/.go/src/github.com/hhrutter/pdfcpu/cmd/pdfcpu/main.go:258
    main.main
      HOME/.go/src/github.com/hhrutter/pdfcpu/cmd/pdfcpu/main.go:114
    runtime.main
      /usr/local/Cellar/go/1.10.3/libexec/src/runtime/proc.go:198
    runtime.goexit
      /usr/local/Cellar/go/1.10.3/libexec/src/runtime/asm_amd64.s:2361
    

    2018-07-25-no-ocr.pdf

    bug 
    opened by tcurdt 15
  • import: support webp image format

    import: support webp image format

    I had an issue regarding importing an image to pdf because the format is not supported. This happens with some types of images that are screenshots from iPhones. Because the image is private, I would like to email that to you and not post it here. Once again, thank you very much for your effort in building this useful library and I hope you can help me with this.

    opened by TruongQToan 14
  • Add booklet option for nup

    Add booklet option for nup

    Hi there,

    This PR adds the option to make a booklet using nup. Booklets are useful for making zines or other small books where the pages are put together by folding. They are basically just 2-up (example) or 4-up (example) layouts, with some page reordering to make the folding work (and rotation to make the paper cutting easier, if using the 4-up version). We originally figured this out using a latex package - but wanted to make it work in pdfcpu.

    Happy to change things around if you have suggestions.

    opened by adamgreenhall 13
  • Relax validation for missing fontDescriptor.StemV and empty imageStreamDict.Intent

    Relax validation for missing fontDescriptor.StemV and empty imageStreamDict.Intent

    Recently I received a PDF file to update, unfortunately, the PDF file is protected against editing, but is open to copy and a solution found to edit the PDF file is to open in macOS app Preview and "export as PDF", which will create a "clone" of the original PDF file without the security against editing and edit the "clone":

    image

    Is it possible to clone a PDF file (open to copy) in pdfcpu (and the clone have full access) ?

    bug 
    opened by eduardonunesp 13
  • "zlib: invalid header"

    The PDF I tried was an image-based PDF (scanned document).

    Unfortunately I can't post the PDF file here, but maybe this will help:

    ERROR: 2017/09/21 09:56:29 read.go:1435: obj 10756: zlib: invalid header
    panic: runtime error: slice bounds out of range
    
    goroutine 1 [running]:
    github.com/hhrutter/pdfcpu/read.parseObjectStream(0xc4200c5050, 0x62b781, 0x30)
    	/home/southclaws/go/src/github.com/hhrutter/pdfcpu/read/read.go:250 +0xb42
    github.com/hhrutter/pdfcpu/read.decodeObjectStreams(0xc420088660, 0xc4200c5178, 0x1)
    	/home/southclaws/go/src/github.com/hhrutter/pdfcpu/read/read.go:1457 +0x7cc
    github.com/hhrutter/pdfcpu/read.dereferenceXRefTable(0xc420088660, 0x0, 0x0)
    	/home/southclaws/go/src/github.com/hhrutter/pdfcpu/read/read.go:1681 +0xbf
    github.com/hhrutter/pdfcpu/read.PDFFile(0x7ffd9f46d02d, 0x22, 0xc42008a380, 0xc420088660, 0x0, 0x0)
    	/home/southclaws/go/src/github.com/hhrutter/pdfcpu/read/read.go:1735 +0x2c1
    github.com/hhrutter/pdfcpu.Read(0x7ffd9f46d02d, 0x22, 0xc42008a380, 0x2, 0x2, 0x101000000000000)
    	/home/southclaws/go/src/github.com/hhrutter/pdfcpu/api.go:66 +0x43
    github.com/hhrutter/pdfcpu.readAndValidate(0x7ffd9f46d02d, 0x22, 0xc42008a380, 0xed15575bd, 0xffffffff005c1976, 0x707cc0, 0xc4200c53b8, 0x7ffd9f4bdbaf, 0xc4200c53c8, 0x100407d13, ...)
    	/home/southclaws/go/src/github.com/hhrutter/pdfcpu/api.go:183 +0x4c
    github.com/hhrutter/pdfcpu.readValidateAndOptimize(0x7ffd9f46d02d, 0x22, 0xc42008a380, 0xed15575bd, 0x5c1976, 0x707cc0, 0x722ae8, 0xc4200c55d0, 0x4bfba4, 0x1000000005e6960, ...)
    	/home/southclaws/go/src/github.com/hhrutter/pdfcpu/api.go:203 +0x7f
    github.com/hhrutter/pdfcpu.Optimize(0x7ffd9f46d02d, 0x22, 0xc420088330, 0x26, 0xc42008a380, 0x5e68a0, 0xc420088301)
    	/home/southclaws/go/src/github.com/hhrutter/pdfcpu/api.go:225 +0x8e
    github.com/hhrutter/pdfcpu.Process(0xc4200c5d48, 0xc420084d10, 0xc420088330)
    	/home/southclaws/go/src/github.com/hhrutter/pdfcpu/process.go:128 +0x98
    main.main()
    	/home/southclaws/go/src/github.com/hhrutter/pdfcpu/cmd/pdfcpu/main.go:404 +0xbfb
    
    opened by Southclaws 13
  • Remove annotations by type

    Remove annotations by type

    Overall, great work!

    Removing annotations is easy enough while attending the CLI session:

    $ pdfcpu annotations list <filepath>
    

    . . . take note of the object numbers . . .

    $ pdfcpu annotations remove <filepath> <space-delimited integers>
    

    But what if I don't know the object numbers and wish to include the CLI invocation in a shell script? I could try to parse the output from pdfcpu annotations list <filepath>, but as far as I can tell, there's no option to output JSON or XML, making the parsing of the text table(s) non-trivial.

    It would be nice to simply pass an entire category to remove. For example:

    # removes all popup annotations
    $ pdfcpu annotations remove <filepath> popup
    
    # removes all text annotations
    $ pdfcpu annotations remove <filepath> text
    
    # removes all link annotations
    $ pdfcpu annotations remove <filepath> link
    
    # remove multiple categories at once
    $ pdfcpu annotations remove <filepath> popup text
    

    Thank you for considering this small convenience feature.

    feature request 
    opened by afparsons 3
  •  Read: xRefTable failed: pdfcpu: can't find last xref

    Read: xRefTable failed: pdfcpu: can't find last xref

    Error api MargeAppenFile
    Read: xRefTable failed: pdfcpu: can't find last xref

    err := pdfcpu.MergeAppendFile([]string{ filepath.Join("./assets/pdf", "Demo1.pdf"), filepath.Join("./assets/pdf", "LAMP-pdf"), }, filepath.Join("./assets/pdf/mege-file","test.pdf"), nil)

    opened by ekowdd89 1
  • cli: read from stdin

    cli: read from stdin

    How can I configure the cli to read from stdin?

    For example, this command cat /path/to/file.pdf | pdfcpu info -pages 1- - returns with the error - needs extension ".pdf". instead of trying to read from stdin

    investigate 
    opened by mbrevda 4
  • Could not build Docker image (

    Could not build Docker image ("go.mod file not found in current directory or any parent directory")

    I am trying to build the Docker image but it fails like this:

    $ git clone https://github.com/pdfcpu/pdfcpu
    $ cd pdfcpu
    $ docker build -t pdfcpu-dev .
    Sending build context to Docker daemon  628.2MB
    Step 1/9 : FROM golang:latest as builder
    latest: Pulling from library/golang
    1671565cc8df: Pull complete 
    3e94d13e55e7: Pull complete 
    fa9c7528c685: Pull complete 
    53ad072f9cd1: Pull complete 
    dacb042d4b55: Pull complete 
    93eabe4e10f9: Pull complete 
    5c1723a88090: Pull complete 
    Digest: sha256:4c8f4b8402a868dc6fb3902c97032b971d0179fbe007be408b455697e98d194a
    Status: Downloaded newer image for golang:latest
     ---> 6d7adf071e0a
    Step 2/9 : RUN go get github.com/pdfcpu/pdfcpu/cmd/...
     ---> Running in a68085069449
    go: go.mod file not found in current directory or any parent directory.
    	'go get' is no longer supported outside a module.
    	To build and install a command, use 'go install' with a version,
    	like 'go install example.com/[email protected]'
    	For more information, see https://golang.org/doc/go-get-install-deprecation
    	or run 'go help get' or 'go help install'.
    The command '/bin/sh -c go get github.com/pdfcpu/pdfcpu/cmd/...' returned a non-zero code: 1
    

    Any idea?

    investigate 
    opened by ebousse 0
  • Validation error

    Validation error "dict=fdDict entry=Lang: unsupported in version 1.3"

    Hi, first of all, thank you for developing and maintaining this tool ๐Ÿ‘

    I've come across a validation error in one of PDF files which got into our system.

    Here's the stack trace from pdfcpu validate -vv pdf_error.pdf output.txt I am on commit bfaf786e1825

    Could you check if the validation can be relaxed as in other similar cases? Thanks

    investigate 
    opened by adamkral12 2
  • Can't navigate documentation, due to broken scrolling and lack of search.

    Can't navigate documentation, due to broken scrolling and lack of search.

    Thank you for submitting a possible bug!

    I'm trying to read the documentation to see what pdfcpu can do. This github project points to documentation here:

    https://pdfcpu.io/

    I am running Firefox 103 with various accessibility fixes. Among others, I use about:preferences to switch text to 20-point Andika.

    The Table of Contents on the linked page reaches "Annotations," with a bit poking up from another line, but no way to page down to reach it. If I mouse over "View the Project," it only reaches "Boxes."

    If I click on about, and start to scroll, it scrolls the right half of the page, but not the left, triggering yet another migraine. I realize this is becoming standard web design, but maybe it shouldn't be...?

    If I page down after going to About, this doesn't include a more complete table of contents, or any way to get past "Boxes."

    I can't find a search bar, either.

    investigate 
    opened by MarjaE2 2
Releases(v0.3.13)
  • v0.3.13(Nov 30, 2021)

    Hello, this release is all about PDF generation!

    tableย  json

    A new command interprets a JSON structure representing page declarations and renders PDF pages accordingly:

    pdfcpu create in.json [in.pdf] out.pdf
    

    in.json contains a page sequence with content composed of text, images, colored boxes, tables and more. Each content element follows a box model consisting of margin, border and padding and may define fonts and colors where appropriate. You may also set general page attributes like paper size, background color or your crop box and you may also define your page headers and footers.

    in.pdf if present, existing page content of in.pdf will be modified by appending to it.

    out.pdf is where rendered pages are written to.

    textbox

    How it works

    The way this command is setup allows for repeatedly adding content to a PDF. This fosters an incremental approach to PDF generation which may be during the design phase or in production.

    simplebox ย  imagebox

    Learning

    The best documentation for this command is the combination of the content of:

    If you are a Go developer you can play around with createFromJSON_test.go by modifying the JSON file and then executing the test which will give you immediate visual feedback by regenerating the corresponding result PDF.

    The JSON is self explanatory and I highly recommend working through all the examples!

    Many of the examples are multi page PDFs so make sure you don't miss anything!

    You will learn about

    • setting up your layout coordinate system
    • absolute vs. anchored positioning
    • inheritance of fonts, margin, border, padding
    • setting up your custom colors
    • setting up your resource dirs for imageBoxes
    • setting up pools for reused boxes, images and text
    • using guides throughout the layout process
    • how to highlight your crop box and content boxes

    Note

    Although this command allows for the modification of any PDF it works best for PDFs generated by pdfcpu itself.

    PDF Forms

    Eventually and this release is really the preparation you will be able to create your PDF forms with this command.

    To catch a glimpse of this effort have a look at:

    and again the corresponding PDF files in pkg/samples/create/

    You are welcome to experiment with form generation based on these form element samples but PDF form creation has NOT been released!

    ๐Ÿ™ Thanks everybody for submitting issues and PRs ๐Ÿ™

    Thank you for using pdfcpu ๐Ÿ’š

    Changelog

    e89570a Fix OS agnostic fileName resolving dc0561f Bump version 72e4e71 Relax validation for FontDescriptor Lang 9616d4b Add create cmd 3c08a45 Add Stefan Huber as contributor 92bfd3e Extend relaxed validation for CIDToGIDMap c3eb4c0 Fix #335, #358 ba9f089 Fix #349 281745f Fix #353 b80c13b Fix #354 64e3df6 Fix #356 5e1ae87 Fix #362 befba81 Fix #366 5a7da1d Fix #371 437ef37 Fix #380, #387 4adf70c Fix #381 0c4c829 Fix #386 af9e334 Fix #388 6509cea Fix #394 8837dd1 Fix io.Reader based encryption #372 ce70c15 Merge branch 'pr/signalwerk/360' into master 16f43aa stamping: Fix OCG reuse 7e1546b validate cmd: wildcard support

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(494 bytes)
    pdfcpu_0.3.13_Linux_i386.tar.xz(2.83 MB)
    pdfcpu_0.3.13_Linux_x86_64.tar.xz(3.10 MB)
    pdfcpu_0.3.13_macOS_x86_64.tar.xz(3.18 MB)
    pdfcpu_0.3.13_Windows_i386.zip(3.20 MB)
    pdfcpu_0.3.13_Windows_x86_64.zip(3.34 MB)
  • v0.3.12(Jul 12, 2021)

    This release is based on go1.16 and comes with two new commands and a wide array of improvements and fixes for both CLI and API:

    The new annotation handling supports listing, adding and removing annotations via the API and listing and removing annotations via the CLI:

    pdfcpu annotations list   [-p(ages) selectedPages] inFile
    pdfcpu annotations remove [-p(ages) selectedPages] inFile [objNr...]
    

    Image extraction was improved in several ways. There is support for cascaded filters and as of now pdfcpu also recognizes thumbnails. There is also a related command that prints a list of images for selected pages including available details:

    pdfcpu images list [-p(ages) selectedPages] inFile
    
    • The boxes and info command now include the effective page rotation and orientation.
    • You can now include links in your stamps using the url parameter.

    Using the API you can now generate your own bookmarks aka outline hierarchy. See more: bookmarks_test.go

    ๐Ÿ™ Thanks everybody for submitting issues and PRs ๐Ÿ™ There were lots of bugs fixed and PRs processed. Not all of the PRs were actually merged in, because of the state of things, but rest assured digested into the code base and honored under the contributors list on the README.md. Special thanks go to @petervwyatt and @kpym for their continued suggestions and valuable input.

    Changelog

    b911d21 info/boxes: add page rotation and orientation 6d519ce Add simple annotation handling 5b54825 Add stamps with links, Add annotation cmd b4ed6bb Embed config.yml cafccf8 Extract file writing fd08184 Extract images in memory 49c75a6 Fix #300, #323, #329, #336 b0c73af Fix #320 075feb9 Fix #322 7100142 Fix #324 680ae89 Fix #325 7a62cd0 Fix #326 e4890f2 Fix #330 694d519 Fix #331 c796f33 Fix #332 573ad83 Fix #333 2616a40 Fix #334, #342 662f7e8 Fix #350 f2aa684 Fix #335 19c3126 Fix #338 9fe5913 Fix #341 b8f382a Fix #343 c7d720b Fix #347 6c0ee1e Fix date validation f06c608 Fix rename err ac9adc6 Improve error context during validation 72223c3 Merge AcroForms 4ae05ab Merge branch 'extract-img-inmem' into master f189660 Simplify test

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(494 bytes)
    pdfcpu_0.3.12_Linux_i386.tar.xz(2.77 MB)
    pdfcpu_0.3.12_Linux_x86_64.tar.xz(3.01 MB)
    pdfcpu_0.3.12_macOS_x86_64.tar.xz(3.09 MB)
    pdfcpu_0.3.12_Windows_i386.zip(3.11 MB)
    pdfcpu_0.3.12_Windows_x86_64.zip(3.22 MB)
  • v0.3.11(Apr 5, 2021)

    This release introduces stamping/watermark support for right to left scripts such as Arabic, Hebrew, Persian or Urdu:

    Check out some samples at pdfcpu/pkg/samples/stamp/text/utf8 and the corresponding test at pdfcpu/pkg/api/test/stampUserFont_test.go

    โ— Since this is really a piggyback release don't forget to check the v0.3.10 release notes as well.

    Changelog

    956f29f Add right to left stamping

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(494 bytes)
    pdfcpu_0.3.11_Linux_i386.tar.xz(2.72 MB)
    pdfcpu_0.3.11_Linux_x86_64.tar.xz(2.95 MB)
    pdfcpu_0.3.11_macOS_x86_64.tar.xz(3.03 MB)
    pdfcpu_0.3.11_Windows_i386.zip(3.06 MB)
    pdfcpu_0.3.11_Windows_x86_64.zip(3.16 MB)
  • v0.3.10(Apr 4, 2021)

    Please skip this release and go get or download v0.3.11 (One commit that should have been part of this release did not make it)

    This release comes with the following

    Features

    1. (#287) When validating a PDF also check for any broken links by using the flag -l:
    pdfcpu val -l stellar-consensus-protocol.pdf
    validating(mode=relaxed) stellar-consensus-protocol.pdf ...
    validating URIs..
    ...................
    Page 30: http://www.neucoin.org/en/whitepaper/download severe error
    Page 31: http://tendermint.com/docs/tendermint.pdf status=404
    Page 31: https://technet.microsoft.com/en-us/library/security/2798897.aspx status=403
    validation error: broken links detected
    
    1. (#296) Generate multi folio booklets by using an extension to the booklet command. See also: https://www.instructables.com/How-to-bind-your-own-Hardback-Book/ Arrange pages of in.pdf 2 per sheetside as a sequence of folios covering 4*foliosize pages each:
    pdfcpu booklet -- "formsize:A4, multifolio:on" hardbackbook.pdf 2 in.pdf
    
    1. (#297) Provide symbols for including the current page number and/or the total page count in stamps/watermarks. Use %p for the current page number and %P for the page count like so:
    pdfcpu stamp add -mode text -- "Hello Gopher\nPage %p of %P" "" in.pdf
    
    1. (#301) pdfcpu import: Support for webp images

    2. (#295) pdfcpu import: add facility for color conversion by the following flags:

    gray converts to grayscale (on/off, true/false, t/f) during importing eg:

    pdfcpu import -- "gray:true" gray.pdf test.jpg 
    
       

    sepia applies a sepia effect (on/off, true/false, t/f) during importing:

    pdfcpu import -- "sepia:true" sepia.pdf test.jpg 
    
       

    Thanks ๐Ÿ’š

    We also have numerous bug fixes, improvements to the parser and pdfcpu commands. Thanks to all of you who submitted PRs and reported issues ๐Ÿ™

    Changelog

    0146aa1 Add Jan Baryla as contributors d384679 Add TheDiscordian as contributor 243395b Add basic action type validation bb5bf78 Add support for right to left user fonts 344367c Add user font samples for RTL scripts 098dc49 Also attach the test script 45ec49e Bump version 001bbc5 Cleanup bookmarks.go f73b610 Fix #273 9ed5add Fix #285 9d9c82c Fix #287 fa7867b Fix #293 da2c89a Fix #294 9fa39af Fix #295 53385b4 Fix #296 fb4d165 Fix #297 f0dcd27 Fix #298 6901fad Fix #299 58a5f8b Fix #301 65c027d Fix #303 220d0c9 Fix #305 3dc2ac9 Fix #307 f99879e Fix #311 9340137 Fix #313 47cbe19 Fix #316 5515273 Fix #319 c5482e8 Fix crop usage dce459e Fix shadingdict validation 7798e24 Handle bookmarks with nested GoTo Actions, without validation 26e7a96 Integrate #271 aa1acbd Merge-in branch 'handling-destless-bookmarks' 06dad62 Minor clean up 5ae9b75 Support recursive outline traversal - bookmarks have children 6561e57 wip

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(494 bytes)
    pdfcpu_0.3.10_Linux_i386.tar.xz(2.72 MB)
    pdfcpu_0.3.10_Linux_x86_64.tar.xz(2.95 MB)
    pdfcpu_0.3.10_macOS_x86_64.tar.xz(3.03 MB)
    pdfcpu_0.3.10_Windows_i386.zip(3.06 MB)
    pdfcpu_0.3.10_Windows_x86_64.zip(3.16 MB)
  • v0.3.9(Feb 13, 2021)

    Hello!

    This release features the new booklet command. A shout-out goes to Adam Greenhall for his idea and contribution.

    Booklet

    lets you arrange a sequence of pages onto larger sheets of paper for a small book or zine. You can also create your booklet out of a sequence of image files and optionally set the sheet background color and render guidelines for folding and cutting.

    Nup

    You can also now set the background color when using the nup command.

    Thanks ๐Ÿ’š

    There are many improvements to the parsing and validation of PDF files baked into this release.

    Special thanks for valuable input go to Peter Wyatt and Philipp Becker.

    Thanks to all of you who reported issues ๐Ÿ™

    Changelog

    6b4c2a4 Migrate CI to Github Actions 4532fa0 Fix #276 1a988ee Fix #280 f813979 Fix #285 1c5b5e7 Fix #288 9d7e483 Fix #290 0b0bae4 refactoring and adding tests (#291) 710bd81 Integrate booklet command (#279)

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(489 bytes)
    pdfcpu_0.3.9_Linux_i386.tar.xz(1.85 MB)
    pdfcpu_0.3.9_Linux_x86_64.tar.xz(2.03 MB)
    pdfcpu_0.3.9_macOS_x86_64.tar.xz(2.10 MB)
    pdfcpu_0.3.9_Windows_i386.zip(2.12 MB)
    pdfcpu_0.3.9_Windows_x86_64.zip(2.21 MB)
  • v0.3.8(Dec 24, 2020)

    Hello!

    This years' Xmas release introduces two new commands:

    The general focus of this release is handling PDF page boundaries:

    • Media Box
    • Crop Box
    • Trim Box
    • Bleed Box
    • Art Box

    Starting with this release existing pdfcpu commands like stamp, watermark, nup, grid and import now honour Media Box and Crop Box for selected pages where applicable.

    Also wherever applicable use your favourite display unit which is one of: points, mm, cm or inches. The default display unit is points in the PDF user space or whatever is defined by pdfcpu's config.yml located in pdfcpu's conf dir. Use the optional flag -u on the command line. Read more about Common Flags.

    Boxes

    The new boxes command allows the manipulation of page boundaries. List, add or remove page boundaries for selected pages:

    pdfcpu boxes list    [-p(ages) selectedPages] '[boxTypes]' inFile
    pdfcpu boxes add     [-p(ages) selectedPages] description  inFile [outFile]
    pdfcpu boxes remove  [-p(ages) selectedPages] 'boxTypes'   inFile [outFile]
    

    Read more about box descriptions.

    The following command sets an absolute Trim Box in user space and assigns it in turn to Bleed Box for page 2 only: pdfcpu box add -pages 2 'trim:[10 10 50 50], bleed:trim' in.pdf out.pdf

    Let's define a Crop Box expressed by a 1cm margin within the Media Box for all pages using the available command shortcuts: pdfcpu b a -u cm 'c:1' in.pdf out.pdf

    Crop

    The new crop command is a shortcut for pdfcpu boxes add 'crop:description' inFile [outFile]:

    pdfcpu crop [-p(ages) selectedPages] description inFile [outFile]
    
    • A box may be defined via absolute or relative positioning.
    • A relative position is expressed with respect to the applicable parent box.
    • The Media Box serves as the parent for Crop Box.
    • The Crop Box serves as the parent for Trim, Bleed and Art Boxes.

    Please refer to the PDF Specification 14.11.2 Page Boundaries for details.

    Crop a 500 x 500 points region with lower left corner in the origin: pdfcpu crop '[0 0 500 500]' in.pdf

    Crop relative to Media Box using a 20mm margin: pdfcpu crop -u mm '20' in.pdf

    Crop relative to Media Box using a 10% margin: pdfcpu crop '10%' in.pdf

    Merge

    Introducing the optional sort flag: pdfcpu merge [-m(ode) create|append] [-sort] outFile inFile...

    From now on you can ensure that files you want to merge are sorted alphabetically prior to merging.

    This may be useful in scenarios like: pdfcpu merge -sort out.pdf *.pdf

    Watermarks/Stamps

    One notable improvement to the api is a facility that lets you apply a mix of image, text and PDF watermarks in one go: Here the idea is to prepare a map of watermarks and then pass that on to the api. Depending on which level you are working (File, Reader or PDFContext based) there is a choice of:

    • func AddWatermarksMapFile(inFile, outFile string, m map[int]*pdfcpu.Watermark, conf *pdfcpu.Configuration) error
    • func AddWatermarksMap(rs io.ReadSeeker, w io.Writer, m map[int]*pdfcpu.Watermark, conf *pdfcpu.Configuration) error
    • func (ctx *Context) AddWatermarksMap(m map[int]*Watermark) error

    Check out some tests demonstrating this feature at stampVersatile_test.go.

    Thanks ๐Ÿ’š

    There are also numerous bug fixes as well as improvements to the initial parsing, reading and validation of PDF files. This means that all of you who have been tireless reporting validation errors and crashes ensure that with this release pdfcpu is capable of digesting an even bigger variety of PDF files coming from different sources.

    Special thanks go to Kroum Tzanev for his input and suggestions dealing with page boundaries on the CLI.

    This release is the result of all combined efforts by all of you who make up the small but fine pdfcpu community. Thank you so much and keep the issues coming..

    Changelog

    90dd9ab Fix #268 229c707 Fix #264, #265 8047d8c Add cli sort flag for merge, see PR #247 610b532 Fix #258 c282db5 #259 dbe4587 Fix #256 057a52e Fix #262 0e486a3 Fix #210, #216 cd73588 Fix #252 7139eb0 Fix #250 07b1917 Extend info cmd d4921f9 Fix #245 ad6c2cc Improve attachment handling 017c943 Add Benoit Kugler as contributor 4dee3f9 Fix #236 a2ddad1 Fix missing reader size d1b2230 Fix encoding handling for keywords, properties 0b3fcc7 Fix parsing errors 298e390 Fix #241 3e2e8d5 Fix #244 c780c6f Fix #244 ce70bec Fix #238

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(489 bytes)
    pdfcpu_0.3.8_Linux_i386.tar.xz(1.84 MB)
    pdfcpu_0.3.8_Linux_x86_64.tar.xz(2.02 MB)
    pdfcpu_0.3.8_macOS_x86_64.tar.xz(2.09 MB)
    pdfcpu_0.3.8_Windows_i386.zip(2.11 MB)
    pdfcpu_0.3.8_Windows_x86_64.zip(2.19 MB)
  • v0.3.7(Nov 4, 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-> ls Sim*
    [email protected] 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

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(489 bytes)
    pdfcpu_0.3.7_Linux_i386.tar.xz(1.80 MB)
    pdfcpu_0.3.7_Linux_x86_64.tar.xz(1.97 MB)
    pdfcpu_0.3.7_macOS_x86_64.tar.xz(2.04 MB)
    pdfcpu_0.3.7_Windows_i386.zip(2.06 MB)
    pdfcpu_0.3.7_Windows_x86_64.zip(2.14 MB)
  • v0.3.6(Sep 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

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(489 bytes)
    pdfcpu_0.3.6_Linux_i386.tar.xz(1.78 MB)
    pdfcpu_0.3.6_Linux_x86_64.tar.xz(1.95 MB)
    pdfcpu_0.3.6_macOS_x86_64.tar.xz(2.02 MB)
    pdfcpu_0.3.6_Windows_i386.zip(2.04 MB)
    pdfcpu_0.3.6_Windows_x86_64.zip(2.12 MB)
  • v0.3.5(Aug 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

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(586 bytes)
    pdfcpu_0.3.5_Linux_i386.tar.xz(2.06 MB)
    pdfcpu_0.3.5_Linux_x86_64.tar.xz(2.16 MB)
    pdfcpu_0.3.5_macOS_i386.tar.xz(2.14 MB)
    pdfcpu_0.3.5_macOS_x86_64.tar.xz(2.24 MB)
    pdfcpu_0.3.5_Windows_i386.zip(2.09 MB)
    pdfcpu_0.3.5_Windows_x86_64.zip(2.21 MB)
  • v0.3.4(Jun 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

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(622 bytes)
    pdfcpu_v0.3.4-next_Linux_i386.tar.xz(2.05 MB)
    pdfcpu_v0.3.4-next_Linux_x86_64.tar.xz(2.15 MB)
    pdfcpu_v0.3.4-next_macOS_i386.tar.xz(2.13 MB)
    pdfcpu_v0.3.4-next_macOS_x86_64.tar.xz(2.23 MB)
    pdfcpu_v0.3.4-next_Windows_i386.zip(2.08 MB)
    pdfcpu_v0.3.4-next_Windows_x86_64.zip(2.19 MB)
  • v0.3.3(May 25, 2020)

    This is a maintenance release featuring a couple of extensions for text based watermarking/stamping. Have a look at some examples.

    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."

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(586 bytes)
    pdfcpu_0.3.3_Linux_i386.tar.xz(2.03 MB)
    pdfcpu_0.3.3_Linux_x86_64.tar.xz(2.13 MB)
    pdfcpu_0.3.3_macOS_i386.tar.xz(2.11 MB)
    pdfcpu_0.3.3_macOS_x86_64.tar.xz(2.21 MB)
    pdfcpu_0.3.3_Windows_i386.zip(2.06 MB)
    pdfcpu_0.3.3_Windows_x86_64.zip(2.17 MB)
  • v0.3.2(Jan 4, 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

    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

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(594 bytes)
    pdfcpu_0.3.2_Darwin_i386.tar.gz(2.06 MB)
    pdfcpu_0.3.2_Darwin_x86_64.tar.gz(2.17 MB)
    pdfcpu_0.3.2_Linux_i386.tar.gz(1.98 MB)
    pdfcpu_0.3.2_Linux_x86_64.tar.gz(2.09 MB)
    pdfcpu_0.3.2_Windows_i386.tar.gz(2.01 MB)
    pdfcpu_0.3.2_Windows_x86_64.tar.gz(2.13 MB)
  • v0.3.1(Dec 9, 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

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(594 bytes)
    pdfcpu_0.3.1_Darwin_i386.tar.gz(2.03 MB)
    pdfcpu_0.3.1_Darwin_x86_64.tar.gz(2.14 MB)
    pdfcpu_0.3.1_Linux_i386.tar.gz(1.96 MB)
    pdfcpu_0.3.1_Linux_x86_64.tar.gz(2.06 MB)
    pdfcpu_0.3.1_Windows_i386.tar.gz(1.97 MB)
    pdfcpu_0.3.1_Windows_x86_64.tar.gz(2.09 MB)
  • v0.3(Nov 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.

    Source code(tar.gz)
    Source code(zip)
    pdfcpu_0.3_checksums.txt(382 bytes)
    pdfcpu_0.3_darwin_386.tar.gz(1.84 MB)
    pdfcpu_0.3_darwin_amd64.tar.gz(1.94 MB)
    pdfcpu_0.3_linux_386.tar.gz(1.77 MB)
    pdfcpu_0.3_linux_amd64.tar.gz(1.87 MB)
  • v0.2.5(Sep 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

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(594 bytes)
    pdfcpu_0.2.5_Darwin_i386.tar.gz(1.85 MB)
    pdfcpu_0.2.5_Darwin_x86_64.tar.gz(1.96 MB)
    pdfcpu_0.2.5_Linux_i386.tar.gz(1.77 MB)
    pdfcpu_0.2.5_Linux_x86_64.tar.gz(1.87 MB)
    pdfcpu_0.2.5_Windows_i386.tar.gz(1.79 MB)
    pdfcpu_0.2.5_Windows_x86_64.tar.gz(1.90 MB)
  • v0.2.4(Aug 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

    Source code(tar.gz)
    Source code(zip)
    checksums.txt(594 bytes)
    pdfcpu_0.2.4_Darwin_i386.tar.gz(1.84 MB)
    pdfcpu_0.2.4_Darwin_x86_64.tar.gz(1.95 MB)
    pdfcpu_0.2.4_Linux_i386.tar.gz(1.76 MB)
    pdfcpu_0.2.4_Linux_x86_64.tar.gz(1.86 MB)
    pdfcpu_0.2.4_Windows_i386.tar.gz(1.78 MB)
    pdfcpu_0.2.4_Windows_x86_64.tar.gz(1.89 MB)
  • v0.2.1(Jul 15, 2019)

    The focus of this release is pdfcpu's API.

    1. The API was redesigned. There are 2 layers:
    • Interface based layer
    • File based layer

    The file based layer is used by pdfcpu's CLI. The interface layer (based on io.ReadSeeker/io.Writer) is for backend integration.

    All CLI commands call into the interface layer and if you go to GoDoc there are examples included for most of the API calls .

    1. The new pdfcpu info command prints out all known info about a PDF file.

    2. The pdfcpu command line features a new quiet mode flag (-quietor -q)which suppresses output to the stdOut. This feature is aimed at batch processing.

    3. Bugfixes: #87,#89-#93

    Thanks for all bug reports and for using pdfcpu! ๐Ÿ’š

    Source code(tar.gz)
    Source code(zip)
  • v0.2(Jul 14, 2019)

    The focus of this release is pdfcpu's API.

    1. The API was redesigned. There are 2 layers:
    • Interface based layer
    • File based layer

    The file based layer is used by pdfcpu's CLI. The interface layer (based on io.ReadSeeker/io.Writer) is for backend integration.

    All CLI commands call into the interface layer and if you go to GoDoc there are examples included for most of the API calls .

    1. The new pdfcpu info command prints out all known info about a PDF file.

    2. The pdfcpu command line features a new quiet mode flag (-quietor -q)which suppresses output to the stdOut. This feature is aimed at batch processing.

    3. Bugfixes: #87,#89-#91

    Thanks for all bug reports and for using pdfcpu! ๐Ÿ’š

    Source code(tar.gz)
    Source code(zip)
  • v0.1.25(Jun 17, 2019)

    This is a follow-up bugfix release to v0.1.24

    Fixes: #88

    When executing pdfcpu encrypt there is a new check ensuring the owner password is set and is not empty. The implementation of this check had a bug (#88) Thanks @guanwenbogit for discovering this!

    Source code(tar.gz)
    Source code(zip)
  • v0.1.24(Jun 16, 2019)

  • v0.1.23(Mar 30, 2019)

    This release is an important bugfix release.

    Everybody is encouraged to upgrade.

    Fixed are:

    • #27 - Link Annotations are now preserved after merging.
    • #61 - Multiline Stamps/Watermarks are now supported (use \n in the description string).
    • #63 - The TIFF Writer returns an error now when called with unsupported compression types.
    Source code(tar.gz)
    Source code(zip)
  • v0.1.22(Mar 25, 2019)

    This release comes packed with the following features:

    • Support for go 1.10, 1.11, 1.12
    • Support for Go Modules
    • Command completion for the CLI

    Two new commands will make your life easier:

    • pages insert inserts blank pages before selected pages or all pages if -pages is not present
    • pages remove removes all selected pages

    The following has been fixed: #64, #65, #68, #69

    pdfcpu.io is live!

    Thanks for all the valuable suggestions by the community! ๐Ÿ’š

    Source code(tar.gz)
    Source code(zip)
  • v0.1.21(Jan 13, 2019)

    This release features two new commands:

    • N-up rearranges pages/images into grid page layout for reduced number of pages
    • Grid rearranges pages/images into grid page layout for enhanced browsing experience

    Fixes: #51, #58

    Have fun! ๐Ÿ’š

    Source code(tar.gz)
    Source code(zip)
  • v0.1.20(Dec 22, 2018)

    This release provides the following two new commands:

    • Import
    • Rotate

    The Import command converts images to PDF or creates a PDF photo album tailored to your specific needs:

    Create a quick single page PDF containing an image: pdfcpu import photo.pdf photo.png By using the implied default positioning parameter p:full the page size is going to be equal to the image size.

    Generate a PDF gallery of image files assuming the folder pics contains jpg,png or tif files only: pdfcpu import album.pdf pics/*

    Generate a PDF gallery of image files each of them centered on its page with the default relative scaling 0.5: pdfcpu import 'p:c' album.pdf pics/*

    The following command also generates a PDF gallery but additionally configures the Letter output format and positioning anchored to the bottom left corner with a horizontal offset of 10 and a vertical offset of 15 points in PDF user space with a scaling of 0.3 relative to page dimensions: pdfcpu import 'f:Letter, p:bl, o:10 20, s:0.3' album.pdf *.jpg

    Import will create the output file if it does not exist otherwise it will append the new pages to an existing PDF.
    This feature enables to append the gallery to a prepared cover page. Please refer to pdfcpu help import for details about this command.

    The Rotate command rotates selected pages clockwise by a multiple of 90 degrees:

    Rotate all pages clockwise by 90 degrees: pdfcpu rotate test.pdf 90

    Rotate the first two pages counter clockwise by 90 degrees: pdfcpu rotate -pages 1-2 -90

    Please refer to pdfcpu help rotate for details about this command.

    Source code(tar.gz)
    Source code(zip)
  • v0.1.19(Dec 9, 2018)

    • JPEG support across the board for watermarking, stamping and image extraction.
    • Extended split functionality now supporting a span parameter. (span=1 results in single-page PDFs)
    • API console output is now using a Logger that can be disabled for embedded projects.
    • Setup Code of Conduct & simple CLA.
    • Setup contributor honoring.
    • Fixed #52, #53, #54, #56
    Source code(tar.gz)
    Source code(zip)
  • v0.1.18(Nov 13, 2018)

    • Extended API to support webserver scenarios using Readseeker and Writer.
    • Support for watermarking/stamping with a specific page of another PDF file.
    • Extended logging into horizontal (Info, Debug, Trace etc.) vs. vertical logging (Read, Validate, Write etc).
    • The CLI will produce regular logging if you use -verbose, or -v.
    • The CLI will produce verbose logging if you use -vv.
    • More tests in api/process_test.go
    • More examples in api/example_test.go
    • More scripts under _scripts/*
    • Fixed #5, #39, #44
    Source code(tar.gz)
    Source code(zip)
  • v0.1.17(Oct 26, 2018)

    • Improved support for the CCITTFaxDecode filter.
    • Supported is the decoding of CCITTGroup 4 compressed data (for K<0)
    • Supported is also the 1D decoding of CCITTGroup 3 compressed data (for K=0)
    • CCITT Group3 2D(mixed) decoding is pending available test images (K>0).
    • pdfcpu now extracts group 3 and 4 encoded black and white images to PNG.
    • pdfcpu's tiff reader is also supporting CCITT group 3-1D and group 4 encoded images as of this release.
    Source code(tar.gz)
    Source code(zip)
  • v0.1.16(Oct 20, 2018)

    • Introducing preliminary support for the CCITTFaxDecode filter.
    • Supported is the decoding of CCITTGroup 4 compressed data (K < 0) - encoding and group 3 support yet to come.
    • pdfcpu now extracts group 4 compressed black and white images to PNG.
    • pdfcpu's tiff reader is also supporting group 4 compressed images as of this release.
    • #38 extraction of metadata: pdfcpu extract -mode meta extracts optional XML metadata.
    • Refactored package structure.
    • Bugfixes #40, #41.
    Source code(tar.gz)
    Source code(zip)
goldmark-pdf is a renderer for goldmark that allows rendering to PDF.

A PDF renderer for the goldmark markdown parser.

Stephen Afam-Osemene 88 Aug 27, 2022
File Processor in Concurrency Pattern using Golang goroutine.

File Processor in Concurrency Pattern Implement a file processor solution in concurrency pattern using Golang goroutine. Get Started Run docker-compos

null 2 Sep 16, 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.7k Sep 21, 2022
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 133 Sep 17, 2022
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 155 Sep 7, 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 Sep 4, 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
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 4k Sep 24, 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
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
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 124 Aug 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
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 79 Aug 7, 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 155 Sep 24, 2022
Goful is a CUI file manager written in Go.

Goful Goful is a CUI file manager written in Go. Works on cross-platform such as gnome-terminal and cmd.exe. Displays multiple windows and workspaces.

anmitsu 288 Sep 11, 2022
Encrypted overlay filesystem written in Go

An encrypted overlay filesystem written in Go. Official website: https://nuetzlich.net/gocryptfs (markdown source). gocryptfs is built on top the exce

null 2.5k Sep 24, 2022
goelftools is library written in Go for parsing ELF file.

goelftools goelftools is library written in Go for parsing ELF file. This library is inspired by pyelftools and rbelftools. Motivation The motivation

null 27 Aug 14, 2022