Git Product home page Git Product logo

pdfcpu's Introduction

pdfcpu: a Go PDF processor

Open in Visual Studio Code 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).

Support for PDF 2.0 is basic and ongoing work.

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 primary emphasis is on providing robust assistance for batch processing and scripting through a comprehensive command-line interface. Simultaneously, pdfcpu aims to simplify the integration of PDF processing into your Go-based backend system by offering a versatile set of commands.

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 Go Modules

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

or directly through Go install:

$ go install github.com/pdfcpu/pdfcpu/cmd/pdfcpu@latest

Using Homebrew (macOS)

$ brew install pdfcpu
$ pdfcpu version

Using DNF/YUM (Fedora)

$ sudo dnf install golang-github-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 /app/pdfs/a.pdf

Contributing

What

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

How

  • The pdfcpu discussion board is open! Please engage in any form helpful for the community.
  • 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

Adam Greenhall

moritamori

JanBaryla

TheDiscordian

Rafael Garcia Argente

truyet

Christian Nicola

Benjamin Krill

Peter Wyatt

Kroum Tzanev

Stefan Huber

Juan Iscar

Eng Zer Jun

Dmitry Ivanov

Rene Kaufmann

Christian Heusel

Chris

Lukasz Czaplinski

Joel Silva Schutz

semvis123

guangwu

Yoshiki Nakagawa

Steve van Loben Sels

Yaofu

vsenko

Alexis Hildebrandt

Sivukhin Nikita

Joachim Bauch

kalimit

Andreas Erhard

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

pdfcpu's People

Contributors

adamgreenhall avatar afh avatar benoitkugler avatar cewitte avatar christian-heusel avatar dharnitski avatar fale avatar fancycode avatar haldyr avatar henrixapp avatar hhrutter avatar jozuenoon avatar juneezee avatar kalimit avatar matbur avatar mbrevda avatar rgargente avatar richardwilkes avatar roromix avatar ryarnyah avatar schicho avatar semvis123 avatar signalwerk avatar simepel avatar sivukhin avatar stevevls avatar ungerik avatar vmorozov-wh avatar yyoshiki41 avatar zaneli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdfcpu's Issues

split pdf into n pages

Right now splitting generates a pdf per page.

pdfcpu split ~/test.pdf ~/

I'd like to split the pdf into 2 pages per split.
I am wondering if I am missing something or whether that's just not supported.

UTF-8 Support

Does this library supports UTF-8? Looking for pdf generator which supports Chinese characters.

Thanks & Rgds,
Nanthini

Image conversion to PDF using GraphicsMagick

GraphicsMagick generates 1.2 pdf and they fail using pdfcpu with error dereferenceObject: problem dereferencing object 11: parse: corrupt name object. The files work fine everywhere I have tried them
Do you support back version of pdf?
Don French

Getting the Page Count

I am struggling a little with the API. All feels quite low level.
My goal is to just figure out the number of pages of a PDF.

Got some pointers?

Would also make a nice little example for the API usage.

PDF Form filling

Any plans for PDF form filling? PDF "flattening" would be a nice feature to go along with that.

Thanks!

Add PageCount example

This is a great package. Thanks for building this.

I have a quick request: is it possible for you to add an example of how to get PageCount for a given PDF?

Correct update of the ID array for file identification

Ensure proper updating of the trailer dict ID entry.

  • the first entry( element 0) identifies the original document.
  • the second entry (element 1) identifies a modified/updated document.

Any processing of a PDF that results in another PDF has to generate the ID array entry such that:

  • element 0 is a copy from the original document
  • element 1 is a new calculated MD5 hash as per the rules of the PDF spec.

PDF Export to Image

Hey,

Thanks for this amazing library.

I wanted to know if there is any way to export/convert the PDF to an image (jpeg/png) currently using this package. I have a use case where it would be really helpful. I am looking for an alternative to solutions like running Ghostscript (Imagemagick) and libpoppler which can do this conversion. I can perform all other things for my use using pdfcpu but the final step to convert the pdf to an image seems to be missing, for which I need to rely on popping to the shell. Maybe I missed it in the docs, if it is not available, is there any way to implement this? I would be happy to contribute writing this feature. I also think it would be useful to other users.

parse trailer

scanTrailerDict() would get error ”unterminated dictionary“ when the trailer content like "trailer
<< /DecodeParms <</Columns 5 /Predictor 12>> /Size 126989 ........ >>.
it only get the truncation "<< /DecodeParms <</Columns 5/Predictor 12>>"....

Entry OCGs missing

I had tried to extract the images from this file
and get an error. The following is the trace from debug.

DEBUG: 2018/05/16 21:22:18 validateIndRefArrayEntry begin: entry=OCGs
DEBUG: 2018/05/16 21:22:18 validateArrayEntry begin: entry=OCGs
Fatal: dict=optContentPropertiesDict required entry=OCGs missing
github.com/hhrutter/pdfcpu.(*PDFDict).Entry
/src/go/src/github.com/hhrutter/pdfcpu/dict.go:87
github.com/hhrutter/pdfcpu.validateArrayEntry
/src/go/src/github.com/hhrutter/pdfcpu/validateObjects.go:54
github.com/hhrutter/pdfcpu.validateIndRefArrayEntry
/src/go/src/github.com/hhrutter/pdfcpu/validateObjects.go:452
github.com/hhrutter/pdfcpu.validateOCProperties
/src/go/src/github.com/hhrutter/pdfcpu/validateOptionalContent.go:396
github.com/hhrutter/pdfcpu.validateRootObject
/src/go/src/github.com/hhrutter/pdfcpu/validateXReftable.go:888
github.com/hhrutter/pdfcpu.validateXRefTable
/src/go/src/github.com/hhrutter/pdfcpu/validateXReftable.go:15
github.com/hhrutter/pdfcpu.readAndValidate
/src/go/src/github.com/hhrutter/pdfcpu/api.go:184
github.com/hhrutter/pdfcpu.readValidateAndOptimize
/src/go/src/github.com/hhrutter/pdfcpu/api.go:195
github.com/hhrutter/pdfcpu.ExtractImages
/src/go/src/github.com/hhrutter/pdfcpu/api.go:626
github.com/hhrutter/pdfcpu.Process
/src/go/src/github.com/hhrutter/pdfcpu/process.go:41
main.process
/src/go/src/github.com/hhrutter/pdfcpu/cmd/pdfcpu/main.go:257
main.main
/src/go/src/github.com/hhrutter/pdfcpu/cmd/pdfcpu/main.go:113
runtime.main
/usr/lib/go-1.10/src/runtime/proc.go:198
runtime.goexit
/usr/lib/go-1.10/src/runtime/asm_amd64.s:2361

提取PDF文本

请问如何提取PDF文件的内容?ExtractContent方法是dumps "PDF source"?那么如何提取文本格式的内容呢?谢谢!

LZWDecode filter not working

In order to make the LZWDecode filter work and respect the EarlyChange parameter we need to find a way to marry the already existing tiff lzw reader in the experimental golang.org/x/image/tiff repo with compress/lzw. Extending compress/lzw would be the ideal solution for any pdf package.

replacing text in a PDF

Seems i have a similar need to the InProgress pull request
#1

I just want to walk the PDF and replaces the Text

my uses case is that i have these 2D CAD drawings with text in them and need to Translate the text producing a new PDF.

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.) ?

AcroForms support

There is a reference to AcroForms in the test PDF code but is their a way for me to populate a fillable PDF with data programmatically? I already have a bunch of fillable PDFs but was hoping to use Go and not something like Apache PDFBox (Java) to accomplish this. I also can't use something like PDFtk because of licensing.

Adding Documentation

I was looking through the code base and I'd like to add more documentation for anyone who'd like to contribute in the future. Plus, I think it'd give me a much better understanding of the code base in general.

Image optimization

Is there any functionality to easily replace images in pdfs?

I'm thinking extract images -> run through jpg size optimizer (eg. mozjpeg) -> replace source image in PDF in order to further optimize PDF size.

The extraction is straightfoward obviously, unsure about replacing. I'm beginning to dig through the golang code but I'm not very familiar with the language. Do you have a simple way in mind? If not, I guess I found the excuse I've been looking for to learn Go...

Error when merging file

Having error, when trying to merge pdf files into 1

dereferenceObject: problem dereferencing object 7: parse: duplicate key

  _, err = pdfcpu.Process(pdfcpu.MergeCommand(filePaths, baseDir+".pdf", pdfcputypes.NewDefaultConfiguration()))

UPD: Pdf files were generated by electron

General ToDo list

@campoy

  • Review Interface in filters package
  • Substantial conversions between string and []byte => excessive memory allocation?
  • Make fit for actual usage as library.

Question/Feature: Unpacking CSV file from encrypted PDF file using UserPW?

Hi @hhrutter ,

I receive bank statement in CSV format. As they can't put a password for CSV file, they embed CSV file inside a PDF file and put a user password for PDF file and send it via email.

My job is to fetch this email and extract PDF file and then unpack CSV file from this pdf and save it to DB.

Currently i follow below steps:

  1. Fetch email attachment
  2. Decrypt PDF file using qpdf
    $ qpdf --decrypt --password=myUserPassword inputPdfFile decryptedFile
  3. Unpack CSV file using pdftk
    $ pdftk decryptedFile unpack_files output folder
  4. Push CSV file to DB

Can i do step 2 & 3 using pdfcpu?

I have tried step2 using pdfCPU but i am getting below error

Read failed.: ownerpw not ok and insufficient access permissions

I don't have ownerpw as banks won't share it. I have only userpw.
Is it possible to decrypt pdffile without ownerpw like in qpdf where i use just userpw?

Also any plans to support unpack_files option?

Thanks for this wonderful package. I really love it. Currently i am using this for merging pdf files.

Remove reliance on files as much as possible

You should use io.Reader and io.Writer as much as possible to make your library usable in multiple scenarios.

Also for extraction, leave out the file naming and what to do with the exracted content to the library user.

Here is how I managed to do it for Image extraction:

// PDFImageType describe the image file extension
type PDFImageType string

const (
	// JPG jpeg image
	JPG PDFImageType = ".jpg"
	// JPX jpx image
	JPX PDFImageType = ".jpx"
)

// PDFImage provides the content and image format by its extension
type PDFImage struct {
	Body []byte
	Name string
	Type PDFImageType
}

// ExtractImages extracts images to a channel
func ExtractImages(ctx *types.PDFContext, out chan (PDFImage)) {
	for _, i := range sortIOKeys(ctx.Optimize.ImageObjects) {
		ExtractImage(ctx.Optimize.ImageObjects[i], out)
	}
	close(out)
}

// ExtractImage sends image body, ressource name and type to a channel
func ExtractImage(obj *types.ImageObject, out chan (PDFImage)) {
	imageDict := obj.ImageDict

	fp := imageDict.FilterPipeline

	if fp != nil {
		// Ignore imageMasks
		if im := imageDict.BooleanEntry("ImageMask"); im != nil && *im {
			return
		}

		switch fp[0].Name {
		case "DCTDecode":
			out <- PDFImage{Body: imageDict.Raw, Name: obj.ResourceNamesString(), Type: JPG}
		case "JPXDecode":
			out <- PDFImage{Body: imageDict.Raw, Name: obj.ResourceNamesString(), Type: JPX}
		}
	}
}

And then I use it like this:

	var err error
	config := types.NewDefaultConfiguration()
	config.DecodeAllStreams = false

	ctx, err := read.PDFFile("data/somefile.pdf", config)
	if err != nil {
		panic(err)
	}

	err = validate.XRefTable(ctx.XRefTable)
	if err != nil {
		panic(err)
	}

	err = optimize.XRefTable(ctx)
	if err != nil {
		panic(err)
	}

	images := make(chan (pdfextract.PDFImage))
	go pdfextract.ExtractImages(ctx, images)
	for img := range images {
		log.Println(img.Name + string(img.Type))
		// Here you could save the images to files, put them on an object store like S3 or Openstack Swift, resize, crop...
	}

.pdf extension requirement should be case insensitive

I have a pdf with the file extension ".PDF" and was given the output that the file needs extension ".pdf". It's a simple work around to make it work, but the file is properly a pdf so it would be nice if the tool "just worked."

Help message for extract wrong (gives validate text)

Great work @hhrutter - thank you.

I just came upon this minor cosmetic bug as I began to explore the package & thought I should report it.

$ pdfcpu help extract
usage: pdfcpu validate [-verbose] [-mode strict|relaxed] [-upw userpw] [-opw ownerpw] inFile

Validate checks inFile for specification compliance.

verbose ... extensive log output
   mode ... validation mode
    upw ... user password
    opw ... owner password
 inFile ... input pdf file

The validation modes are:

 strict ... (default) validates against PDF 32000-1:2008 (PDF 1.7)
relaxed ... like strict but doesn't complain about common seen spec violations.

"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

producer is empty

I have PDF starting like this

%PDF-1.4
%<B7><BE><AD><AA>
1 0 obj
<<
/Type /Catalog
/Pages 2 0 R
>>
endobj
2 0 obj
<<
/Type /Pages
/Kids [ 6 0 R ]
/Count 1
>>
endobj
3 0 obj
<<
/Producer (Haru Free PDF Library 2.3.0RC2)
>>
endobj
4 0 obj
<<
/Length 5 0 R
/Type /XObject
/Subtype /Image
/Height 1461
/Width 1037
/ColorSpace /DeviceRGB
/BitsPerComponent 8
/Filter [ /DCTDecode ]

And I was trying to read some of the header information like this:

	config := pdfcpu.NewDefaultConfiguration()

	ctx, err := pdfcpu.ReadPDFFile(path, config)
	if err != nil {
		return errors.Wrapf(err, "failed to read file")
	}

	// err = pdfcpu.ValidateXRefTable(ctx.XRefTable)
	// if err != nil {
	// 	return errors.Wrapf(err, "failed to validate xref table")
	// }

	fmt.Printf("version: %s\n", ctx.XRefTable.VersionString())
	fmt.Printf("author: %s\n", ctx.XRefTable.Author)
	fmt.Printf("creator: %s\n", ctx.XRefTable.Creator)
	fmt.Printf("producer: %s\n", ctx.XRefTable.Producer)

But no matter whether I validate first or not the Producer field is empty.
I would have expected it to be Haru Free PDF Library 2.3.0RC2.
What am I missing?

Failure to open PDF created by Xerox WorkCentre 7225 scanner

Attempting to read a PDF generated by a Xerox WorkCentre 7225 scanner results in the following error:

Error reading the pdf: Read failed.: dereferenceObject: problem dereferencing object 6: pdfFilterPipeline: Expected DecodeParms Array corrupt

I've attached a pdf of a blank page.

To reproduce the error, I basically do this:

        cfg := pdfcpu.NewDefaultConfiguration()
        ctx, err := api.Read("Scanned.pdf", cfg)
        if err != nil {
                fmt.Printf("Error reading the pdf: %v\n", err)
        }

How to extract text data from PDF?

I am using below command

pdfcpu extract -mode=content inputFile.pdf outputDir

But i don't know how to convert this PDF-Source into text data.

Can you through some light onto this?

Thanks

import fails with panic

importing a tiff file that converts using tiff2pdf to a valid pdf (though does give warnings about the tiff file: TIFFReadDirectory: Warning, Unknown field with tag 33000 (0x80e8) encountered.

With pdfcpu import it fails with this:
pdfcpu import -vv 11.pdf 11.tiff
importing images into 11.pdf: [11.tiff]
Import config: A4 595x842 points, pos=full, dx=0, dy=0, scaling: 0.5 relative

11.pdf will be created
Fatal: unexpected panic attack: runtime error: index out of range

github.com/hhrutter/pdfcpu/pkg/api.Process.func1
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/pkg/api/process.go:48
runtime.call32
/usr/local/go/src/runtime/asm_amd64.s:522
runtime.gopanic
/usr/local/go/src/runtime/panic.go:513
io/ioutil.readAll.func1
/usr/local/go/src/io/ioutil/ioutil.go:30
runtime.call32
/usr/local/go/src/runtime/asm_amd64.s:522
runtime.gopanic
/usr/local/go/src/runtime/panic.go:513
runtime.panicindex
/usr/local/go/src/runtime/panic.go:44
github.com/hhrutter/pdfcpu/ccitt.(*pixelBuf).addRun
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/ccitt/reader.go:84
github.com/hhrutter/pdfcpu/ccitt.(*decoder).handleHorizontal
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/ccitt/reader.go:348
github.com/hhrutter/pdfcpu/ccitt.(*decoder).handleHorizontal-fm
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/ccitt/reader.go:578
github.com/hhrutter/pdfcpu/ccitt.(*decoder).decodeGroup4
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/ccitt/reader.go:589
github.com/hhrutter/pdfcpu/ccitt.(*decoder).decode
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/ccitt/reader.go:617
github.com/hhrutter/pdfcpu/ccitt.(*decoder).Read
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/ccitt/reader.go:631
bytes.(*Buffer).ReadFrom
/usr/local/go/src/bytes/buffer.go:206
io/ioutil.readAll
/usr/local/go/src/io/ioutil/ioutil.go:36
io/ioutil.ReadAll
/usr/local/go/src/io/ioutil/ioutil.go:45
github.com/hhrutter/pdfcpu/tiff.Decode
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/tiff/reader.go:683
github.com/hhrutter/pdfcpu/pkg/pdfcpu.ReadTIFFFile
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/pkg/pdfcpu/imageRead.go:437
github.com/hhrutter/pdfcpu/pkg/pdfcpu.createImageResource
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/pkg/pdfcpu/stamp.go:819
github.com/hhrutter/pdfcpu/pkg/pdfcpu.NewPageForImage
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/pkg/pdfcpu/importImage.go:386
github.com/hhrutter/pdfcpu/pkg/api.ImportImages
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/pkg/api/api.go:1347
github.com/hhrutter/pdfcpu/pkg/api.Process
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/pkg/api/process.go:80
main.process
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/cmd/pdfcpu/main.go:268
main.main
/home/dhf/Development/go/src/github.com/hhrutter/pdfcpu/cmd/pdfcpu/main.go:116
runtime.main
/usr/local/go/src/runtime/proc.go:201
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1333

Another file fails with this:
pdfcpu import -v 0.pdf 0.tiff
importing images into 0.pdf: [0.tiff]
Import config: A4 595x842 points, pos=full, dx=0, dy=0, scaling: 0.5 relative

0.pdf will be created
Fatal: ccitt: corrupt group4 data

Again this converts with tiff2pdf and I can merge them using pdfcpu merge creating a valid multipage pdf.

optimizeFontResourcesDict: missing fontDict entries "BaseFont" and "Name"

Hi @hhrutter

I have printed some PDF files from http://gluon.mxnet.io/ docs
Then i am trying to consolidate those pdfs using below code

        cmd := pdfcpu.MergeCommand(filenamesIn, outputFile, types.NewDefaultConfiguration())

	err = pdfcpu.Process(&cmd)
	if err != nil {
		logger.Println(err)
		return
	}

I am getting this error

optimizeFontResourcesDict: missing fontDict entries "BaseFont" and "Name"

I am using lastest pdfcpu version v0.1.1 on MacBookPro version 10.12.6

Thanks

Get rid of excessive logging

Libraries and source code has excessive logging interleaved with code that does main work.
This makes reading source code harder.

Lines like:
logInfoValidate.Println("*** validateShadingDictCommonEntries end ***")

Go standard library should be inspiration for this. It has no excessive logging inside library code.
Please get rid of logging inside the library.

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

Encrypt fails when ID missing

Encrypting a document relies on the existence of an otherwise optional ID element.
For encryption we need to create an ID element on the fly.

PDFContext non-exportable

Hi Horst,
Nice job !

I want to cache ctx (*PDFContext result of api.Read()) in a gob file but there are two non-exported fields k and v in "entry" type at hhrutter/pdfcpu/pkg/pdfcpu/nameTree.go line 27. Is-it possible, please, to make them exported by modifying their names with Uppercase ?

Many Thanks for your PDF processor.
Pierre

Leave out the logging management to the API user

Take a log interface as parameter instead of forcing them in init(). Leave to the lib user on how display or store them.
The interface should match log.Logger methods.
Put it in the Context.

Extract Metadata

I'd like to create a hash of PDF documents to compare them. The problem: PDFs use timestamps and UUIDs that might be different when you create the PDF - despite having the completely same structure and content. For more context check here

I was wondering if I could parse the PDF and replace UUIDs and timestamps and combine/serialize all this into a digest I could then compare.

Do you think this would be possible with pdfcpu?

Validation fails due to missing BitsPerComponent

I'm attempting to merge some files where one file contains the following:

/Subtype /Image
/Width 20
/Height 1
/ImageMask true
/Decode [1 0]
/Length 11 0 R
/Filter /FlateDecode

When pdfcpu validates this file, it fails because BitsPerComponent is not specified for this particular XObject.

I'm not an authority on PDF, but in the specification there is a table "Optional parameters for LZWDecode and FlateDecode filters" which has the following description for BitsPerComponent: (May be used only if Predictor is greater than 1) The number of bits used to represent each colour component in a sample. Valid values are 1, 2, 4, 8, and (PDF 1.5) 16. Default value: 8.

I think one might argue that since no Predictor is specified BitsPerComponent should actually not be allowed (or at least ignored) for this particular image.

Failed to merge

hi @hhrutter
It's great project!

Now i have a question. The result of merging tow pdf file looks like not correct.
the tow input file:
test3.pdf
test4.pdf

out file:
out2.pdf

code:
`
filenamesIn := []string{"test3.pdf", "test4.pdf", "out2.pdf"}

_, err := Process(MergeCommand(filenamesIn, "out.pdf", pdfcpu.NewDefaultConfiguration()))
if err != nil {
    return
}

`

for comparing, the output of cpdf :
out1.pdf

recent change causes go get error from upspin

I had to recently move my project to a new machine so the project could go live. I therefore had to run go get on that new machine for pdfcpu. In extract.go you use the following package:

"github.com/hhrutter/upspin/errors"

When running go get github.com/hhrutter/pdfcpu I get the following error:

package upspin.io/log: unrecognized import path "upspin.io/log" (https fetch: Get https://upspin.io/log?go-get=1: proxyconnect tcp: tls: oversized record received with length 20527) package upspin.io/upspin: unrecognized import path "upspin.io/upspin" (https fetch: Get https://upspin.io/upspin?go-get=1: proxyconnect tcp: tls: oversized record received with length 20527)

This should be reverted to the follwing package as is it is only used in one place in that file and all other files of pdfcpu use this package:

"github.com/pkg/errors"

PDF Validation

I am not a PDF expert at all and would appreciate to know people's opinions about how well pdfCPU supports PDF/A validation.
I ask this because i have been taksed with setting up a Digital Preservation system for long term storage of documents and photos.

Background is here:
http://openpreservation.org/news/verapdf-announced-as-finalist-for-the-digital-preservation-awards-2018/

http://verapdf.org/home/

https://github.com/verapdf
Its hilarious that the tool requires a Java Virtual Machine. Not very digtial future proof :)

Merge files command order

Hi there @hhrutter, great project!

I'm using the merge command, expecting a final PDF with the exact input order, but the result PDF has a random order.
Am I using the command incorrectly? Should I use another feature? I need to create an output PDF with multiple PDFs in a precise given order.

Thanks in advance

ouputFile := fmt.Sprintf("output/result_%s.pdf", time.Now().Format("20060102-1504")) pdfcpu.Merge(pdfMergeOrder, ouputFile, types.NewDefaultConfiguration())

The source array:

source_pdfs/7688393.pdf
source_pdfs/22139401.pdf
source_pdfs/32340834.pdf
source_pdfs/63906135.pdf
source_pdfs/64324713.pdf
source_pdfs/67541469.pdf
source_pdfs/90838299.pdf
source_pdfs/109121616.pdf
source_pdfs/109566867.pdf
source_pdfs/121581951.pdf
source_pdfs/138967698.pdf
source_pdfs/180903826.pdf
source_pdfs/258023538.pdf

The log, as you may see sorting is not being maintained

merging in source_pdfs/121581951.pdf
merging in source_pdfs/138967698.pdf
merging in source_pdfs/258023538.pdf
merging in source_pdfs/63906135.pdf
merging in source_pdfs/64324713.pdf
merging in source_pdfs/90838299.pdf
merging in source_pdfs/109566867.pdf
merging in source_pdfs/180903826.pdf
merging in source_pdfs/22139401.pdf
merging in source_pdfs/32340834.pdf
merging in source_pdfs/67541469.pdf
merging in source_pdfs/109121616.pdf

N-up

A pdf file file.pdf contains 10 pages,

I would like to merge these 10 pages into a long single page pdf file file2.pdf

It is useful when backing up a webpage or excel files.

As far as I know there is only one tool called pdfjam can

do this (by using N-up) but it is not actively maintained for years,

also pdfjam is difficult to install on Windows system.

Any ideas? thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.