Does Acrobat SDK PDFBinder sample convert html files to PDF?

Jul 24, 2019

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?

TOPICS
Acrobat SDK and JavaScript

Views

250

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Does Acrobat SDK PDFBinder sample convert html files to PDF?

Jul 24, 2019

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?

TOPICS
Acrobat SDK and JavaScript

Views

251

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 24, 2019 0
Adobe Employee ,
Jul 24, 2019

Copy link to clipboard

Copied

Of course.

The same AVConversion APIs will handle those formats as well.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 24, 2019 0
Jul 24, 2019

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 24, 2019 0
Adobe Employee ,
Jul 24, 2019

Copy link to clipboard

Copied

No, AVConversionConvertToPDF hould work fine.

What error(s) are getting returned when you try the text and HTML file?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 24, 2019 0
Jul 25, 2019

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 25, 2019 0
Jul 25, 2019

Copy link to clipboard

Copied

Fixed it. I set kAVConversionASyncOkay to kAVConversionNoFlags to disallow asynchronous conversion. Thank you

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 25, 2019 0
Jul 25, 2019

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 25, 2019 0
Jul 25, 2019

Copy link to clipboard

Copied

Can you convert the file in Adobe Acrobat?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 25, 2019 0
Jul 25, 2019

Copy link to clipboard

Copied

Yes. Acrobat manually convert those files successfully.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 25, 2019 0