Re: [Pharo-users] Create png from pdf

2017-01-18 Thread Stephane Ducasse
Ah you want to convert pdf to png I thought graphics to png.
PDF to png means that we would need a pdf renderer and this is not an easy
task.

On Mon, Jan 16, 2017 at 10:26 AM, Sabine Manaa 
wrote:

> 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.
>
>


Re: [Pharo-users] Create png from pdf

2017-01-16 Thread Sabine Manaa
Hi Henrik, Hi Olivier,

thank you. I assume I have to stay at my old solution for the first time.

Regards
Sabine

2017-01-16 14:57 GMT+01:00 Olivier Auverlot [via Smalltalk] <
ml-node+s1294792n4929731...@n4.nabble.com>:

> Hi Sabine,
>
> Converting a PDF into a PNG with Pharo is not an easy task because you
> must write a PDF reader.
>
> With Artefact, the other approach is to draw on a form instead of
> generating the PDF instructions. For geometrics items, It's relatively easy
> but the respect of paper formats and the management of fonts could be very
> complex.
>
> The difficulty is to have the same result between the PDF document and the
> simulated document  written in a PNG file.
>
> Best regards
> Olivier
>
> 2017-01-16 12:05 GMT+01:00 Henrik Nergaard <[hidden email]
> <http:///user/SendEmail.jtp?type=node=4929731=0>>:
>
>> 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:[hidden email]
>> <http:///user/SendEmail.jtp?type=node=4929731=1>] På vegne av
>> Sabine Manaa
>> Sendt: 16 January 2017 10:26
>> Til: [hidden email]
>> <http:///user/SendEmail.jtp?type=node=4929731=2>
>> 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-p
>> ng-from-pdf-tp4929722.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>>
>>
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.world.st/Create-png-from-pdf-tp4929722p4929731.html
> To start a new topic under Pharo Smalltalk Users, email
> ml-node+s1294792n1310670...@n4.nabble.com
> To unsubscribe from Pharo Smalltalk Users, click here
> <http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code=1310670=bWFuYWEuc2FiaW5lQGdtYWlsLmNvbXwxMzEwNjcwfC0xOTE3OTcxOTg5>
> .
> NAML
> <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://forum.world.st/Create-png-from-pdf-tp4929722p4929757.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Create png from pdf

2017-01-16 Thread olivier auverlot
Hi Sabine,

Converting a PDF into a PNG with Pharo is not an easy task because you must
write a PDF reader.

With Artefact, the other approach is to draw on a form instead of
generating the PDF instructions. For geometrics items, It's relatively easy
but the respect of paper formats and the management of fonts could be very
complex.

The difficulty is to have the same result between the PDF document and the
simulated document  written in a PNG file.

Best regards
Olivier

2017-01-16 12:05 GMT+01:00 Henrik Nergaard <draag...@outlook.com>:

> 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-boun...@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.
>
>
>


Re: [Pharo-users] Create png from pdf

2017-01-16 Thread Henrik Nergaard
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-boun...@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.




[Pharo-users] Create png from pdf

2017-01-16 Thread Sabine Manaa
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.



Re: [Pharo-users] Create PNG (from pdf?)

2016-05-31 Thread Sabine Manaa
Hi Franz Josef,

thank you. Torsten Bergmann recommended http://pdfbox.apache.org/ to me and
I am just playing around with it. My first impression is, that ImageMagick
has more features. It is great to have 2 promising alternatives. I will
have a look at it, too.

Regards
Sabine

2016-05-30 23:01 GMT+02:00 Franz Josef Konrad :

> In our editorial system we use ImageMagick for this task. I guess you have
> this option on your list. If not, have a look at <
> http://imagemagick.org/discourse-server/viewtopic.php?t=19432>.
> I only can state, ImageMagick is doing this job reliable at over 1000
> clients.
>
> Regards,
> Franz Josef
>
>
>
>
> Am 30.05.2016 um 13:10 schrieb Sabine Manaa:
>
>> Hi,
>>
>> in my online application, I create pdf reports with artefact. Works great.
>>
>> Now, I want to show small previews of those reports with real data.
>> I want them to be images (png).
>>
>> I am searching for ideas how to solve this.
>>
>> I have a list of advantages/disadvantages of various ways but no final
>> idea/decision.
>>
>> I am very interested in ideas of the community.
>> Perhaps someone had a similar problem? How did you solve this?
>>
>> Regards
>> Sabine
>>
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/Create-PNG-from-pdf-tp4898103.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>>
>
>


Re: [Pharo-users] Create PNG (from pdf?)

2016-05-30 Thread Franz Josef Konrad
In our editorial system we use ImageMagick for this task. I guess you 
have this option on your list. If not, have a look at 
.
I only can state, ImageMagick is doing this job reliable at over 1000 
clients.


Regards,
Franz Josef




Am 30.05.2016 um 13:10 schrieb Sabine Manaa:

Hi,

in my online application, I create pdf reports with artefact. Works great.

Now, I want to show small previews of those reports with real data.
I want them to be images (png).

I am searching for ideas how to solve this.

I have a list of advantages/disadvantages of various ways but no final
idea/decision.

I am very interested in ideas of the community.
Perhaps someone had a similar problem? How did you solve this?

Regards
Sabine







--
View this message in context: 
http://forum.world.st/Create-PNG-from-pdf-tp4898103.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.






[Pharo-users] Create PNG (from pdf?)

2016-05-30 Thread Sabine Manaa
Hi,

in my online application, I create pdf reports with artefact. Works great.

Now, I want to show small previews of those reports with real data. 
I want them to be images (png).

I am searching for ideas how to solve this.

I have a list of advantages/disadvantages of various ways but no final
idea/decision.

I am very interested in ideas of the community. 
Perhaps someone had a similar problem? How did you solve this?

Regards
Sabine



 



--
View this message in context: 
http://forum.world.st/Create-PNG-from-pdf-tp4898103.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.