Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 08, 2015 at 08:15 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 08, 2015 at 07:14 PM

    Hi Yakov;

      Happy New Year!

    How about something like this:  pdf2xml | SourceForge.net

    Regards ... Chris

    Add comment
    10|10000 characters needed characters exceeded