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 » U++ Library : Other (not classified elsewhere) » PrinterJob prints blank pages in linux
PrinterJob prints blank pages in linux [message #33024] Fri, 01 July 2011 17:17 Go to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Hi,

Linux version of PrinterJob doesn't initialize page size (pgsz), landscape and prints empty pages when printer dialog is not executed.

PrinterJob.cpp, line 245:
PrinterJob::PrinterJob(const char *_name)
{
	name = _name;
	landscape = false;
	from = to = 1;
	current = 1;
	//default page size A4
	pgsz = Size(6000 * 210 / 254, 6000 * 297 / 254);
}

Re: PrinterJob prints blank pages in linux [message #33027 is a reply to message #33024] Sat, 02 July 2011 11:18 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Thank you, patch applied.

Makes me wonder, is not default page size defined somewhere inside CUPS?

Mirek
Re: PrinterJob prints blank pages in linux [message #33028 is a reply to message #33027] Sat, 02 July 2011 11:30 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Indeed:

lpoptions -l

If you have time, could you please provide a patch that attempts to read the page size from CUPS first?

If not, just say it, I will do it.

Note: the list of page names is already there in PrinterJob::Execute, you will only have to move it outside Execute..

Mirek
Re: PrinterJob prints blank pages in linux [message #33031 is a reply to message #33028] Sat, 02 July 2011 13:47 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Ok. I added GetDefaultPageSize to printer job. But to be honest I think that FillOpt should moved to PrinterJob, because GetDefaultPageSize doubles FillOpt functionality.


  • Attachment: CtrlUtil.h
    (Size: 10.25KB, Downloaded 307 times)
  • Attachment: PrinterJob.cpp
    (Size: 8.09KB, Downloaded 295 times)
Re: PrinterJob prints blank pages in linux [message #33032 is a reply to message #33031] Sat, 02 July 2011 15:51 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Thank you, patch applied.

Mirek
Previous Topic: GetProperty() / SetProperty() for Ctrl
Next Topic: Linking to a .net DLL ?
Goto Forum:
  


Current Time: Thu Mar 28 22:54:46 CET 2024

Total time taken to generate the page: 0.00892 seconds