BookmarkSubscribeRSS Feed
nishant77goel
Obsidian | Level 7

 I am getting a white line in middle of orange box created through ODStext proc. Need help to rectify this issue. Output is PDF

 

code used - 

ods region x=2.5in y=7.25in width=3in height=2.5in;
ods text = "^{style[preimage='/optum/csg/01datafs/prdb/nonp/code/auto/sas/CRDMRemediationHMDB/Nishant/Automation/optum_logo.png']}";

ods region x=0.75in y=8.75in width=6.5in height=1.25in style=[backgroundColor=lightorange];
proc odstext;

6 REPLIES 6
RichardDeVen
Barite | Level 11
What happens if you zoom in in PDF viewer ?

If the line disappears you probably have an artifact due to requested view scaling. The viewer will compress or zoom an image per it's own rules in accordance to client requested zoom level. You can try a larger version of the .png (optum_logo_larger.png), or downsize it externally (i.e. optum_logo_smaller.png) in a paint program. This kind of artifacting can also be noticed in some PDF tables draw with grid lines, the lines might be absent, thinner or fatter than expected in a PDF viewer at differing zoom levels.

Can you reproduced the problem with other non-proprietary images? If so, please upload one to the question.
nishant77goel
Obsidian | Level 7

I am sorry for not providing the complete code earlier - 

 

title;

footnote;

ODS LISTING CLOSE;

ods pdf file = "&path./Automation/demo02.pdf"

            dpi=100 ;

options leftmargin=.25in rightmargin=.25in topmargin=.25in bottommargin=.25in orientation=portrait

        nonumber nodate ;

ods escapechar = "^";

 

ODS LAYOUT ABSOLUTE height=11in width=8.5in style=[background=white];

 

ods region x=0.75in y=0.6in width=6.5in height=1.25in style=[backgroundcolor=orange];

proc odstext;

 p " " / style=[color=CXFFFFFF vjust=m just=center cellHeight=1.25in];

run;

 

ods region x=0.8in y=2.5in width=7in height=6in;

proc odstext;

 p "Fourth Quarter 2019"/ style=[color=grey font_weight=bold fontSize=36pt vjust=m just=center  cellHeight=0.6in];

 p "Physical Health"/ style=[color=grey font_weight=bold fontSize=36pt vjust=m just=center  cellHeight=0.6in];

 p "Customer Report"/ style=[color=grey font_weight=bold fontSize=36pt vjust=m just=center  cellHeight=0.6in];

 p " "/ style=[color=CXFFFFFF font_weight=bold fontSize=36pt vjust=m just=center  cellHeight=0.6in];

 p "Prepared for:"/ style=[color=grey font_weight=bold fontSize=36pt vjust=m just=center  cellHeight=0.6in];

run;

 

ods region x=0.8in y=6.0in width=7in height=1.0in;

proc odstext;

 p "California Schools VEBA"/ style=[textdecoration=underline color=black font_weight=bold fontSize=24pt vjust=m just=center  cellHeight=0.6in];

run;

 

ods region x=2.5in y=7.25in width=3in height=2.5in;

ods text = "^{style[preimage='&path./ logo.png']}";

 

ods region x=0.75in y=8.75in width=6.5in height=1.25in style=[backgroundColor=lightorange];

proc odstext;

 p " " / style=[color=CXFFFFFF vjust=m just=center cellHeight=1.25in];

run;

 

ODS LAYOUT END;

ods pdf close;

 

 

Even if I remove the code part where I am inserting image, still I am getting the white color line in-between the page. It exists even if I Zoom in or out.

 

 

nishant77goel
Obsidian | Level 7

Also is there a way we can scale image to fit as it is needed

RichardDeVen
Barite | Level 11

What are the pixel dimensions of the logo ?

nishant77goel
Obsidian | Level 7

Width 900 pixels

Height 500 pixels

RichardDeVen
Barite | Level 11

Are you seeing any warnings or notes in the log? Such as:

WARNING: WIDTH exceeds available space for PDF destination.  This option will be ignored.
WARNING: HEIGHT exceeds available space for PDF destination.  This option will be ignored.
...
WARNING: The absolute region was too small to accommodate the output supplied for the PDF
         destination.  Output will be suppressed.

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 6 replies
  • 974 views
  • 1 like
  • 2 in conversation