xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: Png output and transparent background
Date Sun, 10 Sep 2006 16:44:48 GMT
As an RFE, entering this in bugzilla would have been a valid approach,
yes. But I've already done the necessary change in FOP Trunk:
http://svn.apache.org/viewvc?view=rev&rev=441965

It was easy enough. For you this means, you should add the config
setting below to your FOP configuration file:

<cfg>
  <!-- snipped -->
  <renderer mime="image/png">
    <transparent-page-background>true</transparent-page-background>
    <fonts><!-- described elsewhere --></fonts>
  </renderer>
  <!-- snipped -->
<cfg>

Let me know if it works.

On 07.09.2006 21:55:35 Peter wrote:
> Gentlepeople,
>  
> I am considering entering this in bugzilla. 
>  
> Just to make sure: would that be "the correct" approach?
>  
> Thanks,
> 
>  
> 
> Peter
> 
>  
> 
>   _____  
> 
> From: Peter [mailto:pc.subscriptions@gmail.com] 
> Sent: dinsdag 5 september 2006 14:58
> To: 'fop-users@xmlgraphics.apache.org'
> Subject: RE: Png output and transparent background
> 
>  
> 
> Hello,
> 
>  
> 
> I have the *impression* this is related to some code in
> org.apache.fop.render.java2d.Java2DRenderer#getPageImage, namely
> 
>  
> 
>             // draw page frame
> 
>             graphics.setColor(Color.white);
> 
>             graphics.fillRect(0, 0, pageWidth, pageHeight);
> 
>             graphics.setColor(Color.black);
> 
>             graphics.drawRect(-1, -1, pageWidth + 2, pageHeight + 2);
> 
>             graphics.drawLine(pageWidth + 2, 0, pageWidth + 2, pageHeight +
> 2);
> 
>             graphics.drawLine(pageWidth + 3, 1, pageWidth + 3, pageHeight +
> 3);
> 
>             graphics.drawLine(0, pageHeight + 2, pageWidth + 2, pageHeight +
> 2);
> 
>             graphics.drawLine(1, pageHeight + 3, pageWidth + 3, pageHeight +
> 3);
> 
>  
> 
>  
> 
>  
> 
> Depending on the use case having a white page background and black frame
> might be fine. In my case it is not what I want.
> 
>  
> 
> Would this be considered a bug or a feature, and/or would it make sense to
> add some kind of option to either enable or disable this part of the code?
> 
>  
> 
> Thanks,
> 
>  
> 
> Peter
> 
>   _____  
> 
> From: Peter [mailto:pc.subscriptions@gmail.com] 
> Sent: dinsdag 5 september 2006 11:54
> To: 'fop-users@xmlgraphics.apache.org'
> Subject: Png output and transparent background
> 
>  
> 
> FOP Fans,
> 
>  
> 
> I am (a beginning fop user) using fop with png output (tried both the trunk
> and 0.92 beta) and was wondering whether there is a possibility to set the
> page background to transparent.
> 
>  
> 
> I tried background-color="transparent" but that does not seem to work.
> 
>  
> 
> Any guidance would be greatly appreciated,
> 
>  
> 
> Thanks,
> 
>  
> 
> Peter
> 
>  
> 
>  
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message