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 » LineEdit, EditFields, DocEdit » How to Print a file inside LineEdit
Re: How to Print a file inside LineEdit [message #3240 is a reply to message #3230] Mon, 15 May 2006 21:09 Go to previous messageGo to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
luzr wrote on Sun, 14 May 2006 21:44

The simplest way to print is to use Report. Simply, instead to sending your stuff to "Draw", you use Report (which implements Draw interface), just add some calls to perform pagination. Alternatively, use Qtf, which you can send to Report as well.

Mirek


I tried Report. Perhaps I do some mistake but doesn't seems so immediate. Let's neglect for the moment the pagination and let assume I've only one page to print. I tried the following code:
void  VegaTab4::PrintCB()
{ 	Report r;
//	r.Header("[A2> Page $$P");
	r << "Round 1";
    r << "===================================================================";
    r << "  1 =   4 Karpov, Igor         -   2 Karpov, Vadim         = 1 - 0";
    r << "-------------------------------------------------------------------";
    Print( r, 1, "Preview");
//	Perform(r); //same format error
}

When I run it appear the print panel. Then I click print and I observe the result attached below (I've printed with a pdf driver and then get a screenshot).
So it seems Report try to interpret the strings in qtf terms. This means that my text file is processed as a qtf file while it has no format command and I want to send to the printer each character the file contains.
Before to obtain this error I believed I could get the entire text file and pass via << to r and then print it. But now seems I cannot avoid to save the file in qtf format. Am I right?

Anyway I think could be very useful to have a very direct way to communicate with a printer without any inteference and control about font etc. With linux I could use a calling to system and print via 'lp', but with windows I would like to have the possibility to choose at least the printer.

Luigi
  • Attachment: swiss5.jpg
    (Size: 8.68KB, Downloaded 2057 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to let appear by default the bar in the LineEdit?
Next Topic: Append separate Strings to a DocEdit[SOLVED]
Goto Forum:
  


Current Time: Sun Apr 28 15:45:36 CEST 2024

Total time taken to generate the page: 0.03512 seconds