Opening PDF String in new window with javascript

Posted by DaveC on Stack Overflow See other posts from Stack Overflow or by DaveC
Published on 2010-05-10T18:26:41Z Indexed on 2010/05/10 18:44 UTC
Read the original article Hit count: 177

Filed under:
|

Hello,

I have a formatted PDF string that looks like

%PDF-1.73 0 obj<<< /Type /Group /S /Transparency /CS /DeviceRGB >> /Resources 2 0 R/Contents 4 0 R>> endobj4 0 obj<> streamx??R=o?0??+??=|vL?R???l?-???,???Ge?JK????{???Y5?????Z?k?vf?a??`G????Asf?z????`%??aI#?!;?t???GD?!???<?????B?b??

...

00000 n 0000000703 00000 n 0000000820 00000 n 0000000926 00000 n 0000001206 00000 n 0000001649 00000 n trailer << /Size 11 /Root 10 0 R /Info 9 0 R >>startxref2015%%EOF

I am trying to open up this string in a new window as a PDF file. Whenever I use window.open() and write the string to the new tab it thinks that the text should be the contents of an HTML document. I want it to recognize that this is a PDF file.

Any help is much appreciated

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about pdf