BookmarkSubscribeRSS Feed
slacey
Obsidian | Level 7

I'm encountering an issue with my PDFs where they are displaying border thickness inconsistently when zoomed out versus zoomed in. Basically when I'm zoomed out, the borders look inconsistent (differing thickness) however when I zoom in the borders are definitely the same size.

 

Below is my example code. Is there any option when outputting a PDF that can control this?

 

Thanks.

 

****This file is being created to try and troubleshoot inconsistent line thickness;
options mautosource
       formchar    = '|_---|+|---+=|-/\<>*'
       mergeNoBy   = error
       nofmterr
       nodate
       nonumber
       nobyline
       noxwait
       noovp
       xsync
       msglevel    = I
       missing     = ' '
       pagesize    = 50 
       linesize    = 143
       pageno      = 1
	   orientation = landscape 
       fmtsearch   = (work sdtm adam)
       sasautos    = ("&srch1" "&srch2" "&srch3" "&srch4" sasautos)
       source2 
       compress    = yes;

proc template;
	define style teststyle;
	parent = styles.printer;

		style fonts from fonts/
			'headingFont' = ("Arial, <sans-serif>, <MTsans-serif>, Helvetica, Helv", 8pt)
			'docFont'     = ("Arial, <sans-serif>, <MTsans-serif>, Helvetica, Helv", 8pt)
			'footFont'    = ("Arial, <sans-serif>, <MTsans-serif>, Helvetica, Helv", 8pt)
			'TitleFont'   = ("Arial, <sans-serif>, <MTsans-serif>, Helvetica, Helv", 8pt)

			/* The fonts below are not known to be used by Proc */
			/* Report, but must be present for Proc Template    */ 

			'TitleFont2'         = ("Arial, <sans-serif>, <MTsans-serif>, Helvetica, Helv", 10pt, Bold)
			'StrongFont'         = ("Arial, <sans-serif>, <MTsans-serif>, Helvetica, Helv", 8pt)
			'EmphasisFont'       = ("Arial, <sans-serif>, <MTsans-serif>, Helvetica, Helv", 8pt)
			'FixedEmphasisFont'  = ("Arial, <sans-serif>, <MTsans-serif>, Helvetica, Helv", 8pt)
			'FixedStrongFont'    = ("Arial, <sans-serif>, <MTsans-serif>, Helvetica, Helv", 8pt)
			'FixedHeadingFont'   = ("Arial, <sans-serif>, <MTsans-serif>, Helvetica, Helv", 8pt)
			'BatchFixedFont'     = ("Arial, <sans-serif>, <MTsans-serif>, Helvetica, Helv", 8pt)
			'FixedFont'          = ("Arial, <sans-serif>, <MTsans-serif>, Helvetica, Helv", 8pt)
			'headingEmphasisFont'= ("Arial, <sans-serif>, <MTsans-serif>, Helvetica, Helv", 8pt)
			;

		style GraphFonts from GraphFonts /
			'headingFont'        = ("<sans-serif>, <MTsans-serif>, Helvetica, Helv, Arial", 8pt)
			'docFont'            = ("<sans-serif>, <MTsans-serif>, Helvetica, Helv, Arial", 8pt)
			'footFont'           = ("<sans-serif>, <MTsans-serif>, Helvetica, Helv, Arial", 8pt)
			'TitleFont'          = ("<sans-serif>, <MTsans-serif>, Helvetica, Helv, Arial", 10pt, Bold)
			'GraphDataFont'      = ("<sans-serif>, <MTsans-serif>, Helvetica, Helv, Arial", 6pt)
			'GraphUnicodeFont'   = ("<MTserif-unicode> ",                                   8pt)
			'GraphValueFont'     = ("<sans-serif>, <MTsans-serif>, Helvetica, Helv, Arial", 7pt)
			'GraphLabelFont'     = ("<sans-serif>, <MTsans-serif>, Helvetica, Helv, Arial", 8pt)
			'GraphFootnoteFont'  = ("<sans-serif>, <MTsans-serif>, Helvetica, Helv, Arial", 8pt)
			'GraphTitleFont'     = ("<sans-serif>, <MTsans-serif>, Helvetica, Helv, Arial", 10pt, Bold)
			'GraphAnnoFont'      = ("<sans-serif>, <MTsans-serif>, Helvetica, Helv, Arial", 7pt)
			;

		replace Body from Document /
			bottommargin = 0.75in
			topmargin = 1in
			rightmargin =1in
			leftmargin = 1in
			;

		style usertext from usertext /
			font_size=8pt
			font_weight=bold
			;

		replace Table from Output /
			frame = BOX
			rules = ALL              
			cellpadding = 1pt
			;

		style SystemTitle from SystemTitle "Controls system title text." /
			protectspecialchars=off
			foreground = black
			background = white
			;

		style SystemFooter from SystemFooter "Controls system footer text." /
			just=left
			protectspecialchars=off
			font = Fonts('FootFont')
			;

		replace color_list /
			'link' = blue
			'bgh'  = white
			'fg'   = black
			'bg'   = white
			;
end;
run;

data testtest;
	length cycle date dose int notfull $200;
	
	dummyvar=1;

	do id=1 to 10;
		cycle="Screening";
		date="01-01-2001/~n02-01-2002";
		dose="1mg/~n1mg";
		int="";
		notfull="";
		output;
		cycle="Cycle 1 Day 1";
		date="02-01-2001/~n03-01-2002";
		dose="1mg/~n1mg";
		int="Yes/~nTrouble";
		notfull="Reasons";
		output;
		cycle="Cycle 2 Day 1";
		date="03-01-2001/~n04-01-2002";
		dose="1mg/~n1mg";
		int="";
		notfull="";
		output;
	end; 
run; 

%let s_title=background=white font_weight=bold just=L borderleftcolor=white borderrightcolor=white bordertopcolor=white;
%let s_foot=background=white font_weight=bold just=L borderleftcolor=white borderrightcolor=white borderbottomcolor=white;

ods listing close;
options nocenter;
ods escapechar='~';
ods pdf file="testout.pdf" style=teststyle pdftoc=1;

proc report data=testtest list nowd headline headskip missing split='#' spacing=1 wrap nocenter contents="Dose"
						  style(header)={backgroundcolor=cxE0E0E0};
	column ("~S={&s_title}Dose" (dummyvar id cycle date dose int notfull));

	define dummyvar	/ order order=data noprint;
	define id		/ order order=data "ID";
	define cycle	/ display "Cycle"								style(header)={width=0.7in font_weight=bold textalign=left} left; 
	define date		/ display "Start Date(Day)/#End Date(Day)" 		style(header)={width=1.5in font_weight=bold textalign=left} left;
	define dose		/ display "Dose Intended/#Dose Administered"	style(header)={width=1.5in font_weight=bold textalign=left} left;
	define int		/ display "Interruption/#Reason"				style(header)={width=2.5in font_weight=bold textalign=left} left;
	define notfull	/ display "Reason Full Drug Not Given"			style(header)={width=2.5in font_weight=bold textalign=left} left;

	break before dummyvar / page contents="";
	break after id / STYLE={borderbottomwidth=5};
run;

ods pdf close;
1 REPLY 1
ballardw
Super User

Line thickness issues such as this are very commonly related to monitor resolutions.

You can try specifying a border width but almost any unit will have some issue with some monitor when it doesn't divide nicely into a given monitor resolution dimension the video drivers can display a straight line with jagged edges, how jagged depending on monitor resolution.

 

Zooming out just aggravates the display calculations.

 

Generally pick something as a standard, such as "print on paper at width by height and xxx dpi" and when that appears okay call it good.

 

You an try using PX (pixels) but that will change actual thickness with each monitor resolution.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1 reply
  • 944 views
  • 0 likes
  • 2 in conversation