[Pharo-users] RT export to PDF
arturo.zambrano at gmail.com
Mon May 2 13:52:05 EDT 2016
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:
>> I'm using RT on top of pharo5.
>> As I need to export to pdf, I also installed
>> 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.
> 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:
> from: aBitmapShape encompassingRectangle
> topLeft x mm @
> aBitmapShape encompassingRectangle
> topLeft y mm
> dimension: aBitmapShape width mm @
> aBitmapShape height mm
> fromStream: s contents readStream)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-users