DITA and XMetaL Discussion
PherricOxide January 8, 2010 at 11:55 pm
Script/Macro to generate PDF from ditamapJanuary 8, 2010 at 11:55 pmParticipants 0Replies 1Last Activity 12 years, 11 months ago
I'm attempting to create a script or macro that will automatically generate a PDF from a ditamap. I want to be able to convert several ditamaps to PDFs without any user interaction.
I am using XmetalL Author Enterprise 6.0. There does not seem to be any script methods to support this, and the record macro does not work either.
Is it possible to use XEP renderX and DITA Open Toolkit to do this directly? If so, what is the flow when generating a PDF with renderX? Does DITA-OT convert it to an FO file and renderX opens that? I've found plenty of documentation for DITA-OT, but hardly anything about renderX. Please let me know if you have any advice for the problem.Derek Read January 9, 2010 at 12:37 am
Reply to: Script/Macro to generate PDF from ditamapJanuary 9, 2010 at 12:37 am
Yes, you could build a solution yourself using the instructions that come with the DITA Open Toolkit and ANT scripts, etc. This would be applicable if you need to manually install the DITA OT on a server, or have other, perhaps more complex requirements. This is all documented with the DITA OT documentation.
However, it is possible to generate output once via XMetaL Author Enterprise and then have a look at the .bat and associated files that XMetaL Author Enterprise creates to see how it does it.
We have no instructions for working with these files and currently do not plan to document this process, but if you are able to read a DOS .bat file it should be fairly straightforward to figure out.
1. Generate output for the particular deliverable you wish to produce for a particular DITA map. In this example I will assume PDF.
2. When you see the “Output Successful” dialog click the “Open Folder” button to check that the PDF was generated.
3. Leave the instance of Windows Explorer from step 2 open but delete the generated PDF (or the entire contents of that folder) so we can prove it is generated again in the next steps.
4. Shut down XMetaL Author Enterprise to prove you don't need it now.
5. Do not move your map file.
6. Using a new instance of Windows Explorer navigate to the following location (paste into Address bar):
That should take you somewhere similar to the following path:
C:Documents and Settings
7. Run the file called dita-call.bat. A DOS command window should appear while generating output then go away and your PDF should reappear in the output folder (in your other copy of Windows Explorer from step 2).
Beyond this we cannot really provide more help (our Professional Services team or one of our partners might be contracted to set up specific or more advanced configurations). However, the files in that folder, together with the copy of the DITA OT that we install and your source files are all that is required to produce output from now on provided you are doing it on this machine. If you wish to use a different copy of the DITA OT, modify the locations of files, do this on a different machine, etc, then you will need to begin poking around in the .bat files to figure out what's going on there. However, if you continue working with the same map file at the original location you can modify the map or associated topics and the same .bat files should produce updated output (it is really the paths to the map that matters most, but the DITA OT needs to be found as well). You can obviously also modify those values by editing the .bat files directly if you are careful and can figure them out.
- You must be logged in to reply to this topic.