Comments (5)
Hi!
Understood!
Can you provide a little test file then I can provide a fix.
from pdfcpu.
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.
attached is corrupted file created with relaxed validation:
conf := new(model.Configuration)
conf.NeedAppearances = true
conf.Reader15 = true
conf.ValidationMode = model.ValidationRelaxed
from pdfcpu.
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.
It works with just:
conf := api.LoadConfiguration()
Thank you very much!!
from pdfcpu.
Related Issues (20)
- AddWatermark returns error on PDF with empty page HOT 6
- Inconsistent configuration HOT 6
- Latest wasm build doesn't work with latest wasm_execs HOT 3
- About the version of xRefTable HOT 3
- US Letter has incorrect size HOT 2
- `pdfcpu images list` command can not get output HOT 1
- Api: merge pdf error HOT 2
- import images default command and help info mistake HOT 2
- xRefTable failed: pdfcpu: can't find last xref section HOT 10
- runtime error: index out of range [0] with length 0 HOT 8
- pdfcpu info does not show author attribute
- Invalid reference in stream "Length" causes endless parsing
- Disable centered content when resize page. HOT 1
- Dereference error with a particular (corrupt?) PDF HOT 1
- Bookmark export does not list/export single first-level bookmark HOT 3
- api.PageCount Fails on PDF/A Compliant PDFs HOT 2
- Transparency level when using API HOT 1
- addPageWatermark: ctx.PageDict(pageNr, consolidateRes) returns no error, but nil dictionary HOT 1
- Stack overflow when optimize pdf using API HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdfcpu.