Thanks Stephan! On Sun, May 1, 2016 at 7:24 AM, Stephan Eggermont <step...@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 > > >