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
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!!!

Link to comment
Share on other sites

  • 1 year later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.