generated checkboxes are invalid (removed when roundtripping through pdf2ps -> ps2pdf; fail to display in a number of PDF viewers)
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 205
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
I have
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\begin{Form}
\fbox{\CheckBox[name=foo,checked=true]{}}
\end{Form}
\end{document}
This checkbox shows up fine in Adobe Reader, but the checkbox is unchecked in Chrome's PDF viewer, and does not show up at all in Firefox's PDF viewer nor in SumatraPDF. Worse, if I run pdf2ps foo.pdf foo.ps and then run ps2pdf foo.ps foo-ps.pdf, the resulting PDF file does not contain a checkbox. Note that pdf2ps warns with
**** Error: Required entry /BBox not present in Form.
Output may be incorrect.
Output may be incorrect.
**** Error: Stream object is missing the stream data.
Note also that when I open the original PDF in Adobe Reader, when I go to close it, Adobe Reader asks me if I want to save changes, suggesting that it's corrected some invalidity in the pdf behind the scenes. Indeed, if I do this, the resulting PDF displays checkboxes correctly in all PDF viewers, and displays the checkbox when I round-trip through a .ps file.
Here are all the generated files:
Assuming I named the above foo.tex, then:
- in Chrome gives:

- in Firefox gives:

- in SumatraPDF gives:

- in Adobe Reader gives:

- Running
pdf2ps foo.pdf foo.ps; tar -czf foo.ps.tar.gz foo.ps; ps2pdf foo.ps foo-ps.pdfgives foo.ps.tar.gz and foo-ps.pdf and on the command line says
$ pdf2ps foo.pdf foo.ps
pdf2ps: security risk: running with elevated privileges
The system cannot find the path specified.
**** Error: Required entry /BBox not present in Form.
Output may be incorrect.
Output may be incorrect.
**** Error: Stream object is missing the stream data.
- Opening
foo-ps.pdfin Adobe Reader shows:
- Re-opening
foo.pdfin Adobe Reader, and doing File -> Save As ->foo2.pdfgives: foo2.pdf - Opening
foo2.pdf:
- in Chrome gives:

- in Firefox gives:

- in SumatraPDF gives:

- Running
pdf2ps foo2.pdf foo2.ps; tar -czf foo2.ps.tar.gz foo2.ps; ps2pdf foo2.ps foo2-ps.pdfgives foo2.ps.tar.gz and foo2-ps.pdf - Opening
foo2-ps.pdf:
- in Chrome gives:

- in Firefox gives:

- in SumatraPDF gives:

- in Adobe Reader gives:

Perhaps related to #12?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start with the minimal LaTeX example using hyperref's \CheckBox, run pdflatex, and inspect it in the reported PDF viewers before and after pdf2ps/ps2pdf. Done means the generated checkbox remains visible and checked across viewers and survives the PostScript round trip without the reported PDF errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100