The SAS Output Delivery System and reporting techniques

Embed a svg-file using ods pdf

New Contributor
Posts: 3

Embed a svg-file using ods pdf


I am trying to put our company logo into a multi-sheet report on every page. I have this logo in jpg-format and svg-format. I have tried using the title-functionality


title j=r "^S={postimage='c:\path\logo.jpg' }";


and while this works for the jpeg-file, however the resolution is undesirable. I have to modify the size to make it fit. I would rather include a vector graphics file (svg or eps-file) as the image source. Is this possible, using css-style or something style from "proc template", or perhaps the ods layout to make this work?


Thomas Ekstrom

Grand Advisor
Posts: 10,262

Re: Embed a svg-file using ods pdf

Which output destination are you using? The approach for the solution may differ.

New Contributor
Posts: 3

Re: Embed a svg-file using ods pdf


I am using ods pdf as my output destination. The following code structure have been applied:

ods pdf file = "c:\temp\report.pdf" cssstyle = "c:\temp\HTMLBLue.css";

proc print


ods pdf close;

And this is where some of the items in the css-file have been altered to include the image.

Using SAS9.4 with EG 6.1 on windows 7

Posts: 8,721

Re: Embed a svg-file using ods pdf


RTF, PDF and HTML will all use CSS style sheets. You must use the CSSSTYLE= (yes, there are 3 'S' in that option). I am not sure whether an SVG image can be embedded in a document. With PDF and RTF, in particular, the image that you use is actually converted to an internal form for both PDF and RTF destinations -- so the image undergoes a transformation that can impact how it looks. I don't know whether SVG "works" that way with either destination. That would be a question for Tech Support.

  The doc on SVG says:

"Scalable Vector Graphics (SVG) is an XML language for describing two-dimensional vector graphics. SAS creates SVG documents based on the W3C recommendation for SVG documents. SAS SVG documents are created using the UNICODE standard encoding UTF-8." from: SAS(R) 9.4 Language Reference: Concepts, Fourth Edition        So, it may not be possible to put an XML language file into a PDF document -- again, that is a question for Tech Support

  Usually, I have the best luck with PDF and images/logos if the image is a good resolution and already scaled to the size I want in the document.


New Contributor
Posts: 3

Re: Embed a svg-file using ods pdf

Thanks Cynthia for your reply!

I will try to get the best resolution on my logo to get the title-solution to work.

Who do I contact if I do wish to proceed to take this issue to the Tech Support? Is it just to send an e-mail to



Super Contributor
Posts: 394

Re: Embed a svg-file using ods pdf

Click the submit a problem report link at the bottom of this page.

Ask a Question
Discussion stats
  • 5 replies
  • 4 in conversation