BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DanielLangley
Quartz | Level 8

Hello All,

 

We have recently switched to Enterprise Guide 8.1. Along with that switch one of our pdf reports broke.

 

We found that we could fix the report by going Tools --> Options --> Results --> General and unticking the Result Format of HTML.

 

Is there a way to achieve the same effect by setting some options?

 

Thanks

Daniel

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

Try adding this to your code.  Default with HTML is SVG, and I think that's affecting the way SGPLOT builds the graph.

 

 options dev=png;
Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!

View solution in original post

8 REPLIES 8
ChrisHemedinger
Community Manager

EG 8.1 uses HTML5 by default, so you might start by unchecking the "flavor" of HTML to use and set back to plain HTML.

 

Also, if what "broke" is a setting related to graphics style/type, you could add explicit ODS statements for PDF that set it to what you want.  If using EG to generate the PDF output for you, try statements like:

 

 ods pdf(id=egpdf) gtitle gfootnote...;

Learn more in this blog post about ODS control in EG.

 

 

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
DanielLangley
Quartz | Level 8

Hi Chris.

 

Thank you for your response.

I am trying to write code that can run in multiple instances of EG or be sent to someone else and it will "just work".

 

I was hoping that there was a way of writing code that could set the options that I want. I have tried using ods _all_ close and it is not stopping the html EG option from affecting my pdf.

 

Any thoughts?

 

Thanks

Daniel

ChrisHemedinger
Community Manager

Can you share specifics about what's "broken" in your PDF report? Paging, style, graphics, layout?

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
DanielLangley
Quartz | Level 8

Sure. There is a proc sgplot used to build some custom graphs. It is using text as one of the attributes and if EG html is check the text becomes really squished up and disassociated from the text backlighting which remains where it is supposed to bed and is not squished up. If I uncheck the html box and rerun the pdf this doesn't happen. I am not sure how or why html is affecting the pdf.

ChrisHemedinger
Community Manager

Any custom style or special settings?

 

if you add this to the top of your program:

 

 ods pdf(egpdf) style=(your desired style) gtitle;

 

Does that help?

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
DanielLangley
Quartz | Level 8

Hi Chris,

 

I'm afraid that didn't work.

I have stripped my code back to create the worlds ugliest pdf.

 

Try running it with the Tools-->Options-->Results-->General-->Html checked and again with it unchecked.

 

data work.class;
set sashelp.class(obs = 5);
N = _n_;
low = 0;
mid = 1;
high = 2;
run;

ods _all_ close;
ods pdf(mypdf) file=&fileLoc. style=PEARL gtitle;

proc sgplot data = work.class;
	text	y = n
		x = mid
		text = name
		/
		textattrs = (size = 18pt color=red)
		backlight = 1
	;
run;
quit;

ods pdf(mypdf) close;
ChrisHemedinger
Community Manager

Try adding this to your code.  Default with HTML is SVG, and I think that's affecting the way SGPLOT builds the graph.

 

 options dev=png;
Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 8 replies
  • 829 views
  • 0 likes
  • 2 in conversation