I'm trying to convert this PDF to a JPEG image via ImageMagick (v 6.8.7-0): https://dl.dropboxusercontent.com/u/10351891/cd.pdf
I didn't find any working solution to preserve the filled data inside the PDF. This is one of the commands tried:
convert -colorspace CMYK -alpha off -interlace none -density 300x300 -quality 100 cd.pdf[0] cd_image.jpg
Since ImageMagick use Ghostscript for the conversion I've also update it to the last version (v 9.10) but nothing changed.
The command always print out a few warnings:
"Warning: considering '0000000000 XXXXX n' as a free entry"
"/BBox has zero width or height, which is not allowed."
Did someone find a way to convert it?
More information:
I used Preview for Mac to fill out the form.
On production, we use Ubuntu not Mac OS X and the PDF is not filled by me, but It's sent to us prefilled
It is a known issue that Max OS X PDF Preview does not support AcroForms properly, see this blog post that contains some details: Script to Fix Mac OSX Preview.app Form Fill and Save.
Among other errors, your PDF form fields have a missing piece of information: the appearance stream (a set of instructions that tell the viewer how the field value is supposed to be rendered when it is not being edited).
If you can specify which PDF viewer should be used for editing the forms, then avoid Mac OS X preview. If you need to support Mac OS X preview, then you can try to re-generate this information programmatically with any PDF library that allows filling out forms, or you can apply a form flattening process instead (converting the "dynamic" text into static) before exporting as jpeg.
Examples: