Thanks for your help Keiron.

I've been mistaken. There had been no break in functionality
between version 1.7 and 1.8.
My previous test cases just didn't include text.

Unfortunately, there is still an error message,
though it's now the Acrobat Reader that is complaining
about font problems.
(There should be an intelligent remark below the image
 in the appended example.)

I guess, I'll have to learn more about font handling in FOP and PDF.
For the meantime, I've subclassed PDFDocumentGraphics2D,
overriding the drawString method:

   public void drawString(String s, float x, float y) {
      if (super.textAsShapes) {
         Font font = super.getFont();
         FontRenderContext frc = super.getFontRenderContext();
         GlyphVector gv = font.createGlyphVector(frc, s);
         Shape glyphOutline = gv.getOutline(x, y);
      } else {
         super.drawString(s, x, y);

Jens Thieler

>On Mon, 09 Jul 2001 10:47 Keiron Liddle wrote:
>It should be setup up properly now, providing you specify textAsShapes to
>be false.
>>On Mon, 09 Jul 2001 09:53:07 Thieler Jens wrote:
>> I wanted to export a Java Graphics2D component to PDF
>> and did something like this:
>>    PDFDocumentGraphics2D pdfGenerator =
>>       new PDFDocumentGraphics2D(true, stream, (int)width, (int)height);
>>    pdfGenerator.setSVGDimension(w, h);
>>    ((Graphics2D)pdfGenerator).setClip(0, 0, (int)width, (int)height);
>>    component.export((Graphics2D)pdfGenerator, ctm);
>>    pdfGenerator.finish();
>> O.K. this approach has got nothing to do with FO,
>> so FOP couldn't be blamed if it didn't support it.
>> (But it sure would be nice :-)


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to