1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-04 07:57:52 +03:00

Try to always read input in blocks

This commit is contained in:
Guillaume Ayoub 2020-12-12 22:54:57 +01:00
parent b2f7afd29d
commit 8fc505afdb

View File

@ -25,7 +25,7 @@ def document_write_png(self, target=None, resolution=96, antialiasing=1):
command = [
'gs', '-q', '-dNOPAUSE', '-dSAFER', f'-dTextAlphaBits={antialiasing}',
f'-dGraphicsAlphaBits={antialiasing}', '-sDEVICE=png16m',
f'-r{resolution}', '-sOutputFile=-', '-']
f'-r{resolution}', '-sOutputFile=-', '-_']
pngs = run(command, input=self.write_pdf(), stdout=PIPE).stdout
assert pngs.startswith(MAGIC_NUMBER), (