I don't have any type of PDF verification tools, but the PDF I generate
_looks_ okay in the browser window. Additionally, if I don't set the content
type, the PDF content is sent to me as an HTTP dowload.  The file generated
thus opens in both Adobe Acrobat Reader and Ghostscript just fine.

Having said all that, I don't think the problem is with the PDF.  I think
the problem has to do with the header sent when I tell the browser "Here
comes PDF content".  Consider the following:

//On a SSL servlet...
class Test {
    doGet (HttpServletRequest request,
                HttpServletResponse response)
                       throws IOException,
                                  ServletException {

        //Here's ALL it takes to generate the error...
        response.setContentType("application/pdf");
    }
}

No PDF content, no servlet errors, nothing.  Heck, the servlet example
doesn't even _do_ anything.  Just "Please let me send you PDF"- and up pops
the error.  Interestingly enough, the final PDF content (in the real
servlet) _looks_ exactly the same on the client end regardless of whether I
select yes or no in the dialog box.

I'm on the verge of sniffing the traffic between server and client and
encoding the results of "setContentType" by hand in the
ByteArrayOutputStream to see what happens.  I have a feeling that Tomcat is
sending the header information in clear text when I set the content type.  I
was hoping someone had already done the legwork.

I'd be interested in any more thoughts.

<=======================>
Chris Parker
Programmer/Analyst
Health Care Services Division
California Youth Authority

----- Original Message -----
From: Dave Ferguson <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 09, 2002 3:49 PM
Subject: Re: [iText-questions] CROSS-POST https and iText


> This error ususally happens when one page in a frameset fails to load
> (see http://support.microsoft.com/default.aspx?scid=kb;en-us;184960).
> In your case, I assume you don't have frames, so maybe it is just a case
> where the PDF generation fails part way through and thus IE gives you
> that message...
>
> Chris Parker wrote:
>
> > Greetings all,
> >
> > First off, I know this is a blatant cross-post (and I apologize), but
I'm
> > not getting any action in the Tomcat User's List, and since this
> > specifically regards PDF content, I'm hoping someone has solved this
> > problem.
> >
> > I have a servlet that dynamically generates PDF content using iText, and
> > serves that content out to a user's browser.  However, in order to tell
the
> > user's browser to expect PDF content, I first have to set the content
type.
> > Assuming the servlet is responding via SSL, when I call this code:
> >
> >> response.setContentType("application/pdf");
> >>
> >
> > I get this error:
> >
> >> "This page contains both secure and nonsecure items."
> >>
> >
> > FWIW, I whipped up a quick servlet that contains ONLY that one line of
code,
> > and I got the error message.  So it's certainly not anything in my code.
> >
> > Any thoughts?
> >
> > <=======================>
> > Chris Parker
> > Programmer/Analyst
> > Health Care Services Division
> > California Youth Authority
> >
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > iText-questions mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> >
> >
> >
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to