The SAS Output Delivery System and reporting techniques

Adding images into ods pdf one below the other with space

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 117
Accepted Solution

Adding images into ods pdf one below the other with space

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;

 


Accepted Solutions
Solution
‎09-07-2016 04:41 AM
Super User
Posts: 10,023

Re: Adding images into ods pdf one below the other with space

Add a condition before it :

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


View solution in original post


All Replies
Super User
Posts: 10,023

Re: Adding images into ods pdf one below the other with space

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"}';


Frequent Contributor
Posts: 117

Re: Adding images into ods pdf one below the other with space

Its working...

 

Thank you

Frequent Contributor
Posts: 117

Re: Adding images into ods pdf one below the other with space

Hi 

 

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

Super User
Posts: 10,023

Re: Adding images into ods pdf one below the other with space

You can use style FONT_SIZE:



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



Frequent Contributor
Posts: 117

Re: Adding images into ods pdf one below the other with space

Hi

 

Thanks for your help..

Frequent Contributor
Posts: 117

Re: Adding images into ods pdf one below the other with space

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;

Solution
‎09-07-2016 04:41 AM
Super User
Posts: 10,023

Re: Adding images into ods pdf one below the other with space

Add a condition before it :

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


Frequent Contributor
Posts: 117

Re: Adding images into ods pdf one below the other with space

Thank you very much that works cool.

Frequent Contributor
Posts: 117

Re: Adding images into ods pdf one below the other with space

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;

Super User
Posts: 10,023

Re: Adding images into ods pdf one below the other with space

It is PDF file ( C:\temp\test.pdf ). Not Image file ( C:\temp\test.png ) . You can not use PDF in that way.
Frequent Contributor
Posts: 117

Re: Adding images into ods pdf one below the other with space

Thank you that helps me.

Frequent Contributor
Posts: 117

Re: Adding images into ods pdf one below the other with space

Hi Ksharp,

 

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

The attched is the format, Please guide

Super User
Posts: 10,023

Re: Adding images into ods pdf one below the other with space

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.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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