See Form protocol (*Graphics-files), #writePNGFileNamed: , and PNGReadWriter.
----------------------------------------------------
| canvas |
canvas := FormCanvas extent: World extent.
World fullDrawOn: canvas.
canvas form writePNGFileNamed: 'imageOfWorld.png'
----------------------------------------------------
There are also some methods in morph (#exportAs:using: #exportAsPng), but these will ask for the filename via the file dialog.
------------------------------------------------------------ ----
World exportAsPng
------------------------------------------------------------ ----
Best regards,
Henrik
-----Opprinnelig melding-----
Fra: Pharo-users [mailto:pharo-users-bounces@lists.pharo.org ] P�� vegne av Sabine Manaa
Sendt: 16 January 2017 10:26
Til: pharo-users@lists.pharo.org
Emne: [Pharo-users] Create png from pdf
Hi,
currently, I create pdfs with Artefact and it works fine.
For displaying previews of the pdf reports, I use�� Apache PDFBox to generate pngs from the pdfs.
This works, too.
But I would prefer to generate the pngs directly from pharo and do not call external libraries.
Stephane told me that "there is a form in a morph and it can be converted in png".
Can anyone give me a small entry point or has done similar and provide some code snippet?
Regards
Sabine
--
View this message in context: http://forum.world.st/Create-png-from-pdf-tp4929722.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.