PDF files that are not simple links?

Tim ignored_mailbox at yahoo.com.au
Fri Jul 22 15:45:18 UTC 2011

On Thu, 2011-07-21 at 16:45 -0500, Mikkel L. Ellertson wrote:
> One of my credit card sites used a Java applet to generate the PDF
> file. But it does not send the proper headers so that Firefox running
> on Linux knows it is a PDF file. So it is displayed as text. The funny
> thing is that it is treated as a file by Firefox running on Windows.
> It is a pain having to fire up Windows just to get one credit card
> statement.

You could try a Windows browser program through WINE.

The (probable) reason it works for Windows is that Windows tends to
ignore all the HTTP headers /about/ the data being sent, and snoops the
data as it comes in.  That's also why the thing is so vulnerable (send
it some executable crap, in a link pretending to be something else, and
your browser stupidly executes it).

You could try taking that approach by having some in-the-middle
application be your download handler for anything coming through the web
browser.  It'll snoop the file, then open it with the appropriate
application for the data.

e.g. With ye olde Gnome, supposedly one could have set Firefox to pass
such files to gnome-open.  And gnome-open would send PDFs to your
preferred PDF reader, etc.

> Oh yes - you can not save the text as a PDF file - it does not
> produce a valid PDF file.

Might be worth using the "file" command on what you do get, to see what
it thinks came through.

[tim at localhost ~]$ uname -r

Don't send private replies to my address, the mailbox is ignored.  I
read messages from the public lists.

More information about the users mailing list