You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by pa...@free.fr on 2008/03/11 11:51:58 UTC
Cannot delete PNG image after PDF rendering
After a PDF rendering (FOP trunk svn629782), I need to delete the PNG image
referenced in the FO file.
(This image is regenerated before pdf rendering)
But the file cannot be deleted: "new File(...).delete()" always returns "false"
This file can be deleted until the "Image" creation:
PDFRenderer.putImage()
org.apache.xmlgraphics.image.loader.Image img = manager.getImage(...);
In my configuration, ImageLoaderImageIO is used
I have tried to modify the xmlgraphics-commons source code
(xmlgraphics-commons-1.3-src.zip 07-Mar-2008):
ImageUtil.closeQuietly(src); //Cannot do that as codecs my do late reading
//ImageUtil.removeStreams(src);
It seems to work: PNG file is deleted
As I don't want to modify xmlgraphics-commons sources, can somebody helps me to
delete this PNG file either with a FOP sources modification or with an other
method than "File.delete()".
Thanks,
Patrice
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Cannot delete PNG image after PDF rendering
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I have finally fixed this. I've found another, similar case which is
also fixed.
http://svn.apache.org/viewvc?rev=644313&view=rev
On 11.03.2008 11:51:58 patrice.rosnet wrote:
>
> After a PDF rendering (FOP trunk svn629782), I need to delete the PNG image
> referenced in the FO file.
> (This image is regenerated before pdf rendering)
> But the file cannot be deleted: "new File(...).delete()" always returns "false"
>
> This file can be deleted until the "Image" creation:
> PDFRenderer.putImage()
> org.apache.xmlgraphics.image.loader.Image img = manager.getImage(...);
>
> In my configuration, ImageLoaderImageIO is used
> I have tried to modify the xmlgraphics-commons source code
> (xmlgraphics-commons-1.3-src.zip 07-Mar-2008):
> ImageUtil.closeQuietly(src); //Cannot do that as codecs my do late reading
> //ImageUtil.removeStreams(src);
> It seems to work: PNG file is deleted
>
> As I don't want to modify xmlgraphics-commons sources, can somebody helps me to
> delete this PNG file either with a FOP sources modification or with an other
> method than "File.delete()".
>
> Thanks,
> Patrice
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: How to underline a graphic
Posted by Peter Coppens <pc...@gmail.com>.
Perhaps border properties could help you achieve what you want?
On 21 Apr 2008, at 15:32, patrice.rosnet@free.fr wrote:
>
> Hello,
>
> I insert a little graphic in an underlined text but it is not
> underlined.
>
> <fo:block text-decoration="underline">
> Text is underlined <fo:external-graphic src="logo.png"
> content-height="1.5em"/> but not graphic.
> </fo:block>
>
> I think it is normal because I find nothing in the W3C specification
> to
> underline fo:external-graphic.
> (fo:inline / fo:page-number / fo:page-number-citation / fo:character
> can be
> underlined but fo:leader / fo:external-graphic can not)
>
> But can somebody give me a way to have the same rendering as "an
> underlined
> graphic" ?
>
> Thanks,
> Patrice
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: How to underline a graphic
Posted by Jay Bryant <ja...@bryantcs.com>.
I would try setting the bottom border on the fo:block, thus:
<fo:block border-bottom="1pt solid black">Text and graphic here</fo:block>
Jay Bryant
----- Original Message -----
From: <pa...@free.fr>
To: <pa...@free.fr>
Cc: <fo...@xmlgraphics.apache.org>
Sent: Monday, April 21, 2008 8:32 AM
Subject: How to underline a graphic
>
> Hello,
>
> I insert a little graphic in an underlined text but it is not underlined.
>
> <fo:block text-decoration="underline">
> Text is underlined <fo:external-graphic src="logo.png"
> content-height="1.5em"/> but not graphic.
> </fo:block>
>
> I think it is normal because I find nothing in the W3C specification to
> underline fo:external-graphic.
> (fo:inline / fo:page-number / fo:page-number-citation / fo:character can
> be
> underlined but fo:leader / fo:external-graphic can not)
>
> But can somebody give me a way to have the same rendering as "an
> underlined
> graphic" ?
>
> Thanks,
> Patrice
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
How to underline a graphic
Posted by pa...@free.fr.
Hello,
I insert a little graphic in an underlined text but it is not underlined.
<fo:block text-decoration="underline">
Text is underlined <fo:external-graphic src="logo.png"
content-height="1.5em"/> but not graphic.
</fo:block>
I think it is normal because I find nothing in the W3C specification to
underline fo:external-graphic.
(fo:inline / fo:page-number / fo:page-number-citation / fo:character can be
underlined but fo:leader / fo:external-graphic can not)
But can somebody give me a way to have the same rendering as "an underlined
graphic" ?
Thanks,
Patrice
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Cannot delete PNG image after PDF rendering
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Thanks for the report. I'll look into it ASAP.
On 11.03.2008 11:51:58 patrice.rosnet wrote:
>
> After a PDF rendering (FOP trunk svn629782), I need to delete the PNG image
> referenced in the FO file.
> (This image is regenerated before pdf rendering)
> But the file cannot be deleted: "new File(...).delete()" always returns "false"
>
> This file can be deleted until the "Image" creation:
> PDFRenderer.putImage()
> org.apache.xmlgraphics.image.loader.Image img = manager.getImage(...);
>
> In my configuration, ImageLoaderImageIO is used
> I have tried to modify the xmlgraphics-commons source code
> (xmlgraphics-commons-1.3-src.zip 07-Mar-2008):
> ImageUtil.closeQuietly(src); //Cannot do that as codecs my do late reading
> //ImageUtil.removeStreams(src);
> It seems to work: PNG file is deleted
>
> As I don't want to modify xmlgraphics-commons sources, can somebody helps me to
> delete this PNG file either with a FOP sources modification or with an other
> method than "File.delete()".
>
> Thanks,
> Patrice
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org