Export pdf or print rvf with 2 columns on a A3 landscape paper
Export pdf or print rvf with 2 columns on a A3 landscape paper
I need edit some content in TRichViewEdit or TSRichViewEdit, Then export rvf to a A3 paper that is landscape and split 2 columns.
How should I do?
How should I do?
-
- Site Admin
- Posts: 17535
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Export pdf or print rvf with 2 columns on a A3 landscape paper
Colums are not implemented in our editors.
But it is possible to use TRVReportHelper to format pages in two columns (or in more complex layout).
See the demo <TRichView Dir>\TRichView\Demos\DelphiUnicode\Assorted\Printing\ReportHelper\
It shows how to print in two columns.
But this demo uses the real printer, it needs to be modified to work with PDF.
Do you use some specific PDF library?
VCL version of TRichView can work with LLPDFLib, Synopse PDF, eDocEngine.
FireMonkey version of ScaleRichView can work with Skia4Delphi's PDF functions.
But it is possible to use TRVReportHelper to format pages in two columns (or in more complex layout).
See the demo <TRichView Dir>\TRichView\Demos\DelphiUnicode\Assorted\Printing\ReportHelper\
It shows how to print in two columns.
But this demo uses the real printer, it needs to be modified to work with PDF.
Do you use some specific PDF library?
VCL version of TRichView can work with LLPDFLib, Synopse PDF, eDocEngine.
FireMonkey version of ScaleRichView can work with Skia4Delphi's PDF functions.
-
- Site Admin
- Posts: 17535
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Export pdf or print rvf with 2 columns on a A3 landscape paper
Alternative solution (only for printing, not for PDF)
For ScaleRichView, there is TSRVPrint component that can print content of TSRichViewEdit in different modes.
Using SRVPrint.PrintMode = srvpGrid, you can print two TSRichViewEdit's pages on one paper sheet.
For ScaleRichView, there is TSRVPrint component that can print content of TSRichViewEdit in different modes.
Using SRVPrint.PrintMode = srvpGrid, you can print two TSRichViewEdit's pages on one paper sheet.
Re: Export pdf or print rvf with 2 columns on a A3 landscape paper
Another question,I need get some content's zone info(XY and width) after exported to complete additional work,can checkpoint do that? And how?
By the way,I will edit the content with TSRichViewEdit and link to TRVPrint by TRVReportHelperWithHeaderFooters,finally TRVPrint draw content to printer canvas or pdf canvas.Is that possible?
Thank u:)
By the way,I will edit the content with TSRichViewEdit and link to TRVPrint by TRVReportHelperWithHeaderFooters,finally TRVPrint draw content to printer canvas or pdf canvas.Is that possible?
Thank u:)
-
- Site Admin
- Posts: 17535
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Export pdf or print rvf with 2 columns on a A3 landscape paper
A checkpoint allows to get (X,Y) coordinate of the specified place in the document,
If you need the opposite task (which place of document contains(X,Y) or is located near it), checkpoints will not help. Solution of this problem depends on how you plan to print.
(If you need to add hyperlinks pointing to the specific locations in document in PDF, then yes, you need checkpoints. There are demos that show how to do it).
When using RVReportHelper, please note that:
1) a pagination procedure in TRVReportHelper and TRVPrint is different from a pagination procedure in TSRichViewEdit. So, it does not make sense to prepare document in TSRichViewEdit for printing using TRVReportHelper, because it will not be WYSIWYG. TRichViewEdit would be enough for this task. But if you want to use TSRichViewEdit for editing, it's ok (and it is convenient if you need headers and footers).
2) TRVReportHelper does not support footnotes, endnotes and text boxes. If you need to print them, use TRVPrint in "virtual printer" mode.
In PDF export demos (in <TRichView Dir>\ThirdParty\Export\), TRVReportHelperWithHeadersFooters is used only to store a document. It is not used for drawing in PDF. Instead, TRVPrint in "virtual printer" mode is used.
However, these demos do not need to print in two columns, so they can use TRVPrint.
If you need two columns or more difficult layout, TRVReportHelperWithHeadersFooters is enough, TRVPrint is not needed. Just draw on a printer canvas (like <TRichView Dir>\TRichView\Demos\DelphiUnicode\Assorted\Printing\ReportHelper\) or on PDF component's canvas.
Tell me which PDF engine you plan to use, and I'll make a demo.
If you need the opposite task (which place of document contains(X,Y) or is located near it), checkpoints will not help. Solution of this problem depends on how you plan to print.
(If you need to add hyperlinks pointing to the specific locations in document in PDF, then yes, you need checkpoints. There are demos that show how to do it).
When using RVReportHelper, please note that:
1) a pagination procedure in TRVReportHelper and TRVPrint is different from a pagination procedure in TSRichViewEdit. So, it does not make sense to prepare document in TSRichViewEdit for printing using TRVReportHelper, because it will not be WYSIWYG. TRichViewEdit would be enough for this task. But if you want to use TSRichViewEdit for editing, it's ok (and it is convenient if you need headers and footers).
2) TRVReportHelper does not support footnotes, endnotes and text boxes. If you need to print them, use TRVPrint in "virtual printer" mode.
In PDF export demos (in <TRichView Dir>\ThirdParty\Export\), TRVReportHelperWithHeadersFooters is used only to store a document. It is not used for drawing in PDF. Instead, TRVPrint in "virtual printer" mode is used.
However, these demos do not need to print in two columns, so they can use TRVPrint.
If you need two columns or more difficult layout, TRVReportHelperWithHeadersFooters is enough, TRVPrint is not needed. Just draw on a printer canvas (like <TRichView Dir>\TRichView\Demos\DelphiUnicode\Assorted\Printing\ReportHelper\) or on PDF component's canvas.
Tell me which PDF engine you plan to use, and I'll make a demo.
Re: Export pdf or print rvf with 2 columns on a A3 landscape paper
Thank u,I'm familiar with synPDF and plan to finish the work with it.Expect ur demo:)
Re: Export pdf or print rvf with 2 columns on a A3 landscape paper
It's not a must about WYSIWYG and header-footer. The content will be printed and deliver to the student to write answer and will be collected to mark score by the teacher. Even the exporting to pdf is only for printing.And then the paper will be scanned to record the score.
My work is to make exam-answer-card.I don't know if I can express the point clear. The page need to decide first ,A3 and two columns is one of the options.The program will place couples of tables on the page ,the special request is that end-user will adjust the table row height to fit the paper,so every page have some blocks with clear borders for the student to write answer.
How can I control the edit zone in TRichViewEdit? I'am glad to work with TRichViewEdit if I can do this.
My plan is to set the TSRichViewEdit's paper-property with custom size(A3 half height as width,A3 width as height),so people can finish the editing work as before and I need not worry about the page size thing blabla... After that,I can draw the content follow the destination canvas.
Expecting your Demo of exporting special pdf. Thank u:)
I am happy to hear any suggestions from u.
My work is to make exam-answer-card.I don't know if I can express the point clear. The page need to decide first ,A3 and two columns is one of the options.The program will place couples of tables on the page ,the special request is that end-user will adjust the table row height to fit the paper,so every page have some blocks with clear borders for the student to write answer.
How can I control the edit zone in TRichViewEdit? I'am glad to work with TRichViewEdit if I can do this.
My plan is to set the TSRichViewEdit's paper-property with custom size(A3 half height as width,A3 width as height),so people can finish the editing work as before and I need not worry about the page size thing blabla... After that,I can draw the content follow the destination canvas.
Expecting your Demo of exporting special pdf. Thank u:)
I am happy to hear any suggestions from u.
-
- Site Admin
- Posts: 17535
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Export pdf or print rvf with 2 columns on a A3 landscape paper
Our components do not allow to define table height in percent.
So, probably, using TSRichViewEdit makes sense, because you can define size of table on a page in WYSIWYG mode.
But if you use TSRichViewEdit, I recommend using ScaleRichView's procedures for printing and drawing pages, and do not use TRVPrint and TRVReportHelper.
We need to:
- edit A4 portrait pages in TSRichViewEdit
- set A3 landscape page format on printer
Then, we have the following options.
1. Using TSRVPrint.
Set
With these settings, two TSRichViewEdit pages will be printed on each paper sheet.
2. Use SRichViewEdit1.DrawPage to draw at the specified position of printer canvas (or PDF canvas).
In both solutions above, two document's pages are drawn on one paper sheet as they are. Each of these two document's pages have their own header and footer, as they were defined in TSRichViewEdit.
I hope this is what you need.
I you need only one common header/footer on each paper sheet, it needs to be drawn separately.
So, probably, using TSRichViewEdit makes sense, because you can define size of table on a page in WYSIWYG mode.
But if you use TSRichViewEdit, I recommend using ScaleRichView's procedures for printing and drawing pages, and do not use TRVPrint and TRVReportHelper.
We need to:
- edit A4 portrait pages in TSRichViewEdit
- set A3 landscape page format on printer
Then, we have the following options.
1. Using TSRVPrint.
Set
Code: Select all
SRVPrint1.PrintMode = srvpGrid;
SRVPrint1.PageColCount = 2;
SRVPrint1.PageRowCount = 1;
2. Use SRichViewEdit1.DrawPage to draw at the specified position of printer canvas (or PDF canvas).
In both solutions above, two document's pages are drawn on one paper sheet as they are. Each of these two document's pages have their own header and footer, as they were defined in TSRichViewEdit.
I hope this is what you need.
I you need only one common header/footer on each paper sheet, it needs to be drawn separately.
Re: Export pdf or print rvf with 2 columns on a A3 landscape paper
Thank u,I'll try it:)