BookmarkSubscribeRSS Feed
vineet7878_gmail_com
Obsidian | Level 7

I am using ODS pdf and trying to eliminate automatic margin of about .5 in created on the left and right of the table frame in addition to the margin defined for the body. This happens when the column width is specified in inches. Whereas when cellwidth is specified in percentage, such margins don't appear. 

 

Please help. 

 

Thanks in advance.

 

Vineet

6 REPLIES 6
Cynthia_sas
SAS Super FREQ

Hi:

  Again, you have not provided any code or any data or any examples of what you mean when you say "automatic margin of about .5 in created on the left and right of the table frame in addition to the margin defined for the body." I am having a hard time envisioning what you are describing. The only "automatic" margin that I know of is what PDF uses, based on your SAS System options. And, even though you say: "This happens when the column width is specified in inches. Whereas when cellwidth is specified in percentage, such margins don't appear." It is nearly impossible to guess what your code looks like to come up with an example.

 

  I already commented in a previous track on the dangers of trying to "over-control" the widths in PDF. In my previous example, there is NO automatic margin.

 

  If I modify the program which I posted for your previous example and change the width to inches, I do not observe an "automatic" margin. Clearly, if you are seeing something other than this when you submit the changed code, then this is an issue to work on with Tech Support. They can look at ALL your code and your data and make recommendations based on the actual code and actual data that you are using.

 

cynthia

 

use_inches.png

vineet7878_gmail_com
Obsidian | Level 7

Hi Cynthia, 

 

Thanks for answering all such questions over the years. I had been using ODS RTF for all my reports and graphs over the years. Now I am converting my macros to ODS PDF due to some advantages that ods pdf have over rtf. I am running into several challenges, but finding solutions after a lot of hit and trial and after a lot of googling. 

 

It is hard for me to copy code, since it is so much macrotized. I was hoping you are already aware of the issue and its fix.  In this case I have already modified my code to use percentages rather than inches. There is no need to follow up in this question now.

 

Regards,

Vineet

Cynthia_sas
SAS Super FREQ
Hi:
I understand that your data and/or program might be complicated, macro-ized, confidential. There are many reasons why you might prefer NOT to share your data and code.

However, my point is that you should be able to reduce your program to the elements which you feel are causing the problem and then use a dataset, such as SASHELP.CLASS or SASHELP.CARS to replicate the issue. By reducing the code to only the salient pieces (percents vs inches), you can see whether your statement that inches don't work is true. As I show in the code I posted using percent AND the code I posted using inches, I do not observe the behavior you report. IF you cannot replicate the issue using a dataset like SASHELP.CARS or SASHELP.CLASS, then it is likely something in your code and NOT in ODS PDF that is causing the extra margin you observe.

cynthia
ballardw
Super User

@vineet7878_gmail_com wrote:

Hi Cynthia, 

 

 

It is hard for me to copy code, since it is so much macrotized. I was hoping you are already aware of the issue and its fix.  In this case I have already modified my code to use percentages rather than inches. There is no need to follow up in this question now.

 


Macro code Rule 1: Have non-macro code working before using macro.

 

Because PDF and RTF are different file formats if I have used any RTF specific options I would not expect to blindly transfer anything to PDF and would go back to the working non-macro version to use for development. That should not require posting so much macro code: A Datastep to generate a small example data set and the code to generate the table.

 

vineet7878_gmail_com
Obsidian | Level 7

Hi Cynthia,

 

I tested the problem in simplified code and wasn't able to reproduce the issue. Probably the issue occurs due to conflic of options in proc report and proc template for ODS pdf. I will leave it here.

 

Thanks,

Vineet 

Cynthia_sas
SAS Super FREQ
Hi:
I stand by my original statement. If you tested the program with simplified code and cannot reproduce the issue, then it is probably NOT PROC REPORT or ODS PDF that is the issue. There is probably some option you coded incorrectly in your program. So when you find the difference between your test code (without the issue) and your production code (with the issue), then you should be able to determine what is wrong in the production version of the code.

The known conflicts in ODS PDF with or without PROC REPORT can be found in Tech Support notes. Did you find your issue by searching in the Tech Support site for your issue?

cynthia

sas-innovate-2024.png

Today is the last day to save with the early bird rate! Register today for just $695 - $100 off the standard rate.

 

Plus, 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
  • 6 replies
  • 1420 views
  • 0 likes
  • 3 in conversation