Not able to read InDesign XMP File through ExtendScript and write in external xml - adobe-indesign

I am using InDesign 2020/2021, on my Windows 10. When I am trying to get XMP data for my .indd (InDesign document) using ExtendScript, The below line gives an error on the Adobe Extenscript toolkit
xmpFile = new XMPFile(myFile.fsName, XMPConst.FILE_INDESIGN, XMPConst.OPEN_FOR_UPDATE);
The is the data I want to write/read from InDesign
Can please someone suggest, how can I read all the XMP data and write it in an XML file

Related

Applescript: pdf to pptx conversion

I'm trying to convert pdf to pptx invoking adobe acrobat using AppleScript.
Below code executes fine without any error but there isn't any output created.
--somecode--
save active doc to filePath using conversion "com.adobe.acrobat.pptx"
conversion using text class works fine.
save active doc to filePath using conversion "com.adobe.acrobat.plain-text"
I found this on adobe forum, and it remained unresolved(pdf to html).
https://community.adobe.com/t5/acrobat-sdk/pdf-to-html-conversion-with-interapplication-communication-api-in-mac-os/td-p/9294002
Just to add I'm using adobe acrobat pro dc trial version.
Thanks
I was able to make it work. Used AppleScript to invoke adobe javascript.
Going through posts in various forums, found a user following the same approach for rtf documents.
set myScript to "this.saveAs(\""& output_file_path && "\", \"com.adobe.acrobat.pptx\");"
do script myScript
instead of
save active doc to filePath using conversion "com.adobe.acrobat.pptx"

how to read pdf with google OCR Text in uipath

I am new in uipath, I am using PDF Activity to read Pdf text with Google OCR, because I want to get pdf text with images in it.
First I have used only Pdf Text,It worked perfectly.
Then I have used Pdf with OCR Then It is showing this Error.
But when I run it It is giving this error:-
"Google OCR : Error performing OCR: TessErrorLoadEngine"
Please help me to read the Pdf file.
Use google OCR activity to read image based pdf files. Checkout sample flowchart that I have created for you.
enter image description here
You can convert PDF containing Images into readable PDF using Online PDF Conversion site and then use the PDF Text activity with new PDF.

How to convert HTML `NSString` to PDF file in osx?

I am new to the PDF creations from OSX.
I want to convert my HTML file to the PDF file,Please help me out which is best way to convert .
I have try to search but getting only IOS supported classes.
https://www.pdftron.com/pdfnet/mobile/ios_pdf_library.html
I have found below link for OSX but some method are deprecated and not properly working.
PDF Creation in Cocoa

InDesign Script for importing idml to indd document

I am using InDesign Server and a soap based application to communicate through the server.
I am able to get all fields of form used in indd document and also able to replace its text/value.
Now, I am looking to get all images used in indd doc and provide upload images options at my application and able to replace the images by user selected images. Can anyone provide script for identify and replace the images.
Secondly, for backward compatibility I have idml of an indd doc. Now how to import or open this idml and convert it to indd doc through script.
Thirdly, how to convert pdf into indd doc.
Please help me with these scripts.
To an IDML file into an .indd file, simply open it and save it
set theIDMLFile to "Macintosh HD:Users:me:Desktop:someidmlfile.idml"
tell application "InDesignServer"
set convertedIDMLDoc to open alias theIDMLFile
tell convertedIDMLDoc
save to ((characters 1 thru -6 of theIDMLFile) & ".indd") as string
end tell
end tell

Convert indesign output to html5

I want to write a viewer that convert in-design output format to html5 format and all the user design in adobe indesign can display in browser but i do not know which output is suitable for me, i think i can retrieve all info about the adobe indesign in idml export,but the problem is parsing such XML and display the tags in html5 format,i want to know is it possible the simple way to convert the output format into html5?
is it possible to download the adobe indesign SDK and use its method to this purpose?
You can use in5 to export HTML5 (layout intact) from InDesign.
Full disclosure: I am the creator of in5.
Exporting to EPUB would result in XHTML 1.1. The Epub file that InDesign generates is a zip file, in which you will find a number of files. (At least) one of them is an XHTML file.
XHTML 1.1 would surely be an easier source to use than the idml, however you will have to make sure that the ePub export is good enough to start with (the pages won't come out exactly the same as in InDesign).
Would that be a solution?
EPub export is supported from InDesign CS4 (JavaScript based export option, outside the object model, as I understand it and a built-in export option, part of the object model, from CS5).
You don't mention what version of InDesign you are using. CS5, CS5.5 and CS6 all allow you to export to HTML. The problem is that the HTML is version 4 and it create badly written CSS. What I like to do is to use XML to build my own HTML. Just create a set of HTML5 tags you want to use and then Map the existing Paragraph and Character styles to the XML tags.
When you're done you will have a basic content structure. Then I use the Structure pane to add different elements as needed. You can add Parents or children as you need to right there and then export to XML. When you save the file, just change its name to .HTML and edit the code to remove the one reference to "xml".
It takes a little time, but it is very doable.

Resources