Tuesday, September 1, 2009

URL to pdf-documents with search parameter

I have a servlet that reads my blob with the pdf content and used the response.setHeader to set the Content-Disposition and assign a filename. Nice!

So I was looking for a way to pass a search parameter to the PDF viewer ...
I found the spec:
www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters.pdf
so I thought I had to use something similar to post on the http header ...

But NO!
All I had to do was to put it on my URL, and that was it!
so my .../document?id=NR should just be .../document?id=NR#search=THIS

Why did it take so long to find out?
Because it DID NOT WORK in FireFox! I tested in IE and it worked.
I tested in Opera and Chome - and it worked.


No comments: