-1

Sometimes your nicely formatted (TeX'ed) pdf is converted to Microsoft Word because of the default process at some company. This can badly mangle the layout (and fonts?) of your pdf, potentially rendering it unusable. A possible solution to this problem is to convert the pdf from text-based to image-based to thwart the bad conversion to Word.

This question is about ways to convert a text-based pdf to an image-based pdf.

hkBst
  • 2,818
  • 10
  • 29

3 Answers3

0

Your question is very broad, but you do point out a basic incompatibility between PDF and any structured document format. If you are looking for a programatic answer to your question, the general approach is to create an image drawing context instead of a PDF context, and render all the elements of your pages to that context. The result is an image which you then draw into a PDF context.

0

Now I do have an answer that seems to work, but I wonder about alternatives. My solution also has a shortcoming in that internal or external links are destroyed. In theory it should be possible to keep links intact. Finally, my solution works well for a single page document, but may not work (well) for other documents.

pdftoppm -r 300 text.pdf | convert -page A4 - text.pdf.ppm.pdf

This converts to a pixel-based format and increases file size significantly (10x for my test case).

hkBst
  • 2,818
  • 10
  • 29
0

see this picture

convert text-based PDFs into image PDFs -a tool called maipdf

Joe Ok
  • 1
  • 1