[Pharo-users] RT export to PDF

Arturo Zambrano arturo.zambrano at gmail.com
Mon May 2 13:52:05 EDT 2016


Thanks Stephan!

On Sun, May 1, 2016 at 7:24 AM, Stephan Eggermont <stephan at stack.nl> wrote:

> On 01/05/16 04:00, Arturo Zambrano wrote:
>
>> Hi,
>>   I'm using RT on top of pharo5.
>>   As I need to export to pdf, I also installed
>> RTPDFExporter
>> and
>> Artefact
>>
>> development versions
>>
>> Exporting to pdf fails with MNU RTPDFVisitor>>visitMapShape:
>>
>> any hint regarding this?
>>
>
> The PDF exporter has its last updates in november, so might be slightly
> out of date. When comparing RTSVGVisitor2 to RTPDFVisitor, I notice
> some missing visitors.
>
> AFAIK, Artefact has limited bitmap support at the moment,
> and uses the JPEGReadWriter instead of embedding directly.
>
> http://forum.world.st/PNG-in-Artefact-td4798885.html
>
> You need to add something like
>
> RTPDFVisitor>>visitBitMapShape: aBitmapShape
>         | s |
>         s := WriteStream on: ByteArray new.
>
>         TRPlatform current pngReadWriterClass putForm: (aBitmapShape form)
> onStream: s.
>         page add:
>                                 (PDFPngElement
>                                 from: aBitmapShape encompassingRectangle
> topLeft x mm @
>                                         aBitmapShape encompassingRectangle
> topLeft y mm
>                                 dimension: aBitmapShape width mm @
> aBitmapShape height mm
>                                 fromStream: s contents readStream)
>
> Stephan
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20160502/a8762240/attachment.html>


More information about the Pharo-users mailing list