I have received byte array from web service call. I am able to generate the PDF from that but its displays error “The file “abc.pdf” could not be opened. It may be damaged “.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
@NisithSeth:
I’d recommend base64 encoding your bytes and to include the encoded base64 string in your xml. Then, when you are parsing the xml, you can base64 decode the string to get an NSData which you can use to create PDF. You can find multiple code snips of how to base64 encode/decode in obj-c using Google.