Discussion:
[Dvipng] dvipng and pstricks
Michael Sharpe
2008-03-26 17:59:53 UTC
Permalink
I've set up the CVS version of dvipng so as to be able to call gs. I'm
having trouble with raw postscript inclusions, as generated by
PSTricks. The GS output is reported as

NO IMAGE dvipng warning: No GhostScript pngalpha output, cannot render
raw PostScript

The GS CALL (a result of -d 256) was

gs -sDEVICE=pngalpha -r100x100 -dBATCH -dNOPAUSE -q -sOutputFile=- -
dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dSAFER -

I've attached a small dvi file with a minimal example. (This does work
properly with dvips+ps2eps+eps2png, but is considerable slower than
dvipng.)

Thanks, by the way, for this fine tool, which has worked quickly and
correctly in most cases. Any help you can suggest would be appreciated.

Michael
Jan-Åke Larsson
2008-03-27 13:44:37 UTC
Permalink
Post by Michael Sharpe
I've set up the CVS version of dvipng so as to be able to call gs. I'm
having trouble with raw postscript inclusions, as generated by PSTricks.
The current CVS can handle many PSTricks specials but not these. From
what I can see, the code attempts to put TeX glyphs at a given
coordinate by enclosing them with PSTricks specials:

@364 DRAW CMD: XXX1 61 'ps: ***@Dict begin { 56.90549 56.90549 } PutCoor
PutBegin end'
@427 DRAW CMD: PUSH
@428 DRAW CMD: PUSH
@429 DRAW CMD: DOWN3 235560
@433 DRAW CMD: PUSH
@434 DRAW CMD: RIGHT3 -592745
@438 DRAW CMD: FNT_DEF1 39 104037337 717619 655360 0 6 'ptmr7t'
@460 DRAW CMD: FONT_39
@461 DRAW CMD: SETC_084
VF CHAR: 'T' 84 at (102,321) tfmw 438464
@462 DRAW CMD: RIGHT3 -50230
@466 DRAW CMD: SETC_101
VF CHAR: 'e' 101 at (110,321) tfmw 318618
@467 DRAW CMD: SETC_115
VF CHAR: 's' 115 at (117,321) tfmw 279146
@468 DRAW CMD: SETC_116
VF CHAR: 't' 116 at (123,321) tfmw 199491
@469 DRAW CMD: POP
@470 DRAW CMD: POP
@471 DRAW CMD: POP
@472 DRAW CMD: XXX1 30 'ps: ***@Dict begin PutEnd end'

This will, quite frankly, not work in dvipng until I implement PutBegin
and PutEnd natively (or give the whole thing to dvips...). I am not
going to spend time doing that for every special that PSTricks or
TIKZ/PGF (or whatever) come up with, there are simply too many.

The alternative is to include a native PostScript interpreter. Volunteers?

/JÅ
--
ceci n'est pas une .signature
Loading...