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

PDF to HTML Conversion with Interapplication Communication Api in Mac OS

New Here ,
Jul 26, 2017 Jul 26, 2017

Copy link to clipboard

Copied

I'm trying to convert a PDF file via the Interapplication Communication API of Adobe Acrobat using Adobe Acrobat Pro DC 2017.009.20058 Trial Version.

My script doesn't appear to be converting my file from PDF to HTML.  It works for some formats (e.g. plain-text), but not for others (e.g. spreadsheet, xlsx).  Perhaps it is because I'm using the trial version?   Here is my AppleScript code:

set myfile to "/PATH/pdf_schedule.pdf"

set outfile to ("PATH:pdf_schedule.html" as text)

tell application "Adobe Acrobat"

  -- get every conversion

  activate

  open myfile

  save document 1 to file outfile using conversion "com.adobe.acrobat.html"

  close document 1

end tell

And `get every conversion` returns this (with html highlighted in blue):

{EPS Conversion "com.adobe.acrobat.eps" of application "Adobe Acrobat", conversion "com.adobe.acrobat.xlsx" of application"Adobe Acrobat", conversion "com.adobe.acrobat.html" of application "Adobe Acrobat", conversion "com.adobe.acrobat.jpeg" of application "Adobe Acrobat", conversion "com.adobe.acrobat.jp2k" of application "Adobe Acrobat", conversion"com.callas.preflight.pdfa" of application "Adobe Acrobat", conversion "com.callas.preflight.pdfe" of application "Adobe Acrobat", conversion "com.callas.preflight.pdfx" of application "Adobe Acrobat", conversion "com.adobe.acrobat.png" ofapplication "Adobe Acrobat", PostScript Conversion "com.adobe.acrobat.ps" of application "Adobe Acrobat", conversion"com.adobe.acrobat.pptx" of application "Adobe Acrobat", conversion "com.adobe.acrobat.rtf" of application "Adobe Acrobat", conversion "com.adobe.acrobat.accesstext" of application "Adobe Acrobat", conversion "com.adobe.acrobat.plain-text" ofapplication "Adobe Acrobat", conversion "com.adobe.acrobat.tiff" of application "Adobe Acrobat", conversion"com.adobe.acrobat.doc" of application "Adobe Acrobat", conversion "com.adobe.acrobat.docx" of application "Adobe Acrobat", conversion "com.adobe.acrobat.xml-1-00" of application "Adobe Acrobat", conversion"com.adobe.acrobat.spreadsheet" of application "Adobe Acrobat"}

TOPICS
Acrobat SDK and JavaScript

Views

1.4K

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
Enthusiast ,
Nov 08, 2019 Nov 08, 2019

Copy link to clipboard

Copied

LATEST

I got mixed results on this...

I was able to get the com.adobe.acrobat.jpeg to work, no problem, but no luck so far with com.adobe.acrobat.html.

The file tested perfectly using the menu option  File > Export To > HTML Web Page, but failed using AppleScript

 

Have the coding specs changed since 2017?

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