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;
Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.

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.

 

 

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
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?

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
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?

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
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;
Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 8 replies
  • 1373 views
  • 0 likes
  • 2 in conversation