Anyone used WebPDFReports 1.0
Anyone used WebPDFReports 1.0
- Subject: Anyone used WebPDFReports 1.0
- From: Gino Pacitti <email@hidden>
- Date: Tue, 30 Jan 2007 19:26:30 +0000
I have a little problem with using this Framework and would really
appreciate a little help.
Im trying to create a PDF doc based on the contents of a component
but run into a error
I have this code:
PDFPage pdfPage = (PDFPage)pageWithName("PDFPage");
HTML2PDFConvertor pdfConvertor = new HTML2PDFConvertor();
pdfConvertor.createDocument("A4",
HTML2PDFConvertor.PortraitOrientation);
pdfConvertor.setTopMargin(5); pdfConvertor.setLeftMargin(5);
pdfConvertor.setPrintsVerticallyCentered(false);
pdfPage.setConvertor(pdfConvertor);
WOComponent demoPage = pageWithName("Demo");
pdfPage.appendComponent(demoPage);
WOResponse response = pdfPage.generateResponse();
NSData htmlAsData = response.content();
try{
FileOutputStream fileToSaveAs = new FileOutputStream((String)
System.getProperties().getProperty("pathToServer")+"0000004.pdf");
htmlAsData.writeToStream(fileToSaveAs);
}catch(FileNotFoundException e){
e.printStackTrace();
}catch(IOException io){
io.printStackTrace();
}
And I get this error with the debugger launching -
java[1100] *** Uncaught exception: <NSInvalidArgumentException> *** -
[NSPlaceholderString initWithString:]: nil argument
Anyone point me in the right direction
GIno
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden