[Gambas-user] How to reduce the size of PDFs generated with PDFSurface/Cairo
vuott at tutanota.com
vuott at tutanota.com
Wed Oct 11 21:14:20 CEST 2023
« All relevant parameters (width, height, resolution, input.pdf-path, output.pdf-path) can of course be inserted by a Subst command. »
Hello Claus,
yes, it's right, but obviously I only wanted to point out that opportunity and to present a simple and brief example.
What can be added is certainly helpful.
bye
11 ott 2023, 19:43 da claus.dietrich at freenet.de:
> Hi Fabien and Voutt
>
> Am 10.10.23 um 10:00 schrieb Fabien Bodard:
>
>> I use this old class in my project to generate simple picture pdf.
>>
>
> Am 10.10.23 um 13:04 schrieb vuott--- via User:
>
>> Ehmmm...I got this simple and short code by using GhostScript external resources:
>>
>
> Thanks a lot for sharing your solutions. I put both into my treasure box. They provided me with the confidence that I am not on the wrong track. The PDFWriter class is a real PDF "killer class". Its scope of capabilities is amazing and worth a very detailed look. Voutt's solution is actually doing what I needed in my program. It does the same as my single line Shell command. Here an example of my Shell command for a PDF scanned with 300 dpi (A4 size) converted to 150dpi (=/ebook):
>
> gs -dBATCH -dNOPAUSE -q -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -sOutputFile=outputpath.pdf inputpath.pdf
>
> All relevant parameters (width, height, resolution, input.pdf-path, output.pdf-path) can of course be inserted by a Subst command.
>
> Best regards
>
> Claus
>
>
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231011/65d12a60/attachment.htm>
More information about the User
mailing list