• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Does Acrobat SDK PDFBinder sample convert html files to PDF?

New Here ,
Jul 24, 2019 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?

TOPICS
Acrobat SDK and JavaScript

Views

1.2K

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
community guidelines

correct answers 1 Correct answer

Adobe Employee , Jul 24, 2019 Jul 24, 2019

No, AVConversionConvertToPDF hould work fine.

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

Votes

Translate

Translate
Adobe Employee ,
Jul 24, 2019 Jul 24, 2019

Copy link to clipboard

Copied

Of course.

The same AVConversion APIs will handle those formats as well.

Votes

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
community guidelines
New Here ,
Jul 24, 2019 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?

Votes

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
community guidelines
Adobe Employee ,
Jul 24, 2019 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?

Votes

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
community guidelines
New Here ,
Jul 25, 2019 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.

Votes

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
community guidelines
New Here ,
Jul 25, 2019 Jul 25, 2019

Copy link to clipboard

Copied

LATEST

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

Votes

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
community guidelines
New Here ,
Jul 25, 2019 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.

Votes

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
community guidelines
Community Expert ,
Jul 25, 2019 Jul 25, 2019

Copy link to clipboard

Copied

Can you convert the file in Adobe Acrobat?

Votes

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
community guidelines
New Here ,
Jul 25, 2019 Jul 25, 2019

Copy link to clipboard

Copied

Yes. Acrobat manually convert those files successfully.

Votes

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
community guidelines