We are sending email via smtp server with attached pdf documents which are created with the function SalReportPrintToFileEx and we are using Base64Encode to encode.
Everything worked well from the beginning but a few years ago the pdf documents began to become unreadable and could not be opened with Adobe Reader.
The problem may have something to do with the decoding of the document to do but right now we are sending emails via Outlook as a temporary solution.
Has anyone experienced this and possibly have a solution?
All help is welcome!
>> You wrote:
And that created PDF file is still readable now?created with the function SalReportPrintToFileEx
>> You wrote:
What changed in your system? Upgrade to a newer TD? Maybe upgraded from v4.2 or earlier -- before Unicode was introduced into TD -- to v5.2 or later with Unicode?few years ago the pdf documents began to become unreadable and could not be opened with Adobe Reader.
>>Could be that you are saving the encoded PDF into a LONG DB column(?) and with TD v5.2 and later a fetch back is being fetched back as a double-byte string and doesn't decode properly?
>> A TEST: How about creating the PDF, encode it, then just decode it and see if Adobe can read it OK.
The key in my opinion to debugging this is to go through each step you take and find out which step causes your code to 'break' -- after SalReportPrint?, after encode?, after decode?, after INSERT then SELECT the encoded file from the DB and decode and try to display?
I strongly suggest you write a small test app with SalReport, encode/decode, etc. so you can find out what broke 'a few years ago.'
Palm Springs, California
TD info. & samples: http://www.jeffluther.net/TD/
It seems that it has to do with the receiving system that decodes the message.
Who is online
Users browsing this forum: [Bing], [Ccbot] and 0 guests