Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTF Page Layout #311

Closed
seanlacey opened this issue Jun 24, 2019 · 2 comments · Fixed by #927
Closed

RTF Page Layout #311

seanlacey opened this issue Jun 24, 2019 · 2 comments · Fixed by #927

Comments

@seanlacey
Copy link

I've been searching through the current RTF issues and status and wasn't able to find this, apologies if I missed it!

It would be nice to add a page layout option for RTF files. Often, clinical RTFs will be laid out in a landscape format and it would be good to have that option.

I took a look at the SAS produced RTF files and found the following line that I believe contains the width and height of the page (as well as margin sizes and other information):

\widowctrl\ftnbj\aenddoc\formshade\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\fet0\paperw15840\paperh12240\margl1080\margr540\margt1080\margb540

It looks like the "paperw" and "paperh" tags specify the layout (here they are laid out to 11 by 8.5).

@rich-iannone
Copy link
Member

Thanks for the suggestion on this. We will implement this once we revisit work on the RTF output format.

@mstackhouse
Copy link

mstackhouse commented Feb 21, 2020

The actual keyword that you're looking for in the landscape orientation is \lndscpsxn.

  • \marglN is left margin (where N is twips - 1440 twips = 1 inch)
  • \margr is right
  • \margt is top
  • \margb is bottom
  • \paperw is the width
  • \paperh is the height
  • \headery is the header height
  • \footery is the footer height

So if you put these all together (with a few other things), if you wanted a document with 1" margins, .5" in header and footer, 8.5" X 11" document in landscape, you'd need a string after the font and color tables that looks like this:

\paperw15840\paperh12240\widowctrl\ftnbj\fet0\sectd\linex0\lndscpsxn
\margl1440\margr1440\margt1440\margb1440
\headery720\footery720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment