Skip to main content
Community Expert
March 11, 2024
Question

Compare indesign file to PDF

  • March 11, 2024
  • 1 reply
  • 295 views

Wrecking my brain with this so want to see if it's even possible before committing any more time to it.


Trying to automate with a script:

I want format an InDesign file and then compare that file to a PDF which is not formatted (or Word File)

What I want to do is go paragraph by paragraph to identify paragraph beginnings

In the PDF it might be 

 

This is a Heading Text
Text

but when importing some text seems to pop back a line for some reason


This is a Heading Text Text

So I am looking to identify the InDesign file vs the PDF (word file) to see if the start of paragraphs matches

It should be able to identify ....Text Text should be 
....Text
Text

And report back somehow.

Any ideas?

This topic has been closed for replies.

1 reply

Community Expert
March 11, 2024

Yeh I get it - I was trying my hand at Python - but it's way beyond me to get it working - I found some bits and bobs on the internet but can't get my head around what's required. 

 

I guess I could copy both to a .txt file an then see if there's a way to compare that way.

But sometimes I get the PDF file instead of the word file and saving to Word or converting to Word has pitfalls that are hard to assertain what has fallen out of alignment. 

 

I guess if both are plain text - I could overlay the files to reveal differences.

Might work - I'll investigate more.

Community Expert
March 11, 2024

Yeh I was trying that or similar and it's not what I want

 

I'm trying to challenge myself with some scripting as I'm able to do some things, but other things baffle me.

 

And the forums are great for ideas and or suggestions on approaches.