Hi Vignesh,

perfect answer by Michael already (thanks!). Just an additional remark: The default is to compress the page content stream and j.writePDFfile ('plot', write_compress=False) will disable the compression. So it will become even bigger, but allows you to view the content in an editor. Now, how to reduce the size? The only option is to try to reduce the amount of data to be included ...

Best,


André

Am 24.02.20 um 11:40 schrieb Michael J Gruber via PyX-user:
Hi Vignesh

You didn't provide a complete example, but I assume that your "j" is a
canvas.canvas instance, right?
The writePDFfile method of canvas creates a document.page and calls
document.document's writePFfile method for you. If you want to specify
keyword arguments for the latter when you use canvas.writePDFfile,
write them as "write_compress" etc.

Michael

Am Mo., 24. Feb. 2020 um 08:22 Uhr schrieb Vignesh T G <[email protected]>:

Hello Pyx Development Team and users,

I am generating a simple line plot using pyx in 'pdf' file format. 
Unfortunately, due to the data i have, the resulting file size is large. I 
found in the manual, about the 'compress' function in the module document but i 
don't know how to use it. Can someone help me in this regard?

I tried  "j.writePDFfile ('plot', compress=True, compresslevel=6)", but i get an error 
message stating there is "an unexpected argument compress and compresslevel"

Thanks
Vignesh TG
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user


_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user


--
by _ _      _
  / \ \    / ) Dr. André Wobst, [email protected], https://www.wobsta.de
 / _ \ \/\/ /  wobsta GmbH, Amselweg 22, 85716 Unterschleißheim, Germany
(_/ \_)_/\_/   Office: +49 (0)89 5480 3394, Mobile: +49 (0)160 9380 4217

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to