• 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: Problem with PDFDocument initWithURL method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with PDFDocument initWithURL method


  • Subject: Re: Problem with PDFDocument initWithURL method
  • From: JanakiRam <email@hidden>
  • Date: Wed, 8 Aug 2007 14:32:38 +0530

Hi John,

           no.

            I'm using the following psudo code :
                        -- > document = [[PDFDocument alloc]
initWithURL: httpURL];

            The following HTTP URL will point to a servlet URL which
has the following sudo code.

   protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
    throws ServletException, IOException {
        response.setContentType("text/pdf");
        PrintWriter out = response.getWriter();

          // Create PDF Document using iText

         while ( i< noofrecordsindb ) {
             //fetch data
             // add content to pdf document
          }

           //close document

         // Write document to out
    }

     If no data found at db level i'm receving an empty pdf document.
If get the empty document as response , the initWithURL method of
PDFDocument is crashing.

    I've provided the same URL to Browsers such as Safari & Firefox ,
they are not crashing.

     On Safari empty PDF Page is shown. On Firefox save file dialog came out.

    Is it a known bug  with PDFDocument ?

-JanakiRam.


On 8/8/07, John Calhoun <email@hidden> wrote:
>
> On Aug 6, 2007, at 7:20 PM, JanakiRam wrote:
>             I'm using the PDFKit initWithURL to create the in memory
> PDF Document. I'm providing a Servlet URL as an argument to
> initWithURL method. My application crashes when the Servlet returns a
> empty PDF Document. One more scenario , if my web server is down , in
> that case also my app is crashing.
>
> Are you saying that this will crash:
>
> document = [[PDFDocument alloc] initWithURL: NULL];
>
> john calhoun—
>
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Problem with PDFDocument initWithURL method
      • From: John Calhoun <email@hidden>
    • Re: Problem with PDFDocument initWithURL method
      • From: David Duncan <email@hidden>
References: 
 >Problem with PDFDocument initWithURL method (From: JanakiRam <email@hidden>)
 >Re: Problem with PDFDocument initWithURL method (From: John Calhoun <email@hidden>)

  • Prev by Date: Re: Issue with running a process as root
  • Next by Date: Re: Issue with running a process as root
  • Previous by thread: Re: Problem with PDFDocument initWithURL method
  • Next by thread: Re: Problem with PDFDocument initWithURL method
  • Index(es):
    • Date
    • Thread