Git Product home page Git Product logo

Comments (5)

hhrutter avatar hhrutter commented on May 25, 2024

Hi!
Understood!
Can you provide a little test file then I can provide a fix.

from pdfcpu.

aaigr11 avatar aaigr11 commented on May 25, 2024

test1.pdf

File is attached - created with Adobe Acrobat, latest version 2024.002.20687.

Created from scratch. Has only 2 tx fields: firstname, lastname.

PDFCPU fails with error: dict=type1FontDict required entry=FirstChar missing.

The following config used:

conf := new(model.Configuration)
conf.NeedAppearances = true
conf.Reader15 = true
conf.ValidationMode = model.ValidationStrict

If I switch to a relaxed validation, the error doesn't happen, but the created filled PDF is created corrupted and cannot be opened by any PDF reader (neither by Acrobat Reader, not by Chrome/Edge reades).

from pdfcpu.

aaigr11 avatar aaigr11 commented on May 25, 2024

result_relaxed.pdf

attached is corrupted file created with relaxed validation:

conf := new(model.Configuration)
conf.NeedAppearances = true
conf.Reader15 = true
conf.ValidationMode = model.ValidationRelaxed

from pdfcpu.

hhrutter avatar hhrutter commented on May 25, 2024

no problem filling your PDF using the CLI.

As far as API:
pdfcpu is providing appearance streams and stick with ValidationRelaxed.
In general you should be fine by just doing conf := api.LoadConfiguration()

from pdfcpu.

aaigr11 avatar aaigr11 commented on May 25, 2024

It works with just:

conf := api.LoadConfiguration()

Thank you very much!!

from pdfcpu.

Related Issues (20)

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.