• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

JavaScript code for customisable book

New Here ,
May 06, 2017 May 06, 2017

Copy link to clipboard

Copied

Hi all,

Lone time Adobe user just getting into scripting here. I have been teaching myself the basics, and it's going pretty well, but I feel it would be a lot faster to ask for some help here.

I am am writing a book that will need to:

1) put a different name for the character in each book (so finding whatever I typed as the placeholder and replacing it with a name throughout the whole document)

2) re-link lots of images. The idea is that there will be placeholder graphics throughout the book but I'll have a library of different character graphics I'll want to re-link / replace in each book. These are all created in the same location in Illustrator so will drop in exactly in the right place

So I'm looking for JavaScript code, or help with writing it, that looks at a set of parameters someone sent me (like name, hair colour etc.), replaces text and re-links images to the appropriate ones in the library, then exports as a PDF ready for print. Ideally, I'll need the script to go through multiple sets of parameters (different people with different names, hair colours etc.) and do the above for each.

Its a big task I know, but any assistance from anyone, even with only a component of this, would be really useful and greatly appreciated.

Thanks  advance!

TOPICS
Scripting

Views

360

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 06, 2017 May 06, 2017

Copy link to clipboard

Copied

Hi,

For moderators: This thread should be placed into "InDesign Scripting" forum!

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2017 May 06, 2017

Copy link to clipboard

Copied

You don't really need a script to do all of this.

1. To globally "replace" a name or some other text, make it a Text Variable.

2. To globally replace a set of images, do the following:

a. Put all of the variable images inside a folder of their own.

b. For variants, create a new folder for each and put the variant images in this. Make sure the filenames match those in the other folder (and, ideally, their file type and size).

c. To quickly swap the images, Relink your images to this new folder.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2017 May 06, 2017

Copy link to clipboard

Copied

Hi there,

Thanks for this. Yes it's really easy to Find & Replace text and relink to folders so they automatically update all same-named links, but the issue is that we're anticipating quite a lot of variations in a short timeframe so to save doing this document by document myself, I'm ideally looking to write a script to do this process automatically by itself many times over, depending on data that's put in. Ideally opening the document, doing the changes, Saving As and exporting as PDF, then moving onto the next version of the document.

The input data would be in an identical format (order form), probably in an email inbox, but have a different name, hair colour, eye colour etc.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2017 May 06, 2017

Copy link to clipboard

Copied

LATEST

Moving to InDesign Scripting

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines