Welcome to Dream.In.Code
Become a PHP Expert!

Join 150,166 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 2,324 people online right now. Registration is fast and FREE... Join Now!




Display PDF

 
Reply to this topicStart new topic

Display PDF

Computer_
31 Aug, 2008 - 11:35 AM
Post #1

New D.I.C Head
*

Joined: 22 Aug, 2008
Posts: 16



Thanked: 1 times
My Contributions
I'm trying to display a simple stream pdf binary :

CODE

header('Content-type: application/pdf');
            echo base64_decode((string)$xml_invoice->Invoice->BinaryData);


... and I get a dialog box to download .

What I'm missing here ?
Assume that $xml_invoice->Invoice->BinaryData is binary stream data.

Any help I will appreciate.
User is offlineProfile CardPM
+Quote Post

CTphpnwb
RE: Display PDF
31 Aug, 2008 - 12:03 PM
Post #2

D.I.C Regular
Group Icon

Joined: 8 Aug, 2008
Posts: 481



Thanked: 32 times
My Contributions
I'm not sure, but I have to say that I try to avoid using a browser to view a pdf whenever possible. It's much better/faster to download the file and view it locally. If a site tries to force me to use the browser, I look for another site.


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 02:54AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month