Import XML into Indesign to convert to PDF

Post Reply
KenCratty
Newbie
Posts: 7
Joined: Wed Feb 28, 2018 11:13 pm

Import XML into Indesign to convert to PDF

Post by KenCratty » Mon Jun 29, 2020 11:59 am

I'm trying to use a flow that will take the XML and create a document in Indesign. I have my XML file and the Indesign template. It looks like I need a script to open the Indesign file template and import the Indesign file. Can someone help me with this? I don't know scripting.

jan_suhr
Advanced member
Posts: 326
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Import XML into Indesign to convert to PDF

Post by jan_suhr » Mon Jun 29, 2020 12:13 pm

You need the following JavaScript in the InDesign configurator property Command
Then as Argument 1 you specify the name of the XML file.

The incoming jobb to InDesign is the InDesign template file and the XML is easiest picked up from a folder where Switch stored it.

Code: Select all

var NameOfFile = $arg1;
$doc.importXML( File(NameOfFile) );
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps

KenCratty
Newbie
Posts: 7
Joined: Wed Feb 28, 2018 11:13 pm

Re: Import XML into Indesign to convert to PDF

Post by KenCratty » Tue Jun 30, 2020 12:14 pm

Thank you. I saw in another post you demo a simple business card flow using your csvXML tool. Can you share that flow?

KenCratty
Newbie
Posts: 7
Joined: Wed Feb 28, 2018 11:13 pm

Re: Import XML into Indesign to convert to PDF

Post by KenCratty » Wed Jul 01, 2020 3:42 am

Here is the document of the flow I built. I'm getting an error 'null is not an object'. Please let me know what I'm doing wrong.
The attachment flow25Doc.zip is no longer available
flow25Doc.zip
(20.81 KiB) Downloaded 5 times

Post Reply