mike-edel / ID-MultiPageImporter

Script for automating the placing (import) of PDF and InDesign files inside Adobe InDesign
121 stars 24 forks source link

Add Illustrator File Support #2

Closed aaronf81 closed 5 years ago

aaronf81 commented 6 years ago

It would be great to add the following capabilities:

  1. Edit script to accept Adobe Illustrator files (multi-artboard). With option to change layer visibility & which artboards (page numbers) to be imported.
  2. Added bonus would be to be able to select multiple files for import at once (this would probably not work with layer / page option as each file would be different).
aaronf81 commented 6 years ago

The select file dialogue window that comes up is still only allowing PDF or INDD files... the AI files are still greyed out (Indesign 2019 & 2018 on mac).

mike-edel commented 6 years ago

@aaronf81 part 1 should be solved in https://github.com/mike-edel/ID-MultiPageImporter/tree/basic-ai-support Just download that one instead of the release. Release is still the last known stable version - will only update that one once it's clear that I didn't break anything. ;)

mike-edel commented 6 years ago

Part 2 is rather tricky - kind of breaks the whole workflow of the tool

Would only work on the assumption that all the basic properties (page size, crop and so on) of the files are identical - those most probably are only read once when you run the script and they are not updated per file or per page.

aaronf81 commented 6 years ago

I did download this version, code looks good up front but looks like something around code line 103 & 1470 (if I had to guess)... I really don't know jsx well.. but looks like that's the hang up it's still calling only PDF and INDD for mac.

mike-edel commented 6 years ago

Ah, I apparently only added the windows specific code.

mike-edel commented 6 years ago

This will be a bit tricky as I don't have a mac to test but let's see...

mike-edel commented 6 years ago

ok, updated the mac side - should be fine

aaronf81 commented 6 years ago

I added " || fileToTest.name.indexOf(".ai") > -1" to line 1473 and 1614 ... seems to work now.. but I see you just did the same!

Other issue, is there a way to have it start import on currently selected page rather than starting at beginning of the document?

mike-edel commented 6 years ago

ok, cool 1473 and 1614 checks are different though: 1473 checks if >1 1614 checks if !=-1

start page is separate issue but you can at least tell it on which ID page to start in the dialog: 2018-10-26_19h43_45

mike-edel commented 6 years ago

If you want some kind of "start placing on current Doc Page" option feel free to open another issue for that. Can't promise I will be able to do it - this is the first time this comes up.

mike-edel commented 6 years ago

same for your second request from above - it's easier to handle feature requests if it's only one major feature per issue. Makes it easy to link code changes and releases with feature requests/issues.

aaronf81 commented 6 years ago

ahhhh Thanks!! I missed that selection option. You rock! Thank you thank you thank you!! I'm new to scripting and GitHub, so please excuse my nube'ness

mike-edel commented 6 years ago

Not an expert myself. We ended up needing the script so much that I kind of volunteered to add required fixes. ;)

mike-edel commented 6 years ago

@aaronf81 do you have any update on whether this works for you? I didn't have any time to test myself but would be good to know if it is something I can share with other users. Cheers,

Mike

aaronf81 commented 5 years ago

@mike-edel Seems to be working great! My team has been using it for a week or so and seems to have no issues. The only catch is the illustrator files must be saved with "Create PDF compatible file" check box ticked in save dialogue. Thank you again!!

mike-edel commented 5 years ago

Thanks Aaron, that prerequisite certainly needs to go into some kind of readme or info section on here. Will then merge the changes into the official version to make them publicly available.

aaronf81 commented 5 years ago

Of note (but has no effect on functionality) the dialogue box says "Select a PDF or InDesign file to place." You might consider changing to "Select a PDF, InDesign File, or PDF Compatible Illustrator File to place."

mike-edel commented 5 years ago

Good point, will take a look at it on the weekend.

mike-edel commented 5 years ago

Fixed in ba54dc2

mike-edel commented 5 years ago

Merged into Master. Will close this as "done" for now. If you run into issues please open a new issue. Thanks again for the suggestion - great idea!