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 somag <so...@gmail.com> on 2009/06/02 06:18:25 UTC

FOP creating *.tmp files

Hi All, 

I am using FOP 0.95...I can generate PDF, PCL files. Fop is creating *.tmp
files, Those file are not deleting after process.

Please someone help on this issue. 

Thanks,
-Soma
-- 
View this message in context: http://www.nabble.com/FOP-creating-*.tmp-files-tp23826246p23826246.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: FOP creating *.tmp files

Posted by Chris Bowditch <bo...@hotmail.com>.
somag wrote:

<snip/>

> 
> the above code is creating +~JF31411.tmp files...this file size is very huge
> and each and every time it's creating.

Image IO creates temporary files for processing images. Does your XSL-FO 
contain a lot of large images? Image IO is supposed to delete the 
temporary files when the JVM exits. Or you can tell Image IO not to 
cache the images to disk with following code:

ImageIO.setUseCache(false);

Chris



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


Re: FOP creating *.tmp files

Posted by somag <so...@gmail.com>.
Hello Chris,

I tried with that solution...No luck...and one more thing when i use
external font (*.ttf) that is creating problem. 

But not for built-in 14 fonts. I am using Arial Unicode MS font to support
double byte characters. 

I appreciate your help.... 

Thanks, 
-Soma
-- 
View this message in context: http://www.nabble.com/FOP-creating-*.tmp-files-tp23826246p23992309.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: FOP creating *.tmp files

Posted by somag <so...@gmail.com>.
here is my code...

ByteArrayOutputStream pclByteArrayData = new ByteArrayOutputStream();
try {

	FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
	
	// Construct fop with desired output format
	Fop fop = fopFactory.newFop(MimeConstants.MIME_PCL, foUserAgent,
pclByteArrayData);

	// Setup input for XSLT transformation
	Source src = new StreamSource(new StringReader(alertNotificationXML));
	
	// Resulting SAX events (the generated FO) must be piped through to
	// FOP
	Result res = new
javax.xml.transform.sax.SAXResult(fop.getDefaultHandler());
	
	// Start XSLT transformation and FOP processing
	transformer.transform(src, res);
	
	// Result processing
	FormattingResults foResults = fop.getResults();
	if(foResults != null && foResults.getPageSequences() != null) {
		java.util.List pageSequences = foResults.getPageSequences();
		for (java.util.Iterator it = pageSequences.iterator(); it.hasNext();) {
			PageSequenceResults pageSequenceResults = (PageSequenceResults)
it.next();
			objLogger.debug("PageSequence "
					+ (String.valueOf(pageSequenceResults.getID()).length() > 0 ?
pageSequenceResults.getID()
							: "<no id>") + " generated " + pageSequenceResults.getPageCount() + "
pages.");
		}
		objLogger.debug("Generated " + foResults.getPageCount() + " pages in
total.");
	}	
}
catch (Throwable ex) {
	ex.printStackTrace();
}

the above code is creating +~JF31411.tmp files...this file size is very huge
and each and every time it's creating.

Thanks,
-Soma
-- 
View this message in context: http://www.nabble.com/FOP-creating-*.tmp-files-tp23826246p23832256.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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


Re: FOP creating *.tmp files

Posted by Vincent Hennebert <vh...@gmail.com>.
Hi Soma,

somag wrote:
> Hi All, 
> 
> I am using FOP 0.95...I can generate PDF, PCL files. Fop is creating *.tmp
> files, Those file are not deleting after process.

I’m not aware of any piece of code in FOP that creates *.tmp files. Can
you tell us more? How do you run FOP? What are the names, types,
contents of those files?


> Please someone help on this issue. 
> 
> Thanks,
> -Soma

Thanks,
Vincent

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