Copy link to clipboard
Copied
Hello, I was testing the sample with the given test folder. It had a htm file in it and also a txt. When I rid of the filter in plugin and ran the plugin in Acrobat, it could not convert the txt and htm files into PDF. Is there any way to do so for these file types?
No, AVConversionConvertToPDF hould work fine.
What error(s) are getting returned when you try the text and HTML file?
Copy link to clipboard
Copied
Of course.
The same AVConversion APIs will handle those formats as well.
Copy link to clipboard
Copied
Thank you for answering.
I noticed that the sample uses AVConversionConvertToPDF method, but it is not successful for the txt and htm files inside the test folder. Does the "conversion handler" that AVConversionConvertToPDF uses not convert those two type? Am I suppose to use a different method and approach it differently than what the sample has?
Copy link to clipboard
Copied
No, AVConversionConvertToPDF hould work fine.
What error(s) are getting returned when you try the text and HTML file?
Copy link to clipboard
Copied
Okay. I found out that the conversion return kAVConversionSuccessAsync. When I get rid of the block that return to continue the function inside the if, it crashed Acrobat after I ran the plugin.
Copy link to clipboard
Copied
Fixed it. I set kAVConversionASyncOkay to kAVConversionNoFlags to disallow asynchronous conversion. Thank you
Copy link to clipboard
Copied
There weren't any specific error. Rather, a message box "Cannot convert the file." There is an if statement to see if the conversion was successful. If not, the message box appears and get out of the function.
Copy link to clipboard
Copied
Can you convert the file in Adobe Acrobat?
Copy link to clipboard
Copied
Yes. Acrobat manually convert those files successfully.