Importing Html into Adobe Indesign

15,186

Solution 1

You'll need to translate the HTML tags into CharacterStyles, and apply those to the XML on import.

The tricky thing is that CharacterStyles can't be applied nested like HTML can, so you need to make a CharacterStyle for each combination that might be present. Or you can apply styles to the specific run of text, with a script.

Solution 2

Pandoc now support export to ICML (Adobe InCopy's XML format that can be "placed" in InDesign documents). To convert HTML to ICML:

pandoc --standalone -o output.icml input.html

See Importing Markdown in InDesign in the pandoc wiki for details around the workflow.

Solution 3

This tool is a decent HTML to InDesign importer: https://www.id-extras.com/html-import-script

It may take some rework, but it brings in styles that you can edit and has saved me a bunch of time.

Solution 4

We have had some bad experiences importing xml into InDesign directly.

If you are still having trouble with this issue, check out the open source Ickmull code library. It converts an xhtml file to an idml file, that can then be opened in InDesign. This might be a better web to print workflow for you.

http://code.google.com/p/ickmull/

Solution 5

Maybe you can use a Markdown to InDesign translater as a starting point: http://www.jongware.com/markdownid.html

Share:
15,186
Paritosh
Author by

Paritosh

Updated on June 24, 2022

Comments

  • Paritosh
    Paritosh about 2 years

    We are currently working on an pdf version of a newspaper at work, we have a .net website which captures the articles to publish, storing the content entered as html, so we can maintain styles like bold, underline, strike out.

    Once this is stored in the database we are planning to use Indesign to create the pdf. We currently we have a template built, but when we generate an xml document and import into Indesign the html tags are just written out. Is there a way around this, to get Indesign to maintain the tags as they would be in html? We just need some simple ones, like bold, strikeout, underling, center align.

    Thanks.

  • Paritosh
    Paritosh about 11 years
    The group working on the project ended up doing something similar to this. They opened up the idml file, it contains xml files, then converted the html into characterstyles and recreated the xml files needed and packaged that back into an idml file, which InDesign could then open.
  • Justin Putney
    Justin Putney about 6 years
    InDesign has one of the best extensibility layers of any software on the planet, and the IDML format is XML. This doesn't seem like a good target to complain about "closed" standards. There is an open format (IDML), it's just that the binary (INDD) executes faster. You can still create and edit an IDML (like you can with a DOCX) and open it.
  • Peter Krauss
    Peter Krauss over 5 years
    This is the best answer! And pandoc is the best way to get a first contact with the ugly .icml (the Indesin XML is closed to the W3C's XHTML+CSS open format ecosystem). We not need to use InDesign for (high quality) PDF automated contents generation... See also print-css.rocks