Frage

How to use ps2pdf and force it to keep plain text if the original pdf contains real text?

Sometimes if a PDF has some areas with background colors it convert the whole pdf to an image!?

How to force ps2pdf to keep plain text?

Syntax:

pdf2ps file.pdf file.pdf.ps
ps2pdf -dPDFSETTINGS=/screen -dColorImageResolution=50 -dGrayImageResolution=50 file.pdf.ps file_output.pdf

PDF example

www.bluemachines.dk/pdf_comp/dyn.pdf
War es hilfreich?

Lösung

The first answer is drive Ghostscript directly, don't use ps2pdf (or pdf2ps).

If you are getting text converted to an image, then its most likely because the original PDF file has transparency, which cannot be represented in PostScript. The only way to deal with that is to render the area of transparency.

There is no way to maintain the Encoding of the text, though in general it won't change. However this is highly dependent on the font and encoding used in the input. I can't say more without seeing an example.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top