Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » RichEdit page size
RichEdit page size [message #13976] Mon, 04 February 2008 19:06 Go to next message
kretol is currently offline  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 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
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 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

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 #14101 is a reply to message #14097] Mon, 11 February 2008 08:34 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
sergeynikitin wrote on Mon, 11 February 2008 01: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.


QTF knows nothing about physical page - QTF document only gets rendered to any page size. If you need to record information about landscape, you have to create some extended format.

Mirek

Re: RichEdit page size [message #14104 is a reply to message #14101] Mon, 11 February 2008 09:10 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

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 #14118 is a reply to message #14104] Tue, 12 February 2008 22:14 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

Problem solved by adding style Landscape.

SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Re: RichEdit page size [message #14158 is a reply to message #14104] Fri, 15 February 2008 17:19 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
sergeynikitin wrote on Mon, 11 February 2008 03: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)?


No.

BUT IMO, in this, something like adding some sort of header before QTF should work well (parse header, then call normal ParseQTF).

Mirek
Re: RichEdit page size [message #14194 is a reply to message #14158] Tue, 19 February 2008 08:53 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

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 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

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 #14204 is a reply to message #14195] Tue, 19 February 2008 23:48 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
sergeynikitin wrote on Tue, 19 February 2008 03: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?


I will think about, but not sure. Definitely not doing it before "release".

Mirek
Re: RichEdit page size [message #18407 is a reply to message #14194] Fri, 26 September 2008 21:29 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
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 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

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 Go to previous messageGo to next message
jibe is currently offline  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 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
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 Go to previous messageGo to next message
jibe is currently offline  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 Go to previous messageGo to next message
omari is currently offline  omari
Messages: 264
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 #37214 is a reply to message #37202] Thu, 06 September 2012 11:07 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

omari wrote on Wed, 05 September 2012 09:56

UWord is a QTF editor, not a report editor.

Yes, you are right. And your idea could probably solve my problem with some modifications to Report and/or RepGen package.

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 Wink
- 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...


Re: RichEdit page size [message #37221 is a reply to message #37214] Thu, 06 September 2012 19:11 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

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 Wink
- 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 #37223 is a reply to message #13976] Thu, 06 September 2012 23:09 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Ok, thanks to give your opinion, Sergey Smile

Is it ready to use, or RepGen must be adapted ? I have not the very last SVN version, I use 5283, and I don't see anything about this database...

I think that there is several solutions and the most important is that the choosen one(s) is fully implemented in RepGen.

Another important thing is that anybody can modify the template. I think that the simplest for that is tu use qtf files and to give UWord with the application. In this case, QTF must be able to store the page size.

We can also develop a tool (maybe just modify UWord ?) to create or update the Report Database including the blob 'REP_TEMPLATE'.

I think that the first solution is simplest, but it's only my opinion...
Re: RichEdit page size [message #37224 is a reply to message #37223] Thu, 06 September 2012 23:29 Go to previous messageGo to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

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 );
}
Previous Topic: I really don`t know how to UPDATE the RichText,help!!
Next Topic: Is it possible to send a QTF text to the printer (PrinterJob)?
Goto Forum:
  


Current Time: Fri Mar 29 00:31:09 CET 2024

Total time taken to generate the page: 0.01677 seconds