Fix Graphs that use graphdoc pdf via Ghostscript with multi-page (#791)
for poor font rendering of some characters (thanks to Ken Sharp) Fixes #11047
This commit is contained in:
parent
00c74d139a
commit
51f44c2fd7
@ -977,8 +977,9 @@ class GVPdfGsDoc(GVDocBase):
|
|||||||
tmp_pdf_piece = "%s_%d_%d.pdf" % (tmp_ps, __x, __y)
|
tmp_pdf_piece = "%s_%d_%d.pdf" % (tmp_ps, __x, __y)
|
||||||
list_of_pieces.append(tmp_pdf_piece)
|
list_of_pieces.append(tmp_pdf_piece)
|
||||||
# Generate Ghostscript code
|
# Generate Ghostscript code
|
||||||
command = '%s -q -dBATCH -dNOPAUSE -dSAFER -g%dx%d '\
|
command = '%s -q -dBATCH -dNOPAUSE -dSAFER '\
|
||||||
'-sOutputFile="%s" -r72 -sDEVICE=pdfwrite '\
|
'-dDEVICEWIDTHPOINTS=%d -dDEVICEHEIGHTPOINTS=%d '\
|
||||||
|
'-sOutputFile="%s" -sDEVICE=pdfwrite '\
|
||||||
'-c "<</.HWMargins [%d %d %d %d] /PageOffset [%d %d]>> '\
|
'-c "<</.HWMargins [%d %d %d %d] /PageOffset [%d %d]>> '\
|
||||||
'setpagedevice" -f "%s"' % (
|
'setpagedevice" -f "%s"' % (
|
||||||
_GS_CMD, width_pt + 10, height_pt + 10, tmp_pdf_piece,
|
_GS_CMD, width_pt + 10, height_pt + 10, tmp_pdf_piece,
|
||||||
@ -988,7 +989,7 @@ class GVPdfGsDoc(GVDocBase):
|
|||||||
os.system(command)
|
os.system(command)
|
||||||
# Merge pieces to single multipage PDF ;
|
# Merge pieces to single multipage PDF ;
|
||||||
command = '%s -q -dBATCH -dNOPAUSE '\
|
command = '%s -q -dBATCH -dNOPAUSE '\
|
||||||
'-sOUTPUTFILE="%s" -r72 -sDEVICE=pdfwrite %s '\
|
'-sOUTPUTFILE="%s" -sDEVICE=pdfwrite %s '\
|
||||||
% (_GS_CMD, self._filename, ' '.join(list_of_pieces))
|
% (_GS_CMD, self._filename, ' '.join(list_of_pieces))
|
||||||
os.system(command)
|
os.system(command)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user