Comments (8)
This is the simsun font used,This is a new one, not cropped
ebCert.pdf
This is a new document using Times Roman font,It can be filled correctly, but it does not support Chinese
ebCert.pdf
from pdfcpu.
Did you check if your pdf file is valid as far as pdfcpu is concerned?
pdfcpu val ebCert.pdf
Also I would not add a user font on the fly instead do it separately and ensure it can be loaded prior to using it using the API.
In any case if you can share your file I can take a look and provide a fix.
from pdfcpu.
Hello!
Filling a form using a specific font is still an open issue.
See also #715 and #825
from pdfcpu.
This is fixed with the latest commit!
Your filling with SimSun will work since your input file is already prepared with Textfields expected to be filled with SimSun.
Specifying a fill font when filling remains an open issue.
from pdfcpu.
Just go get the latest commit and it will work.
from pdfcpu.
Just go get the latest commit and it will work.
Thank you for your efforts, but I have another question. When I open the PDF file generated after filling, the Chinese fonts cannot be displayed normally, either not displayed or garbled. When I click on the corresponding form field, the fonts are displayed normally. Is this still because the fonts are not embedded correctly? It may be related to rendering. When I try to click on the form field and do a simple operation, such as pressing the spacebar, then the form field that does not need to be focused can be displayed normally.
from pdfcpu.
Which PDF Viewer are you using.
Try Acrobat Reader.
Please also attach some screen shots.
from pdfcpu.
Please test the following and let me know how that goes.
If this fails, please post the edited ebCert.json so I can reproduce the result:
pdfcpu font install simsun.ttf
pdfcpu form fill ebCert.pdf ebCert.json out.pdf
from pdfcpu.
Related Issues (20)
- 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
- 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
- api: Form fill fails with forms produced with Adobe Acrobat HOT 5
- 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
- Add recursive functionality to the validate feature HOT 1
- Add an option to only list files that failed validation HOT 1
- Stopped working on Windows 7
- Panic on image extract HOT 6
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.