My boss just told me that I have to convert all of our employee badges from horizontal to vertical. I have been thinking about how I could do this without individually changing each badge one at a time. I need to rotate the employees photo, name, barcode, and company logo. Is there some script that would do this? Do I use object styles?
Below is what I am trying to do. The left badge is what we currently have and the right is more or less what we want it to be. That white box at the top is where the barcode will go.
I am very much a newbie when it comes to working with scripts. About all I have ever done was use a script that converted a ID book file over to a single document PDF. I will need to know how to use scipts to change the size and position of the different elements on the badge and then make it apply to all the different badges.
Yes, all the other badges are the set up the same way. I just used a template to drop in the different emlployee photos and names. I am running MacOS 10.5.8. I don't know how to use AppleScipt or JavaScript. I wonder if someone has some premade scripts that would allow me to do this? It seems like the kind of thing that people have no doubt had to do in the past.
@Peter When I first entered in the info I put it directy into InDesign rather then doing a data merge. The reason for that is not only do I have to enter in a name and photo for the employee but I also have to give each employee their own barcode number which I use a plugin for (I type their employee number in and it converts it over to the right barcode number.) The data merge sounds like a really good idea but I don't know how I could apply the barcode if I used data merge.
@Rob Yeah, I could find a way to send you those files if we end up going with AppleScript. Thanks for the offer! If I needed to alter something in the layout later on would I be able to do that in the AppleScript code? I work with basic HTML and you can change the demensions of objects on the webpage with the pre existing code, do you think I could do that same thing with the Applescript code if I needed to? Could I change where the objects are laid out through the code then have it readjust all the badges using that applescript?
You can use AppleScript or JavaScript and pretty much anything you can do with the GUI can be done vai a script. There have to be enough badges to make writing the script worthwhile, but ti looks like all you are doing is repositioning 3 objects and changing the page size. The script could loop through a folder of files.
Given the current situation, a script might be the best option, but going forward I think Data merge might make sense, if you are willing to do the up-front work to make it possible. Your barcodes would be handled, I suspect, by linking them as an image, just like the photo, unless there is a way to use your plugin on text already set, in which case you could merge the name twice.
I still do not quite understand how the data merge would work in this situation. My understanding of using data merge with images is that you tell InDesign what folder to go into and it imports all those images in that folder with the corresponding text that was on the same line in that spreadsheet. In this case the barcodes are made entirely in the InDesign plugin panel. There are no linked images it's just a vector image built straight into the document. Below is the panel where I enter in the barcodes. The software is Barcodemaker from Teacup Software.
@Rob There are 5 items that need repositioning actually. The photo, person’s name, logo, barcode, and background image. For the page size I think it would be best to go with 13” x 19” portrait since I think the size of the badges fits best on that size of paper. I hope that is not too hard. It might be easiest to send you the files via Google Drive. If you want to give me your email I can send you the badges.
If you are using InDesign CS6 try the new Alternate layout feature. Scroll to the title "Alternate layouts" in this link. I hope it help you.
http://helpx.adobe.com/indesign/using/alternate-layouts-liquid-layouts .html
The Scale or Re-center Liquid Layout rules wouldn't work, so I think you would have to set up an Object-based rule for every object in each ID file, which probably isn't much of a time saver. Ideally a project like this should be set up in one document with a masterpage, but I don't think that's the case here.
Rob, I ran into some problems running the script. It mainly seems to just changes the size of the page and position the barcodes correctly but doesn't change much else. When I created the badges initially I would duplicate a previous badge and then change all the contents for the next employee. I could have created an InDesign template file but then I would be dealing with a new InDesign doc for every employee which would have been a pretty excessive amount of work. I decided against doing it this way since I was planning on printing several employee badges per page rather then printing out one badge at a time. I don't know if there is anything that can be done about changing the format when it is set up this way. What do you think?
Download the .zip file I posted in #21 and try the script on the test file enclosed. Does it work?
The script depends on the order of the page items to be the same from one doc to the next so if you were cutting and pasting it won't work. You still haven't sent me a sample of an existing badge, so I was guessing on the order.
I sent you about eight badges via Google Drive like you asked. Also I had a question regarding the record feature in AppleScript Editor. Can I click record and then just resize the badge and then use the recorded script on the other badges? I read somewhere that the record feature doesn't work between AppleSript and InDesign. Do you know if that is true?
If I were to build the badges via a master page would that make it easier to resize them later with a script? I don't know if I will have to resize the badges again somewhere down the line but if I do I will like to set them up so that they are easy to script or automate in some way. Or could that be done entirely with master pages with no involvment using scripts?
If you handle the master correctly you wouldn't need a script.
You have 7 page items per badge and only 3 need to be overridden in order to add content—the barcode, photo, and name. When you override those 3 items just be careful not to change their positions on the page. So in the future you could change the position and bounds of everything from the single master page.
After a month of playing, you're really back to where you were, and Data Merge still makes sense. I think it would be worth pursuing a different script -- one that could take the number that needs to be keyed into your plugin to make the barcode, make the barcode, and substitute if for the the number. That number could easily be added to the data merge as another field.
North America
Europe, Middle East and Africa
Asia Pacific