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
Can you report this problem to Tech Support? Please use the "submit a problem report" link at the bottom of the page.
Will do Sanjay. Thanks.
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
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.
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.
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.
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......
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
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.
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
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!
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: