BookmarkSubscribeRSS Feed
ABritinAus
Obsidian | Level 7

My workplace is in the process of transitioning to SAS 9.4 from 9.3.

I have an issue in that we are outputting ODS graphic output as RTFs (ODS RTF) using IMAGEFMT=EMF in our ODS graphics options. All fine except they ultimately go into documents which get PDFd.  And when these graphs get PDFd, a whole lot of content (axis values, legend values) simply disappear in the PDF.  This was not an issue using SAS 9.3.

I've tried other vector IMAGEFMTs but have the same issue.    Not an issue if we use PNG but then the quality is not acceptable to our publications area.

Using ODS PDF is not an option, as the graphs need to go into WORD for the whole document to then be PDFd.

Has anyone else ever reported such a thing (bits going missing when an RTF of an EMF SAS graph is PDFd) ?

It's probably an issue with the PDF software (Adobe), but I thought I'd see if anyone else has encountered the problem.

Thanks

Simon

11 REPLIES 11
Jay54
Meteorite | Level 14

Can you report this problem to Tech Support?  Please use the "submit a problem report" link at the bottom of the page.

ABritinAus
Obsidian | Level 7

Will do Sanjay. Thanks.

Andre
Obsidian | Level 7

Simon

Your problem is a big surprise for  me.  EMF files and device in ods are important for us.

Please post a report of the answer as it seems important to every organization that

could not use another product than Adobe Illustrator (which can not import svg files

but well emf files that are well working indeed un 9.3).

Andre

FredrikHansson
Obsidian | Level 7

Was this problem reported to tech support? Can I have a link please? I have the same issue. Running SAS9.4 (TS1M2) on Linux X64.

Adie_efc
Calcite | Level 5

Ive seen this before. not in graphs but in proc report where the headline vanished when converting to pdf.

I cant remember how we solved it but I think we had to use acrobat pro rather than normal acrobat.

The only thing I can find in a very quick google search gives me issues with word to pdf and lines missing.

I suspect its not a SAS problem.

Jay54
Meteorite | Level 14

SAS 9.4 uses EMFPLUS as the default.  It is possible that whatever you are using to convert RTF/EMF to PDF does not support EMF Plus.  You could try switching to using  EMFDUAL or SASEMF at the cost of losing opacity support.  SASEMF has no opacity support, and EMFDUAL has both EMF Plus and plain EMF, and the viewer or converter will use whichever it supports with the plain EMF being opaque.

ABritinAus
Obsidian | Level 7

Thanks for the reply and the info Sanjay.

We are using Adobe Pro X.  Which is fairly common PDF software.  I guess it doesn't support EMF Plus sadly.

I tried changing IMAGEFMT to SASEMF but there is still the same issue of most of the graph vanishing.

And yet when we use SAS/Graph (in 9.4) and device=SASEMF, the PDFs are fine.

It looks like we either need to not move to 9.4 or we just use SAS/Graph and not GTL/ODS graphics.   Running 9.3 and 9.4 not really a viable option.

Unfortunately moving away from Adobe PRO is not an option either.

If we use ODS PDF, things look fine, and it looks like Adobe is the reader for ODS PDF.  I assume Adobe is not CREATING the PDFs from ODS PDF though?

Using ODS PDF is not an option though as mentioned in the original post.

As an aside, in 9.3 for SAS/Graph we found UEMF (rather than SASEMF) to be the most consistent device when PDFing with Adobe.  (Although with line graphs some things went missing).  And UEMF has been removed as a device in 9.4. Sigh.

SAS tech support confirmed the change to EMF Plus and the fact that the issue is probably with Adobe.

I'll see if Adobe have any answers.  Wish me luck......

MartinMincey
SAS Employee

With SAS 9.4, if you do want ODS Graphics to create the older style EMF output instead of the newer EMF Plus output, you can do so by modifying the SAS registry.  Submitting the following code to SAS 9.4 will do this for you:

%let workdir=%trim(%sysfunc(pathname(work)));

data _null_;

   file "&workdir.\emf94.sasxreg";

   put '[CORE\PRINTING\PRINTERS\EMF\ADVANCED]';

   put '"Description"="Enhanced Metafile Format"';

   put '"Metafile Type"="EMF"';

   put '"Vector Alpha"=int:0';

   put '"Image 32"=int:1';

run;

/* Import the file */

proc registry import="&workdir.\emf94.sasxreg";

run;

Note that this changes the SAS registry in SASUSER, so the change is fairly easy to reverse if needed.

Regards,

Martin Mincey

SAS Technical Support



ABritinAus
Obsidian | Level 7

Thanks Martin

We ran the code, but unfortunately the PDF issues (using adobe) persist.

In theory, 9.3, OUTPUTFMT=EMF,   and 9.4 OUTPUTFMT=EMF (after running the above code to modify the registry) should be identical?

Or could there be something else in 9.4 that is different to 9.3?

It's a shame as the 9.3 output when PDFd (using adobe) is of fantastic quality. 

DanH_sas
SAS Super FREQ

Regarding Martin's solution, make sure that the user ID you used to update the SAS registry is also the same ID used to run your process. Otherwise, the registry changes will not get picked up, as the SASUSER directories are different.

 

Regarding your process, here are a couple of ideas to consider:

 

1. After you import the EMF files into Word, can you just let Word save the file as PDF? We ran a test here and found that all of the EMFPlus output looked correct using Word to write the file.

 

2. Assuming you are pulling your output into Word to create a standard report, it is possible to do the same thing just using ODS DOCUMENT and ODS PDF without having to use Word at all. Basically, you would generate the output into an ODS DOCUMENT, then open an ODS PDF destination using PROC DOCUMENT to replay the pieces you want -- in any order you want. If you are interested in this idea, I can give you more details.

 

Hope this helps!

Dan

SuzanneDorinski
Lapis Lazuli | Level 10

I know I'm replying to an old thread, but this happened to me recently, and I think the version of Word makes a difference,  

 

I used SAS 9.3 to produce some graphics in RTF, to include in a Word document in 2014.  The Word document was eventually converted to PDF for submission to the proceedings of a conference.  The conversion to PDF was fine.  

 

Now I'm using the same syntax in SAS 9.4 to produce some graphics in RTF, to include in a Word document.  When I save the Word document as PDF, most of one graphic disappears.  This happens with Word 2010.  

 

After reading this thread, I tried uploading the Word file to OneDrive, where I can use the Word 2013 app. I can open the file in the Word 2013 app, then save it to PDF.  After converting to PDF, all of the graphics are in the document!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 11 replies
  • 3506 views
  • 0 likes
  • 8 in conversation