views:

170

answers:

1

Hi!

I am writing a script that reads some markup data, generates a tex document and converts it to a png image.

As long as I use a resolution up tp 286 px/inch everything works fine. Unfortunately GhostScript, which I use to create picture data, does nothing when I use higher values.

How can I fix this behaviour?

+1  A: 

Since info about your problem is not very detailed (What kind of fonts are used in the TeX document? Are they Chinese, Japanese, Korean, or...? Which is the Ghostscript commandline you're using?) ... here is a thing to check. But it is only a first guess: try to add "-c "100000000 setvmthreshold" -f /path/to/pdffile.pdf" to your command:

  gswin32c.exe ^
      -o c:/path/to/output.png ^
      -sDEVICE=png ^
      -r600x600 ^
      -c "100000000 setvmthreshold" ^
      -f /path/to/pdffile.pdf

This will allow for ~100 MByte extra RAM usage by Ghostscript. If you are on X-Windows (Linux, Unix), then "-dMaxBitmap=..." could help (provided you've enough of RAM):

  gs \
      -o /path/to/output.png \
      -sDEVICE=png \
      -r600x600 \
      -dMaxBitmap=100000000 \
      -c "100000000 setvmthreshold" \
      -f /path/to/pdffile.pdf
pipitas