• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Anyone used WebPDFReports 1.0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Using Stored procudures in WO
  • Next by Date: Re: Webobjects-dev Digest, Vol 4, Issue 62
  • Previous by thread: Re: Using Stored procudures in WO
  • Next by thread: Re: Webobjects-dev Digest, Vol 4, Issue 62
  • Index(es):
    • Date
    • Thread