IText pdf won't open in browser

A pdf generated with iText will not open in IE with a machine that has Adobe Pro installed. Works great otherwise. Browser setup? Thanks in advance.

related code: Response.ContentType = "Application / pdf";

-1


a source to share


1 answer


John is hinting at this questioningly, but let me state it.

I see a similar problem in that I cannot open PDF in IE directly. And that's why:

  • I have Acrobat Pro (9.4 at the moment) installed and Adobe only offers a 32-bit build.
  • I have Windows 7 64-bit which will only allow me to install IE 64-bit.
  • Applications / DLLs with different bit widths may not separate the process.
    • Therefore IE 64-bit cannot talk to 32-bit Acrobat.
    • So there are no PDFs in IE 64-bit browser.

I'm not sure if I need to annoy MS or Adobe for this, so I'll use my favorite shopping strategy (ouch) and go with "Both!"




There is nothing special about this PDF that would prevent it from opening in a browser. If a single PDF opens, all valid pdfs will open . They cannot be "optimized for web browsing" (AKA "linearized", configured for progressive loading), but they should still open.

It seems to me that if your PDF is particularly large (or your connection is especially slow), you can expect the first page to appear as soon as you get into the linearized PDF and decide it doesn't work because you have to wait for it to load the entire file before you can view it.

iText does not support linearization, at least not from 5.0.5. If we ever add support, it will most likely start life as an extra pass that you have to do on an existing PDF, and eventually move on to a more efficient implementation if people complain enough.

  • PS: Linearizing large forms doesn't work that well because the entire formal part of the file (and any doc-level script level) must be loaded before the first page is displayed.

  • PPS: I'm sure there is no point in linearizing a 1-page PDF. The whole purpose of linearization is to sort the PDF so that whatever the first page needed is in front of the file, so download that part first. When you only show one page, I believe it is just additional overhead.

+1


a source







All Articles