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

Hi SAS experts

 

I want add two images one below the other with some space in cover page, and want to add a page title for all the pages in the middle of the page...is there is any way to do this..waiting for your help.

With the below code I got two images one below other but without any space. waiting for your help.


data _pdftitle;
holder=1;
text="New map for the country wide
accounts";
run;

ods escapechar = '^';
title height=20pt;
title1 height=25pt;

ods pdf file="C:\users\kalalsan\desktop\logo_test_maps.pdf" notoc startpage=no color=full;
ods pdf text = '^{style [preimage="C:\Users\name\Desktop\new1.jpg"}';
ods pdf text = '^{style  [preimage="C:\Users\name\Desktop\new2.jpg"}';

title;
title1 ;
footnote1;
footnote2;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
Add a condition before it :

if not missing(fy13) and not missing(fy16) then x=(fy13-fy16)/fy13;


View solution in original post

13 REPLIES 13
Ksharp
Super User
Not Sure:


ods pdf text = '^{style [preimage="C:\Users\name\Desktop\new1.jpg"}  ^n^n^n^n  ^2n    ';
ods pdf text = '^{style  [preimage="C:\Users\name\Desktop\new2.jpg"}';


sanjay1
Obsidian | Level 7

Its working...

 

Thank you

sanjay1
Obsidian | Level 7

Hi 

 

Is there is any way to increase the font size of ods pdf text without creating any style template.

Ksharp
Super User
You can use style FONT_SIZE:



ods escapechar='~';
ods text='~S={fontsize=20} xxxxxxxxxxxxx';
proc print data=sashelp.class;run;



sanjay1
Obsidian | Level 7

Hi

 

Thanks for your help..

sanjay1
Obsidian | Level 7

Hi Ksharp,

 

Could you please help me in this..

I want to calculate the % change for fy13-fy16/fy13
But since I have missing values am getting the result as missing.

 

Here is the code

data sample;
input fy13 fy14 fy15 fy16;
datalines;
. 15 . 16
19 . 2 15
. 22 8 .
17 18 18 20
24 28 . 9
;
run;

 

below is my code, but with this code am getting zero obasrvations.

data test;

set sample;

if fy13=. then delete;

if fy14=. then delete;

if fy15=. then delete;

if fy16=. then delete;

run;

Ksharp
Super User
Add a condition before it :

if not missing(fy13) and not missing(fy16) then x=(fy13-fy16)/fy13;


sanjay1
Obsidian | Level 7

Thank you very much that works cool.

sanjay1
Obsidian | Level 7

Hi Ksharp,

I am adding the word document as a cover page in ods pdf file.

I have converted the word to pdf and used in my progrm. But am getting the error. Please help me

Below is the error:

Error:  Unable to load image C:\temp\test.pdf; default image will be used instead

 

Following is my code

ods pdf file='path.pdf' notoc startpage=no color=full style=colorramp;

ods pdf text='^{style[preimage="C:\temp\test.pdf"}';

ods pdf startpage=now;

 

goptions hsize=3.99 in vsize=4.2 in;
proc print data=sashelp.class;

goptions horigin=0 in vorigin=4 in;

run;

 

proc means data=sashelp.class;

goptions horigin=4.25;

var height;
run;

ods pdf close;

Ksharp
Super User
It is PDF file ( C:\temp\test.pdf ). Not Image file ( C:\temp\test.png ) . You can not use PDF in that way.
sanjay1
Obsidian | Level 7

Thank you that helps me.

sanjay1
Obsidian | Level 7

Hi Ksharp,

 

Is there is any way to add contents in the cover page of ods pdf.

The attched is the format, Please guide

Ksharp
Super User
Sorry. I am going to leave it to @Cynthia .
Maybe you could get it by creating a RTF file and convert it into a PDF file.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 13 replies
  • 5486 views
  • 0 likes
  • 2 in conversation