Jump to content

Decode base64 pdf file


compwhizmm

Recommended Posts

Hi,

 

I'm trying to work on a script that can decode an encoded pdf file from xml. I have the xml in a variable called $result. Inside that xml there is code for the pdf. It is encoded in base64. My question is how can I pull the data from the xml, decode it, and display the pdf file that it is.

 

Thank you!

Link to comment
https://forums.phpfreaks.com/topic/56778-decode-base64-pdf-file/
Share on other sites

I have tried that, but the page comes up blank. I'm not sure how to make it display as a pdf. Also, I'm not sure if i'm pulling the variables from the xml correctly.

 

Here is a sample of my xml.

 

<xmlsample><pdffile>Encoded pdf data</pdffile></xmlsample>

 

The above is in a variable called $result.

 

I tried to pull it out like this

 

$result['pdffile']

 

Is that correct?

 

I need to pull the encoded pdf data out, decode it, then display it as a pdf. Thanks or any help!!!

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.