BookmarkSubscribeRSS Feed
djrisks
Barite | Level 11

Hello,

 

I would like the borders in the PDF document to come out slightly thinner to match the borders in the RTF document. Can you help with this please? I have tried to change the borderwidth value in the style template and in the style attributes, however the borderwidth is still thicker in the PDF document.

 

There are occasions when the borderwidth that is set in the column statement appears thinner than the other borders.

 

proc template;
  define style Styles.rtf_kriss;
    parent = styles.rtf;
      style body from body /
        marginleft = 34.5mm
        marginright = 34.0mm
        margintop = 18.2mm
        marginbottom = 14.2mm;
  
      style fonts from fonts;

      style table from output /
        frame = void
        rules = group
        backgroundcolor = white
        borderspacing = 0pt
        cellpadding = 0pt
        borderwidth = 0.75pt
		  borderbottomcolor= black
		  bordertopcolor= black

         ;
 
      class color_list /
        'bg' = white
        'fg' = black
        'bgH' = white
        'link' = black;
  end;
run;


goptions reset = all;

%let odsescapechar = ^;
ods escapechar="&odsescapechar";
options nonumber;

title1 j= r "Page &odsescapechar.{thispage} of &odsescapechar.{lastpage}";

ods listing close;
ods rtf file='U:\borders_difference_rtf_vs_pdf.rtf' startpage=no style=styles.rtf_kriss;
ods pdf file='U:\borders_difference_rtf_vs_pdf.pdf' startpage=no style=styles.rtf_kriss;

ods escapechar='^';

proc report data=sashelp.cars style(report)={width=100% bordertopwidth = 0.75  borderbottomwidth = 0.75} style(header)=[textalign = left] nowd;
  where make = "Audi";

  column  ('^S={borderbottomwidth = 0.75  borderbottomcolor = black} Make and Model'make model) type origin enginesize;

run;

ods pdf close;
ods rtf close;

 

 

 

 

9 REPLIES 9
RW9
Diamond | Level 26 RW9
Diamond | Level 26

This could be an illusion.  I have noticed that when creating PDF files from RTF files, the PDF sometimes doesn't show the borders, but if you zoom in or print the file they do show.  Do they show if you zoom in?  The problem is that RTF is an interpreted tagset, so Word decides what it should look like based on its settings, and the tags in the file.  I would build your output as two separate viens, each geared to the particular output, or generate the PDF from the RTF.

djrisks
Barite | Level 11

Hi RW9. I've seen what you have noticed before too. In this instance the PDF borders are thicker, and when I print them out, they are thicker than the ones in RTF too.

 

Generating the PDF from the RTF file is fine when I have one document, however I have many RTF outputs. Do you know of a good way to do the conversion on many RTF files please?

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Yes sure.  If you have a folder of RTF files, and you have full Adobe installed on your machine, its a simple as highlighting all the files, then right click, select Combine files in Acrobat.  This will give you a dialog box with all the selected RTF files in a list.  You can rearrange the order if you like, and add bookmark tags.  Then click combine, and each one will be converted to PDF, and then all will be combined into one file.  Its quite easy and quick.  You can also script this or get other tools for an automated process, though thats a bit more advanced.

djrisks
Barite | Level 11

Thank you for this. We have Adobe Acrobat 9 Pro here. The only thing is that with that version when I select all the RTF files that I want to convert to PDF, I have to save all the files manually, i.e. keep on pressing the Enter button.

 

 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

What does the dialog box say that you have to press enter for?  I am thinking maybe its to do with the Adobe Office plugins being macros maybe, and they are not authorised to just run.  

djrisks
Barite | Level 11

First I select all the files and then right click, and then select the option "Convert to Adobe PDF". Afterwards the Save Adobe PDF File appears and that is when I need to keep pressing Enter to save the files.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Ah, thats where your going wrong, you need to select "Combine files in Acrobat", it should be on the right click menu just below the Convert one.  If its not there then speak to your IT group so they can enable it for you.  Untitled.png 

djrisks
Barite | Level 11

Thanks, I just tried that way. It seems to get stuck after the 1st file has been converted. I think I need to contact IT. Thank you for all your help!

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Yep, likely to be a permission thing somewhere alonog the line, basically its creating a temporary PDF file for each, and then it combines them, but if it can't create one in the temporary area it breaks.  Good luck.

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
  • 9 replies
  • 1829 views
  • 2 likes
  • 2 in conversation