Home » U++ Library support » RichText,QTF,RTF... » RichEdit page size
RichEdit page size [message #13976] |
Mon, 04 February 2008 19:06 |
kretol
Messages: 14 Registered: December 2006
|
Promising Member |
|
|
In RichEdit's constructor page size is set to Size(3968, 6074)
and unit to UNIT_POINT.
When saving to pdf ,a pdf document is 8,5x11 inch.
How and when is it calculated ? ( 3968 / 72 != 8,5 )
How to set the page size to different sizes in inches, cm, etc. ?
Sorry if I am missing something obvious here,but could someone enlighten me, please?
Thanks in advance,
Wiktor
|
|
|
Re: RichEdit page size [message #13981 is a reply to message #13976] |
Mon, 04 February 2008 22:39 |
|
mirek
Messages: 14038 Registered: November 2005
|
Ultimate Member |
|
|
kretol wrote on Mon, 04 February 2008 13:06 | In RichEdit's constructor page size is set to Size(3968, 6074)
and unit to UNIT_POINT.
When saving to pdf ,a pdf document is 8,5x11 inch.
How and when is it calculated ? ( 3968 / 72 != 8,5 )
How to set the page size to different sizes in inches, cm, etc. ?
Sorry if I am missing something obvious here,but could someone enlighten me, please?
Thanks in advance,
Wiktor
|
When U++ is dealing with "physical units" (like the real world distances on paper media), it always uses "dots". 1 dot is defined as 1/600 inch (and is equal to single pixel on 600dpi printer).
All other units are converted to (and from) dots.
Mirek
|
|
|
Re: RichEdit page size [message #14097 is a reply to message #13981] |
Mon, 11 February 2008 07:40 |
|
One small question.
Can I set page orientation of my QTF document to Landscape? And if I open this document later it will be Landscape automatically?
If I cannot this, Cay you say better way (or better format) to store orientation information (and probably page size) directly in QTF file?
May be You can say the answer - What tagname can I use to store?
Thanks.
Response is very wanted.
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
|
|
|
|
Re: RichEdit page size [message #14104 is a reply to message #14101] |
Mon, 11 February 2008 09:10 |
|
OK.
Thanks.
Another small question.
Could the format QTF be extensible?
Could the format QTF contain comments or other non error elements (where I can insert my own tags)?
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
[Updated on: Mon, 11 February 2008 09:21] Report message to a moderator
|
|
|
|
|
Re: RichEdit page size [message #14194 is a reply to message #14158] |
Tue, 19 February 2008 08:53 |
|
Thank you. I used the same way. I have created a style, named Landscape in QTF-document, and using the availability of this style as an indicator of a turn the page.
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
|
|
|
Re: RichEdit page size [message #14195 is a reply to message #14194] |
Tue, 19 February 2008 09:01 |
|
Another style will be to specify the size of the page.
All that is needed for the template editor of printed documents for editing which I use a modified version UWord.
I think the editor UWord should understand the turn of the page and the size of paper (if the user wishes to set this).
Therefore, I propose to extend the specification QTF.
What do you think about this?
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
[Updated on: Tue, 19 February 2008 09:03] Report message to a moderator
|
|
|
|
Re: RichEdit page size [message #18407 is a reply to message #14194] |
Fri, 26 September 2008 21:29 |
|
forlano
Messages: 1202 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
sergeynikitin wrote on Tue, 19 February 2008 08:53 | Thank you. I used the same way. I have created a style, named Landscape in QTF-document, and using the availability of this style as an indicator of a turn the page.
|
Prevet Sergey,
I am having the same problem: I need to save a qtf document with landscape orientation. Can you make available the modification you have done?
Thanks,
Luigi
[Updated on: Fri, 26 September 2008 21:30] Report message to a moderator
|
|
|
Re: RichEdit page size [message #18460 is a reply to message #18407] |
Thu, 02 October 2008 06:40 |
|
My Example is not complex. This is simple test app. I can try to repeat it. (wait 1-5 days)
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
|
|
|
Re: RichEdit page size [message #37181 is a reply to message #14195] |
Tue, 04 September 2012 09:10 |
|
jibe
Messages: 294 Registered: February 2007 Location: France
|
Experienced Member |
|
|
Hi,
sergeynikitin wrote on Tue, 19 February 2008 09:01 | Another style will be to specify the size of the page.
All that is needed for the template editor of printed documents for editing which I use a modified version UWord.
I think the editor UWord should understand the turn of the page and the size of paper (if the user wishes to set this).
Therefore, I propose to extend the specification QTF.
What do you think about this?
|
mirek wrote on Tue, 19 February 2008 23:48 | I will think about, but not sure. Definitely not doing it before "release".
Mirek
|
Page size is in RTF specifications, why not in QTF ones ?
I'm using Sergey's RepGen package, that works with QTF format and reports can be prepared with UWord. It would be very useful to be able to adjust the page size inside the QTF template rather than doing this in the code !
I'm developping an application with several reports and some use a different page size (ie pre-printed forms). The right place to specify the page size would be in the QTF template, not in preferences in the application, more especially when preferences have to be adjusted for each report !
[Updated on: Tue, 04 September 2012 09:12] Report message to a moderator
|
|
|
Re: RichEdit page size [message #37192 is a reply to message #37181] |
Tue, 04 September 2012 14:58 |
|
mirek
Messages: 14038 Registered: November 2005
|
Ultimate Member |
|
|
jibe wrote on Tue, 04 September 2012 03:10 | Hi,
sergeynikitin wrote on Tue, 19 February 2008 09:01 | Another style will be to specify the size of the page.
All that is needed for the template editor of printed documents for editing which I use a modified version UWord.
I think the editor UWord should understand the turn of the page and the size of paper (if the user wishes to set this).
Therefore, I propose to extend the specification QTF.
What do you think about this?
|
mirek wrote on Tue, 19 February 2008 23:48 | I will think about, but not sure. Definitely not doing it before "release".
Mirek
|
Page size is in RTF specifications, why not in QTF ones ?
I'm using Sergey's RepGen package, that works with QTF format and reports can be prepared with UWord. It would be very useful to be able to adjust the page size inside the QTF template rather than doing this in the code !
I'm developping an application with several reports and some use a different page size (ie pre-printed forms). The right place to specify the page size would be in the QTF template, not in preferences in the application, more especially when preferences have to be adjusted for each report !
|
I am not fundamentally opposed to this idea. It would help me if I had some clue about what behaviour such page size is supposed to affect... It would also be quite hard to have more than single page size per document.
OK, I can see that Report could take the page size. Perhaps it could be used to somehow preset print dialog, at least landscape mode. Anything else?
|
|
|
Re: RichEdit page size [message #37198 is a reply to message #13976] |
Tue, 04 September 2012 22:40 |
|
jibe
Messages: 294 Registered: February 2007 Location: France
|
Experienced Member |
|
|
To explain better, let's suppose that in an application, you have 2 reports, each one with a different page size.
For now, as you cannot specify the page size in the QTF template document, you must have a different code for each report to adjust the page size.
If it was possible to have the page size included in each template document, you could have the same code to print both.
If it can preset the print dialog box, it could be surely useful for some people, however I don't really need that for now : no need in my case to change page size at print time.
I think that if QTF can do the same as RTF about page size, il will be great ! And enough for me ! But if sergeynikitin reads this, it will be interresting to have his opinion.
|
|
|
Re: RichEdit page size [message #37202 is a reply to message #37198] |
Wed, 05 September 2012 09:56 |
omari
Messages: 273 Registered: March 2010
|
Experienced Member |
|
|
Hello all,
UWord is a QTF editor, not a report editor.
I propose to add to UWord an option "Save As", to save the qtf in a report format like:
<Report>
<size>400,300</size>
<orientation>..</orientation>
<qtf> .... </qtf>
</Report>
Omari.
regards
omari.
|
|
|
|
Re: RichEdit page size [message #37221 is a reply to message #37214] |
Thu, 06 September 2012 19:11 |
|
jibe wrote on Thu, 06 September 2012 13:07 | Hi,
omari wrote on Wed, 05 September 2012 09:56 | UWord is a QTF editor, not a report editor.
|
However :
- The (good !) idea with RepGen was to use a simple QTF document as a template for the reports. If we don't keep this idea, we could take any other format : the one you propose... or simply RTF that could also do the job and is more standard
- I think that to add the page size in QTF specifications could be usefull in some other cases also, and I see no downside to this...
|
My opinion:
If you (in your application) use separate qtf files, than you want to store page size with qtf-data.
RepGen can use (and I use this way) database as template storage, where placed pagesize too.
Standard definition of RepGen Template Data:
TABLE_ (REPORTS)
SERIAL_ (REP_ID) PRIMARY_KEY AUTO_INCREMENT
STRING_ (REP_NAME,100)
STRING_ (REP_DESCRIPTION,500)
STRING_ (REP_TAGS,100)
STRING_ (REP_TYPE,50)
STRING_ (REP_SORTING,20)
STRING_ (REP_GROUPING,20)
BLOB_ (REP_TEMPLATE)
STRING_ (REP_PAGESIZE)
END_TABLE
Field REP_PageSize contain data like "A4, Letter e t.c."
|
|
|
|
Re: RichEdit page size [message #37224 is a reply to message #37223] |
Thu, 06 September 2012 23:29 |
|
Database is created in format, available in the application.
It's maybe MySQL or XML or anything else. Because it is for programmers choice and not a part of RepGen.
QTF is language for rich text, but same template may have different page size in different place of application. Therefore We may want to use different page size with same QTF template.
But (!!!) some format like QTF-DOC is very needed!
Let's create QTF development group and continue tuning different aspect of QTF and QTF-DOC formats.
Page size is only 1 of many needed things of QTF-DOC format.
Do not forgot:
- Encoding, language (for spell-checking),
- Orientation,
- Page numbering,
- Document's properties like author...
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
|
|
|
Goto Forum:
Current Time: Fri Sep 20 05:08:14 CEST 2024
Total time taken to generate the page: 0.04279 seconds
|