当前位置:网站首页>Richview RichEdit srichviewedit PageSize page setup and synchronization
Richview RichEdit srichviewedit PageSize page setup and synchronization
2022-07-01 20:02:00 【lyhoo163】
RichView RichEdit SRichViewEdit PageSize Page setup and synchronization
Use RichView, establish Doc When you file , By setting TRVDocParameters After setting the page , Generated Doc File or Rtf When you file , The file is saved Page Set up , But the file created , Import required DBSRichViewEdit After the save , Unable to import Page Set up the data , At the same time through DBSRichViewEdit, The display cannot be synchronized Page Set up .
Usually we document Page Set up , adopt TRVDocParameters Set up :



Refer to the above parameters , Set up :
procedure SetDocParameters(DP: TRVDocParameters;sPage:string);
begin
if sPage='A4' then
begin
DP.PageWidth := 210; // It's in millimeters
DP.PageHeight := 297;
DP.LeftMargin := 40;
DP.RightMargin := 25;
DP.TopMargin := 30;
DP.BottomMargin := 30;
DP.HeaderY := 10;
DP.FooterY := 10;
end;
if sPage='A5' then
begin
DP.PageWidth := 148;
DP.PageHeight := 210;
DP.LeftMargin := 30;
DP.RightMargin := 20;
DP.TopMargin := 20;
DP.BottomMargin := 20;
DP.HeaderY := 10;
DP.FooterY := 10;
end;
end;
such , We can pass the code , Sets the of the specified page DOC Document. .
for example : The process procedure Generate(sPage:string); Is the process of creating text , The specific code is omitted .
When executed Generate(‘A4') and Generate(‘A5') when , because SRichViewEdit What is the default A4, The screen shows A4 The page of .

Upper figure A4 Interface , The figure below A5 Interface .

After research TSRichViewEdit class , Modify or set up Page Page data , Only through PageProperty Property creation or modification .
stay procedure Generate(sPage:string);, In the code , When importing a document through a stream , Add code :
if sPage='A4' then
begin
RV.PageProperty.PageWidth := 21; // The unit is centimeter
RV.PageProperty.PageHeight := 29.7;
RV.PageProperty.LeftMargin := 4;
RV.PageProperty.RightMargin := 2.5;
RV.PageProperty.TopMargin := 3;
RV.PageProperty.BottomMargin := 3;
RV.PageProperty.HeaderY := 1;
RV.PageProperty.FooterY := 1;
end;
if sPage='A5' then
begin
RV.PageProperty.PageWidth := 14.8;
RV.PageProperty.PageHeight := 21;
RV.PageProperty.LeftMargin := 3;
RV.PageProperty.RightMargin := 2;
RV.PageProperty.TopMargin := 2;
RV.PageProperty.BottomMargin := 2;
RV.PageProperty.HeaderY := 1;
RV.PageProperty.FooterY := 1;
end;
Realization RichEdit SRichViewEdit PageSize Synchronous display .
边栏推荐
- JS proxy
- Develop those things: easycvr cluster device management page function display optimization
- Hls4ml/vivado HLS error reporting solution
- What if the win11 shortcut key switching input method doesn't respond? Shortcut key switching input method does not respond
- Swiftui 4 new features complete toggle and mixed toggle multiple binding components
- windows环境 redis安装和启动(后台启动)
- 【无标题】
- PHP获取微信小程序和小程序商店外链地址
- 运动捕捉系统原理
- Flask 常用组件
猜你喜欢

毕业季 | 华为专家亲授面试秘诀:如何拿到大厂高薪offer?
![[Mysql]安装Mysql5.7](/img/c4/d7fb5ddf8e7be31f7a9ad68409e584.png)
[Mysql]安装Mysql5.7

Oracle physical architecture

Use Zadig to build a continuous delivery platform from 0 to 1

Win11暂停更新点不了怎么办?Win11暂停更新是灰色的如何解决?

How to turn off the boot auto start software in win11

Use of common built-in classes of JS

What if win11 can't pause the update? Win11 pause update is gray. How to solve it?
![[AI server setup] CUDA environment](/img/ca/2acfc42ea3ba24934a89472a8632f6.png)
[AI server setup] CUDA environment

Hls4ml reports an error the board_ part definition was not found for tul. com. tw:pynq-z2:part0:1.0.
随机推荐
3D全景模型展示可视化技术演示
docker ubuntu容器中安装mysql遇到的问题
较真儿学源码系列-InheritableThreadLocal(逐行源码带你分析作者思路)
February 15, 2022: sweeping robot. There is a floor sweeping robot in the room (represented by a grid). Each grid in the grid has two possibilities: empty and obstacles. The sweeping robot provides fo
RichView RichEdit SRichViewEdit PageSize 页面设置与同步
math_ Use differentiation to calculate approximate value
EasyCVR集群视频广场页面切换时,请求流未能终止的问题优化
Process steps of vibrating wire acquisition module for measuring vibrating wire sensor
Class loading mechanism
开发那些事儿:EasyCVR集群设备管理页面功能展示优化
Linux下安装Redis,并配置环境
Sum the amount
有意思了!数据库也搞Serverless!
PHP获取微信小程序和小程序商店外链地址
Unreal Engine packaging project
Difference between redo and undo
漏洞复现-.Net-ueditor上传
由浅入深学会白盒测试用例设计
Win11如何取消任务栏隐藏?Win11取消任务栏隐藏的方法