Coder Social home page Coder Social logo

pdfcpu-error-example's Introduction

pdfcpu error example

For use in helping debug pdfcpu/pdfcpu#320

To Run:

go run main.go

System information:

OS: Windows 10 64-bit
Golang: go1.15.2 windows/amd64
pdfcpu: v0.3.11

Task details:

  • merge page1.pdf and page2.pdf using api.Merge()
  • apply an image watermark to input.pdf using api.AddWatermarks()

Desired Output:

2-page PDF called output.pdf with the text hidden behind a white image watermark on page 1

Success Case:

With Windows Date & Time Settings set to Time Zone (UTC -07:00) Mountain Time (US & Canada), the program functions as expected.

Failure Case:

With Windows Date & Time Setting set to Time Zone (UTC -10:00) Hawaii, the program fails with the following error:

add watermark error: pdfcpu: validateDateObject: <D:20210409072606+-10'00'> invalid date

Stack Trace:

Variables:
o = {github.com/pdfcpu/pdfcpu/pkg/pdfcpu.StringLiteral}(D:20210409073107+-10'00')

github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateDateObject at objects.go:183
github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateInfoDictDate at info.go:48
github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateDocInfoDictEntry at info.go:123
github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateDocumentInfoDict at info.go:153
github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateDocumentInfoObject at info.go:182
github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.XRefTable at xReftable.go:46
github.com/pdfcpu/pdfcpu/pkg/api.readAndValidate at api.go:111
github.com/pdfcpu/pdfcpu/pkg/api.readValidateAndOptimize at api.go:121
github.com/pdfcpu/pdfcpu/pkg/api.AddWatermarks at stamp.go:220
main.main at main.go:66
runtime.main at proc.go:204
runtime.goexit at asm_amd64.s:1374
 - Async Stack Trace
runtime.rt0_go at asm_amd64.s:220

pdfcpu-error-example's People

Contributors

sircodemane avatar

Watchers

 avatar

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.