• 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
Re: No Instance issue from WebPDFReports 1.0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No Instance issue from WebPDFReports 1.0


  • Subject: Re: No Instance issue from WebPDFReports 1.0
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 24 Oct 2005 10:58:01 -0700


On Oct 23, 2005, at 9:50 PM, Koksiong wrote:

hi,

i am facing a critical problem using WebPDFReports 1.0.

i used to generate quite a number of pdf daily, for each generation, it
may contain up to 80 pages. for the first generation, it always works, but
if i continue to generate the pdf , it just gives No Instance error. Once
it occurs, i need to restart the webobject instance.


Sounds like the application is running out of memory. Check the logs for "OutOfMemory".


the other modules are working except the pdf component. is it because the
number of pages generated is too big ?


The problem is at least related to that. I can see from your code below that the response is getting saved in the page cache, that means it will hang around consuming memory for quite some time. You will need to return it in some other manner or override Session.savePage() to avoid this going into the page cache. I would also suggest creating an EC on the PDF page and discarding it after use.


Chuck

please advice.

rgds,
koksiong

ps: the following are the code

public WOActionResults goPrintAction()
{
generateVehicleDeliveryListPDF nextPage =
(generateVehicleDeliveryListPDF)pageWithName ("generateVehicleDeliveryListPDF");
nextPage.setEc(ec);
nextPage.setATransactionArray (aTransactionArray.mutableClone());
PDFPage pdfPage = (PDFPage)pageWithName("PDFPage");
HTML2PDFConvertor pdfConvertor = new HTML2PDFConvertor();
pdfConvertor.createDocument("US
Letter",HTML2PDFConvertor.LandscapeOrientation);
pdfConvertor.setPaperSize(new PaperSize(792,612));
pdfConvertor.setTopMargin(5);
pdfConvertor.setLeftMargin(5);
pdfConvertor.setRightMargin(5);
pdfConvertor.setBottomMargin(5);
pdfConvertor.setPrintsVerticallyCentered(false);
pdfPage.setConvertor(pdfConvertor);


                pdfPage.appendComponent(nextPage);

        return pdfPage;
    }

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden


--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________ 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
  • Follow-Ups:
    • Re: No Instance issue from WebPDFReports 1.0
      • From: Jean-François Veillette <email@hidden>
References: 
 >No Instance issue from WebPDFReports 1.0 (From: "Koksiong" <email@hidden>)

  • Prev by Date: Re: Advice on datetime manipulation
  • Next by Date: Re: SSL with WO 5 documentation?
  • Previous by thread: No Instance issue from WebPDFReports 1.0
  • Next by thread: Re: No Instance issue from WebPDFReports 1.0
  • Index(es):
    • Date
    • Thread