biohaa.blogg.se

Why is my adobe acrobat reader not working
Why is my adobe acrobat reader not working













I'm working on some PDF generation code in Ruby (using Prawn and the pdf-core gem), so the fix was very simple.Īfter: self = PDF::Core::LiteralString.new('/Helv 0 Tf 0 g') iText RUPS) will automatically decode these strings and hide the fact that they were encoded. I really struggled to spot this issue, because many PDF debugging tools (e.g. It decodes any other encoded strings perfectly fine.) (Specifically for the /DA attribute in an /AcroForm. Most PDF readers will automatically decode this string with no problems (Chrome, Firefox, Mac Preview), but Acrobat Reader doesn't support this for some reason. This is a hex encoded string with the same decoded value: /Helv 0 Tf 0 g. The working PDF contained: /DA (/Helv 0 Tf 0 g) I finally found the culprit under /Root => /AcroForm => /DA. (TIP: Use pdftk original.pdf output original-uncompressed.pdf uncompress to uncompress PDF streams, and then you can edit the PDF in a text editor.) I've finally found the solution! I spent many hours whittling down each PDF until I could find the smallest change that caused this rendering bug in Acrobat Reader. If you are familiar with the PDF specification, then I'd be very grateful if you could please take a look at the PDF files I posted above. I'm using Ruby and Prawn, but I also have a lot of low-level proprietary code (Prawn doesn't actually have any support for Acroform annotations.) I just need to understand the main differences between these PDFs and figure out why one is broken while the other is rendering properly, and then I will be able to make the changes in my code. Unfortunately I can't share any specific code examples. (This is a very simple stream that just displays a checkmark using the ZapfDingbats font.) I even tried to copy the XObject stream directly from the working PDF, and if you look at the /AP => /N => /Yes stream, you should see that they are almost identical: 1 g Both PDFs share a small number of similar validation errors, so this hasn't helped me to figure out the difference. Working PDF (created in Adobe Acrobat):.Here is what it's supposed to look like (working PDF from Adobe Acrobat): But when I click the checkbox, the value isn't persistent, and clicking it again doesn't do anything. When I hover over the checkbox, the border is displayed. Here is how the broken PDF looks in Acrobat Reader when I hover / click the checkbox: I've been working on a minimal example PDF that just contains a single checkbox, and no other content. However, I'm really struggling to get these rendering properly in Acrobat Reader. I'm working on generating Acroform checkbox annotations for editable PDF forms, and these render perfectly fine in most of the PDF readers that I'm testing: Chrome, Firefox, Mac Preview, and PDF Element 6. I'm working on some code that generates PDF documents.















Why is my adobe acrobat reader not working