BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi Khurram,
Thank you for using Syncfusion Products.
Can you please provide us the issue reproducing sample along
with the corrupted PDF document. It would be more helpful for us to investigate
on this.
Please let us know if you have any concerns.
Regards,
George
My apologies for the delayed response. I didn't know that there is no automated message generated when someone responds to a post. Attached is the code that we are working on to store a PDF on SharePoint. The PDF gets generated correctly and can be saved to the desktop without any issue but when it is transferred to SharePoint, it becomes corrupt. Not sure if utf-8 encoding has anything to do with it or not.
Hi Khurram,
Thank you
for your update.
On further
analysis, we found that the issue is not due to the Syncfusion library. The PDF
document contains content streams which is in encoded format, while converting
the PDF document to string (UTF8/Unicode) the content streams gets corrupted.
This causes the problem in opening the PDF document in Adobe Reader.
Please let
us know if you need any further assistance.
Regards,
George.
Thank you very much George for your kind help in this. How can we avoid that conversion of PDF into Unicode? Is it a limitation of the Windows 8 SDK?
Hi Khurram,
We regret
for the inconvenience caused.
On further
analysis, we have found that this behaviour can be overcome by the using
ToBase64String to encode the PDF byte[] to string and FromBase64String to
decode string to PDF byte[] in the destination. On saving the byte[] in the destination
the PDF document can be opened without any error in the Adobe Reader.
string encodedPdfData = Convert.ToBase64String(pdfByteArray);
byte[] decodedPdfData = Convert.FromBase64String(encodedPdfData);
Please let
us know if you need any further assistance.
Regards,
George