2016-11-03 85 views
0

我將RichTextBox的內容保存爲RTF文件,但我需要將頁面設置爲landscape將橫向格式添加爲保存爲RTF的RichTextBox內容

尋找,我發現一些有用的東西在網絡上RTFLandscape但我不能夠適應我的需求:

RTF文件看起來像這樣:

{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}} 
\viewkind4\uc1\pard\lang1040\f0\fs24\par 
Amount  Start  End  Rate Days Result\par 
\'80 1.000,00 04/11/2015 31/12/2015 0,50%  58 \'80 0,79\par 
\'80 1.000,00 01/01/2016 03/11/2016 0,20% 308 \'80 1,69\par 
\par 
Total \'80 2,48\par 
} 

,我發現在與landscape格式RTF例如:

{\rtf1\ansi\deff0 {\fonttbl {\f0 Courier;}} 
{\colortbl;\red0\green0\blue0;\red255\green0\blue0;} 
\landscape 
\paperw15840\paperh12240\margl720\margr720\margt720\margb720 
\tx720\tx1440\tx2880\tx5760 
This line is the default color\line 
\tab this line has 1 tab\line 
\tab\tab this line has 2 tabs\line 
\tab\tab\tab this line has 3 tabs\line 
\tab\tab\tab\tab this line has 4 tabs\line 
\cf2 
\tab This line is red and has a tab before it\line 
\cf1 
\page This line is the default color and the first line on page 2 
} 

我有三編輯將\landscape添加到我的輸出字符串在許多不同的位置,但仍然無法使其工作。

回答

0

本身添加\landscape是不夠的,還需要設置紙張的寬度和高度爲景觀:

\landscape\paperw15840\paperh12240 
相關問題