cancel
Showing results for 
Search instead for 
Did you mean: 

ODS PDF — why does my title not appear properly?

SOLVED
PaigeMiller
Diamond | Level 26
Solved!

ODS PDF — why does my title not appear properly?

Message contains an image
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
Highlighted
ballardw
Super User
Solution

Re: ODS PDF — why does my title not appear properly?

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

View solution in original post

7 REPLIES 7
Highlighted
ballardw
Super User
Solution

Re: ODS PDF — why does my title not appear properly?

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

PaigeMiller
Diamond | Level 26

Re: ODS PDF — why does my title not appear properly?

That seems to work properly. Any idea why?

--
Paige Miller
ballardw
Super User

Re: ODS PDF — why does my title not appear properly?


@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

Re: ODS PDF — why does my title not appear properly?

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

Re: ODS PDF — why does my title not appear properly?

Message contains a hyperlink

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

Re: ODS PDF — why does my title not appear properly?

Message contains a hyperlink

@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

Re: ODS PDF — why does my title not appear properly?

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