Free Support Forum - aspose.com

Doc to PDF conversion failed for iOS SDK

Hello Sir/madam,

I couldn’t find iOS in the platform selection.

I downloaded the iOS SDK from github repo. We followed the same steps which you used in the Unit Tests file.

What I am trying to do is, converting the .docx file to .pdf. But I couldn’t open the converted file. It’s saying the PDF was corrupted. I just debug the result. It is saying the following message “{“Message”:“An error has occurred.”}”.

And we tried with the html conversion which is saying that the “Bad Request : Invalid verb”. I could not upload the html page due to a filter. But this is the content I found that html file.
“Bad Request : Invalid verb”
"HTTP Error 400. The request verb is invalid."

Can you please assist me regarding this. I checked in the related files but couldn’t get any help.
I am attaching the input file(.docx) and the output file(pdf).

Thanks,
Bharath.

Hi Barath,

Can you please share your complete code? I was not able to notice this issue using the example from http://www.aspose.com/docs/display/wordscloud/Convert+Word+to+Images,+Multipage+TIFF,+HTML,+PDF+and+other+File+Format+using+Cloud+Storage. Please test with another simple test file (smaller in size) and let us know if it works or fails.

Can you please also try the REST example given at above mentioned link and run it two three times to confirm if it fails on all attempts? Please also share your App SID and Key by following the instructions from http://www.aspose.com/corporate/purchase/faqs/send-license-to-aspose-staff.aspx if the problem persists.

As far as HTML to PDF is concerned, you can ZIP your HTML file and then attach to this forum thread.

Best Regards,

Hi,
Actually, I used this method
convertWordDocumentOnDevice:(NSData
*) fileData toFileFormat:(NSString *) designatedFormat
andSaveWithName: (NSString *) outFileName


for a local file conversion.

And about the REST example, I could not find any example for local file conversion.

Attaching the source code. And, I wrote the code in the AppDelegate.m file. and attaching the converted html file. Regarding the App SID and key, you can find it in the AppDelegate. and Secret Please have a look into it.

Thanks,
Bharath.

Hi Bharath,

In fact you are trying to process a larger than 5 MB file with a trial account. You can process up to 5 MB files with a trial account. Please try with smaller size files.

Best Regards,