Re: Problem with PDFDocument initWithURL method
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