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... » How do I set the pagesize (in points or mm) of RichEdit?
How do I set the pagesize (in points or mm) of RichEdit? [message #57764] Thu, 09 December 2021 15:51 Go to next message
Alboni is currently offline  Alboni
Messages: 214
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
I want to print stickers on a labelprinter using qtf and make sticker templates using RichEdit, however RichEdit seems to assume A4 format and that doesn't work right.
How can I set the pagesize of RichEdit in mm or points?

[Updated on: Thu, 09 December 2021 16:32]

Report message to a moderator

Re: How do I set the pagesize (in points or mm) of RichEdit? [message #57770 is a reply to message #57764] Fri, 10 December 2021 22:44 Go to previous messageGo to next message
Lance is currently offline  Lance
Messages: 526
Registered: March 2007
Contributor
hi Alboni:

I was able to find these to functions in <RichText/RichText.h> that might give you some hints to your problem.

Array<Drawing> RenderPages(const RichText& txt, Size pagesize = Size(3968, 6074));

String Pdf(const RichText& txt, Size pagesize = Size(3968, 6074), int margin = 200,
           bool pdfa = false, const PdfSignatureInfo *sign = NULL);


}


I believe I vaguely remember that Upp uses a virtual divice with 600 dpi.
Re: How do I set the pagesize (in points or mm) of RichEdit? [message #57771 is a reply to message #57770] Fri, 10 December 2021 22:47 Go to previous messageGo to next message
Lance is currently offline  Lance
Messages: 526
Registered: March 2007
Contributor
for more information on printing+Qtf, please refer to <Report/Report.h>, <Report/Report.cpp> code.
Re: How do I set the pagesize (in points or mm) of RichEdit? [message #58037 is a reply to message #57764] Sat, 22 January 2022 19:34 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Alboni wrote on Thu, 09 December 2021 15:51
I want to print stickers on a labelprinter using qtf and make sticker templates using RichEdit, however RichEdit seems to assume A4 format and that doesn't work right.
How can I set the pagesize of RichEdit in mm or points?


RichEdit::SetPage

(in "dots" - there are 600 dots per inch).

Mirek
Re: How do I set the pagesize (in points or mm) of RichEdit? [message #58040 is a reply to message #58037] Sat, 22 January 2022 21:30 Go to previous message
Alboni is currently offline  Alboni
Messages: 214
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
Thanks, Mirek and Lance,

I could not get it to work and my client got very impatient so I ended up using raw printer commands.
I'll look at it again when an opportunity presents itself.

Ruben
Previous Topic: Remove empty paragraphs
Next Topic: Page break does not work in Style
Goto Forum:
  


Current Time: Tue Apr 16 18:39:32 CEST 2024

Total time taken to generate the page: 0.01110 seconds