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

Importing a PDF file generated by R into Adobe Illustrator

New Here ,
Nov 06, 2023 Nov 06, 2023

Hi, I need help !!!!

I created a map using R and wanted to edit it in Adobe Illustrator. However, I found that some countries' colors were missing when I imported the generated PDF file into Illustrator. (The first image is the one I generated in R, and the second image is after editing in AI. As you can see, the color blocks for Canada are missing.

 

I've tried a few methods, such as changing the view mode and rendering in RGB mode in R, but none of these solutions have resolved my issue.

 

What should I do? Thank you all for your help.

R2019.png2019.png

1.1K
Translate
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
Adobe
Community Expert ,
Nov 06, 2023 Nov 06, 2023
quote

I created a map using R

By @Jiajun33412686h3s1

 

I've moved your post from Using the Community (for questions about the forums) to Adobe Illustrator for you.

 

What is "R"?

 

Jane

Translate
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 ,
Nov 07, 2023 Nov 07, 2023

Thanks, Jane. R is a language and environment for statistical computing and graphics. 

Translate
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 ,
Nov 06, 2023 Nov 06, 2023

WIthout seeing the actual PDF it's impossible to help you. Most probably it's caused by clipping masks not working as intended.

Translate
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 ,
Nov 07, 2023 Nov 07, 2023

Thank you Gause

 
Translate
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 ,
Nov 06, 2023 Nov 06, 2023

I know very little about R. Is it possible to export maps created using R in another file format, such as SVG or EPS? If so, it's possible you might have better luck with the shapes holding their fills when the artwork is imported into Illustrator.

 

The most likely thing that happened the PDF file of your map is some of the vector shapes of countries were broken into open paths or even broken apart into multiple open paths. That's a common problem. The shape representing Canada has to be repaired back into a closed shape for the fill to work. The same goes for Russia, Venezuela and any other nation shapes whose fills are missing.

Most applications that can generate PDF files will employ all kinds of short cuts to make file sizes smaller and/or make the document easier to output on any printer. The penalty of that is the PDF file ends up being something that is not friendly at all to import into a graphics application such as Adobe Illustrator for further editing. An Illustrator plugin such as Vector First Aid can automatically fix a lot of problems with imported PDF artwork, like getting rid of unnecessary clipping masks or clipping groups, repairing some barely broken open paths, etc. But Vector First Aid won't fix everything in artwork from an imported PDF file. Much of the time it's just better to export the artwork in a file format other than PDF (if possible).

Translate
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 ,
Nov 07, 2023 Nov 07, 2023

Thank you very much for your advice, Bobby! Actually, I have already tried exporting the map in SVG format, but it still didn't work. What I ended up doing was directly dragging the PDF file into Adobe Illustrator and editing the image as a hyperlink,  'skipping' the issue (as shown in the following picture)

 

 

 

联想截图_20231108114451.png

 

Translate
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 ,
Nov 07, 2023 Nov 07, 2023
LATEST

After you place the PDF, you could Flatten it (Object > Flatten Transparency) if you want to directly edit it.  Try that and see what happens with Canada in that approach

Translate
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