Save PDF

  • Thread starter Thread starter test
  • Start date Start date
T

test

How can I save a PDF file within an XML document using VB.NET?

<Document>
<DocumentType>PDF</DocumentType>
<EncodeType>Base64</EncodeType>
<Content>[PDF DatA]</Content>
</Document>
 
test said:
How can I save a PDF file within an XML document using VB.NET?

<Document>
<DocumentType>PDF</DocumentType>
<EncodeType>Base64</EncodeType>
<Content>[PDF DatA]</Content>
</Document>

Check out 'Convert.ToBase64String'. You can use the 'FileStream' and
'BinaryReader' classes to read the data from an existing PDF file, for
example, convert it to a base 64 string and insert it in the XML file.
 
That sounds great. I will give it a try.

Thank you!

- Cheryl

Herfried K. Wagner said:
test said:
How can I save a PDF file within an XML document using VB.NET?

<Document>
<DocumentType>PDF</DocumentType>
<EncodeType>Base64</EncodeType>
<Content>[PDF DatA]</Content>
</Document>

Check out 'Convert.ToBase64String'. You can use the 'FileStream' and
'BinaryReader' classes to read the data from an existing PDF file, for
example, convert it to a base 64 string and insert it in the XML file.
 
This worked great! I saved a PDF file to an element in an XML file. I then
retrieved the PDF from the XML file and saved it to SQL Server.

- Cheryl

Cheryl said:
That sounds great. I will give it a try.

Thank you!

- Cheryl

Herfried K. Wagner said:
test said:
How can I save a PDF file within an XML document using VB.NET?

<Document>
<DocumentType>PDF</DocumentType>
<EncodeType>Base64</EncodeType>
<Content>[PDF DatA]</Content>
</Document>

Check out 'Convert.ToBase64String'. You can use the 'FileStream' and
'BinaryReader' classes to read the data from an existing PDF file, for
example, convert it to a base 64 string and insert it in the XML file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top