BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
PaigeMiller
Diamond | Level 26
ods pdf file="test1.pdf";
proc sgplot data=sashelp.class;
title 'Plot of Height vs Weight';
scatter x=height y=weight;
run;
ods pdf close;

ods graphics/outputfmt=pdf height=4in width=6in;
ods pdf file="test2.pdf";
proc sgplot data=sashelp.class;
title 'Plot of Height vs Weight';
scatter x=height y=weight;
run;
ods pdf close;

In the first PDF output, the title is correct. In the second PDF output, the word Weight disappears from the title, despite the fact that there is plenty of room. Why? The code is identical, except for the ODS GRAPHICS options.


First output:

PaigeMiller_0-1668007431303.png

 

Second output:

PaigeMiller_1-1668007451758.png

 

 

 

--
Paige Miller
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Does the same thing happen when you use the NOGTITLE option on the ODS PDF statement?

View solution in original post

7 REPLIES 7
ballardw
Super User

Does the same thing happen when you use the NOGTITLE option on the ODS PDF statement?

PaigeMiller
Diamond | Level 26

That seems to work properly. Any idea why?

--
Paige Miller
ballardw
Super User

@PaigeMiller wrote:

That seems to work properly. Any idea why?


I don't work with PDF's in general and don't recall ever using the output image format of PDF so this is a guess. I suspect that the rules for a PDF image does something to the space for titles, possibly a maximum percentage of the image width. Placing the text into the body of the document with the Nogtitle bypasses that bit. If you use the title options to set a smaller font does more of the text appear?

The ODS Graphics SCALE/NOSCALE option may come into play as well. I remember spending some time fighting with text in graphs in the first ODS RTF reports I did.

 

Ksharp
Super User
I didn't get any problem with my PC SAS .
Could you try "reset=" option ?

ods graphics/outputfmt=pdf height=4in width=6in reset=all ;
PaigeMiller
Diamond | Level 26

If I run that code after launching SAS without a custom autoexec and without a custom config file (so in other words, all settings at whatever SAS set them at), I get the problem. If you don't see the problem, that indicates a setting somewhere is different between your computer and my computer, but ... in my mind, it's not a SAS setting, as I get the problem with or without my custom autoexec and with or without my custom config file.

 

I think this is part of a similar ODS PDF problem I reported a few days ago, where the text was pixelated whereas the day before, using the same code, the text was not pixelated. I also suspect this may have something to do with a computer system upgrade that my company forced us to have that morning.

 

But I can't prove any of this, and I don't even know were to begin trying to track this down.

--
Paige Miller
ballardw
Super User

@PaigeMiller wrote:

If I run that code after launching SAS without a custom autoexec and without a custom config file (so in other words, all settings at whatever SAS set them at), I get the problem. If you don't see the problem, that indicates a setting somewhere is different between your computer and my computer, but ... in my mind, it's not a SAS setting, as I get the problem with or without my custom autoexec and with or without my custom config file.

 

I think this is part of a similar ODS PDF problem I reported a few days ago, where the text was pixelated whereas the day before, using the same code, the text was not pixelated. I also suspect this may have something to do with a computer system upgrade that my company forced us to have that morning.

 

But I can't prove any of this, and I don't even know were to begin trying to track this down.


Long shot here but have you checked if you have the latest video drivers for your system? Maybe the system "update" has an issue with a just-slightly-out-of-date video driver.

PaigeMiller
Diamond | Level 26

Could be ... but there's nothing I can do about it ... I have no choice in whatever updates are installed, and I can't change the video driver myself. But it would be helpful to know if that is the cause. I can't find what video driver is installed, and I have no idea what the video driver was before the problem happened.

--
Paige Miller

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!

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
  • 7 replies
  • 847 views
  • 0 likes
  • 3 in conversation