Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to save automatically the .pdf generated?
How to save automatically the .pdf generated? [message #89157] Wed, 09 November 2005 12:20 Go to next message
Eclipse UserFriend
Originally posted by: nicolasmondon.gmail.com

Hello,
I have to save automatically the generated report in pdf, but without
Adobe reader.
In fact, i have to send automatic emails with the generated report.
Is it possible, when I generate the report, to save it automatically -
without asking the user to do it?
Thanks.
Re: How to save automatically the .pdf generated? [message #89297 is a reply to message #89157] Wed, 09 November 2005 18:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mlorenz.nc.rr.com

You have to set the output filename. Something like this:

// Set up options for PDF output.
HTMLRenderOption options = new HTMLRenderOption( );
options.setOutputFormat( HTMLRenderOption.OUTPUT_FORMAT_PDF );
String outputFileName = "C:\\MyReport.pdf";
options.setOutputFileName(outputFileName);

HTH, Mark
Re: How to save automatically the .pdf generated? [message #89569 is a reply to message #89297] Thu, 10 November 2005 09:52 Go to previous message
Eclipse UserFriend
Originally posted by: nicolasmondon.gmail.com

Thanks for the tips ;-) - i've made an horrible method to do it by the
stream of the generated report URL :

URL url = new
URL(" http://127.0.0.1:50589/viewer/run?__report=E:/eclipse/eclips e/workspace/My+Reports/crr1.rptdesign&__format=pdf&_ _usetestconfig=true&__locale=null");
BufferedInputStream in = new BufferedInputStream(url.openStream());
FileOutputStream fos = new FileOutputStream("c:/test.pdf", true);
byte buff[] = new byte[1];//Ou une autre valeur
while ((in.read(buff)) != -1)
fos.write(buff);

fos.close();


... I prefer 10 times yours.
Previous Topic:BIRT Installation
Next Topic:Build BIRT project
Goto Forum:
  


Current Time: Fri Aug 16 15:27:24 GMT 2024

Powered by FUDForum. Page generated in 0.03445 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top