Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TouchUp Text Tool: Find/Replace? 1

Status
Not open for further replies.

Crassinnola

Technical User
Aug 28, 2007
26
US
I have several hundred .pdfs that all need to have a small edit done to them. Each of them needs to have a word changed AND the "Revised Date" changed from whatever it is.

The "Revised Date" is in the bottom left corner in parentheses, but each form's Revised Date is different (i.e., 03/07, 08/06, 05/07, etc.)

Is there a way I can do these in a batch? With each one, I have to change the acronym "PHL" to "PHL-S", then update the Revised Date to "09/07."

The forms were originally created in InDesign, but with most of them I no longer have the original ID file.
 

...bit of a pain really, i know of no way to batch edit text in pdfs, one way might be to flow them back into indesign, overlay a master text frame for each page with the revised date, if the PHL text is in a different location this would become problematic and also depending on the way the text is formatted (white background or different colored background/text)...

...in any case this applescript is useful for importing multiple page pdf files (tested in CS3) into indesign. PDF pages do need to be same size into indesign, changing the crop box is detailed in the code below by changing two words in the script.

Also bear in mind you can create multiple page pdf's using acrobat combine tool and also extract the re-created pdf pages into multiple pdf's too via acrobat, using the extract command, using adobe bridge you can rename the extracted pdf files if need be

Andrew

=============================

tell application "Finder"
activate
set mypdf to choose file with prompt "Choose the PDF you want to place in InDesign" as string
open file mypdf using application file id "CARO"
tell application "Adobe Acrobat Professional"
activate
set b to get crop box of page 1 of active doc
set w1 to item 3 of b as integer
set w0 to item 1 of b as integer
set h1 to item 2 of b as integer
set h0 to item 4 of b as integer
set PDFheight to (h1 - h0) / 72
set PDFwidth to (w1 - w0) / 72
set pagecount to count every page of active doc
set idh to PDFheight & " i" as string
set idw to PDFwidth & " i" as string

end tell
set idpage to 1
set pdfpage to 1

tell application "Adobe InDesign CS3"
activate
set mydoc to make document
tell document preferences of mydoc
set facing pages to false
set page width to idw
set page height to idh
set pages per document to pagecount

end tell
repeat pagecount times
set page number of PDF place preferences to pdfpage

-- the "crop PDF" parameter can be changed to the following: crop content/crop art/
--crop PDF/crop trim/crop bleed/crop media/crop content/crop art/¬
--crop PDF / crop trim / crop bleed / crop media

set PDF crop of PDF place preferences to crop PDF

set mypdfpage to place mypdf on page idpage of mydoc
set idpage to idpage + 1
set pdfpage to pdfpage + 1
end repeat
end tell
end tell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top