1

I have an .eps file that contains an outline map of the US, which I generated in R.

I want to open it in Adobe Illustrator and add some lines by hand.

My problem is that the original .eps file has a margin of whitespace around the edge of the map, which I want to keep, but after I open the .eps file in AI and then re-save it (regardless of whether or not I add in any lines first), the image has been resized so that it is just large enough to contain the map and the margins are gone so the two images no longer align.

I've posted before and after shots below, which I converted to .png to post. It's hard to see the difference, but you can see it if you compare the left-side margin.

The hack I came up with was to put a white rectangle that is larger than the map in the background to preserve the margins but I'm worried that might have some unintended consequences down the line and I'd like to know how to do it properly.

Many thanks in advance,

JG

Copy of base .eps file

Copy of .eps file after being opened and then saved in AI

  • 1
    Is the artboard the same size as the graphic? Why not just make the artboard larger or the graphic smaller than the artboard? – AndrewH Oct 12 '15 at 19:05
  • I tried changing the size of the artboard and it looked like it restored the margins but then when I saved it the margins disappeared again. I'm probably doing that wrong though. I'm a total amateur here. But if the artboard is the way to do it, I can spend some more time trying to get that to work. I just wasn't sure if that was the right approach at all. Thanks! – JGrieve Oct 12 '15 at 19:07
1

This is because the eps file you're saving as is not including the artboard. The reason the white box in the background works is because the eps file saves the white box. I would not advise using the white box background method and start saving as a PDF document. Also you can turn the white box into no fill and no stroke and it would do the same thing.

You can save an eps file with the artboard. Make sure "use Artboards" is checkmarked.

use artboard

There are a couple of things to consider when saving:

Are you going to save this for print? If yes then save as a PDF. This will save the size of the artboard. You can always "Preserve Illustrator Editing Capabilities" if you ever need to edit the PDF.

Are you printing for web? I would save as an SVG file and then add border using code.

  • Hi, Thanks for the response. It's for a book and the publisher needs the images as .eps files for the best results. All the other maps are in .eps (generated in R) so they all align, but I need to edit these by hand. – JGrieve Oct 12 '15 at 20:15
  • I pretty sure I did try saving it as an .eps with and without the "use artboards" option selected and it didn't make a difference. I'm thinking I must have set up the artboard wrong in the first place... – JGrieve Oct 12 '15 at 20:20
  • @JGrieve O yes then save as an eps file. I would check again with "Use Artboards" and make sure your artboard is bigger than your graphic. It also shouldn't really matter if their is a border or not as you can set space between the graphic and the surrounding area in any page layout software like InDesign. – AndrewH Oct 12 '15 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.