0

At work, editors create books in XML which is then imported into Indesign and then archived as PDFs of the final print copy. Additional edits are made directly to InDesign and final PDF during proofs and layouts which means the XML goes out of sync with the final contents.

How would you go about comparing the contents of the XML and its corresponding final InDesign or PDF file so that any changes made can be identified and the XML brought up to date? The approach I'm trying to take is to

  1. Extract the text from PDF \ InDesign
  2. Transform the XML with script
  3. Use a diff tool to spot the differences between the two

Steps 2 and 3 seem sound but pulling text out from the PDF is tricky due to multi-column layouts and heavy design making "Save as Text" not an option.

Is there a better way to do this that anyone knows of? Would working with the InDesign file rather than the PDF be easier? Is there a clever tool that would make everything simpler?

4
  • As you've identified, getting text out of PDFs is painful... it would be easier to take the original XML through the process, produce another PDF (without the changes), and then diff the two PDFs as images - this will also catch formatting and other changes that may not be described in the XML... pdftk and compare (from ImageMagick) can do this, and would allow the process to be scripted on Linux and probably others... would that be helpful?
    – Attie
    Commented May 24, 2021 at 15:43
  • This is a suboptimal workflow. Changes should always be made in the original source document. Or, in your case, if the changes are made in InDesign, they should immediately also made in the source document (but this is the second-best approach)
    – Max Wyss
    Commented May 26, 2021 at 6:09
  • @Attie I didn't know that you could diff two pdfs as images so thank you for that. However the flowing of XML into InDesign and then into a PDF isn't an automatic thing with images and many many layout tweaks so I'm not sure that would work in this case. Commented May 27, 2021 at 8:42
  • 1
    @MaxWyss Yes changes should be made in the source document and then propagated forward but as noted above this would not work in our scenario because then we would have to reflow and relayout everything again. Hence what I'm trying to achieve which is identifying all the changes once the InDesign \ PDF has been finalised. Commented May 27, 2021 at 8:42

0

You must log in to answer this question.

Browse other questions tagged .