Hook not shown in the final pdf-output? #4276
-
Hello - i try to fill out a form pdf document (templ.pdf): Wheni select this in this pdf directly it shows this hooks: But when i update the pdf-docuement with this statements and save the new pdf-output
There are not hooks in the final output: How can i get the hooks also in the outputted new pdf-docuement? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
This is probably due to an older PyMuPDF version, which only accepted the recommended PDF value "Yes" for a check box to be checked. |
Beta Was this translation helpful? Give feedback.
-
I don´t understand - i think i have installed the actual PyMuPDF version: |
Beta Was this translation helpful? Give feedback.
-
I cannot reproduce the problem. The following script does work and produces correct tick marks for both, the update and the baked PDF. doc=pymupdf.open(doc.name)
page=doc[1]
for w in page.widgets():
if w.field_type==pymupdf.PDF_WIDGET_TYPE_CHECKBOX:
w.field_value=True
w.update()
doc.ez_save("x.pdf") # normal check box updates
doc.bake() # bake all in
MuPDF error: unsupported error: cannot create appearance stream for annotations
MuPDF error: unsupported error: cannot create appearance stream for annotations
MuPDF error: unsupported error: cannot create appearance stream for annotations
...
doc.ez_save("y.pdf") # save the baked version |
Beta Was this translation helpful? Give feedback.
-
When i open the y.pdf with ms edge i see this: When i open the same file with slim pdf reader i see this: Could this be some problem with my pdf-viewer - and not my program itself? |
Beta Was this translation helpful? Give feedback.
-
ok is see - then it seems this was only a displaying problem from the edge-browser... |
Beta Was this translation helpful? Give feedback.
This must be a (your) platform problem:
On Windows (all PDF viewers: Adobe, Foxit, ...) and on Linux (evince, firefox browser) everything looks as it should.
The respective font ZapfDingbats is not embedded in the PDF, so the decision what to show is made by the viewer. When e.g. displaying this file under GitHub, I also see those stars. Obviously, the responsible servers for GitHub also have a different opinion about what to display.