cancel
Showing results for 
Search instead for 
Did you mean: 

How to String-a-fy a blob to write via PBDOM

Former Member
0 Kudos

Friends

I have a little project that reads a PDF document (FileRead in streammode!) into a  BLOB and then must write out the pdf as XML via PBDOM.

How can I convert the BLOB into a string? == the string (<blob>) function is looking for string inside the blob which these bytes are NOT.

.NET has xmlwriter WriteBase64 ( ) method that will convert a byte array into characters.  But there does not appear to be a similar helper function in PB

How to do this in PB Classic?

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member190719
Active Contributor
0 Kudos

Are you just looking to convert the PDF binary data to a 64 bit encoded string?  If so, look at the CryptBinaryToString method.in the Windows API.  We use it from PB Classic to convert certificate public keys to a 64 bit encoded string to store in a varchar column.

Former Member
0 Kudos

Hi Yakov;

  Happy New Year!

How about something like this:  pdf2xml | SourceForge.net

Regards ... Chris