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) » Print unwanted copy
Re: Print unwanted copy [message #44104 is a reply to message #44073] Thu, 25 December 2014 11:09 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Klugier wrote on Mon, 22 December 2014 16:29
Hello Forlano,

For me this code look strange (PrinterJob - Windows code - line 102):
for(int c = 0; c < ((dlg.Flags & PD_COLLATE) ? dlg.nCopies : 1); c++)
	for(int i = dlg.nFromPage - 1; i <= dlg.nToPage - 1; i++)
		for(int c = 0; c < ((dlg.Flags & PD_COLLATE) ? 1 : dlg.nCopies); c++)
			page.Add(i);


Double "c" definitions in loop is definitely not good idea.

And why for the one condition there is different result:
(dlg.Flags & PD_COLLATE) ? dlg.nCopies : 1)
(dlg.Flags & PD_COLLATE) ? 1 : dlg.nCopies)


Sincerely,
Klugier


Ah, that actually is OK: Collate means that copies are kept "together", I mean, if collate is active and you are printing 3 pages 2 copies, you are supposed to get 1 1 2 2 3 3, while with collate 'off', you get 1 2 3 1 2 3. Which IMO is excactly what the loop does.

Anyway, that doubling of copies is (for me) long existing bug, it has rather something to do with some misunderstanding of printer driver and windows print dialog. It affects only some printers and some drivers. Which reminds me that I have not tried with my current win8.1 and current printer, time to investigate this bug again... Smile
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [Fixed] TURTLE+MT fails to link: bug or feature?
Next Topic: How to check internet availability?
Goto Forum:
  


Current Time: Fri Apr 26 03:37:49 CEST 2024

Total time taken to generate the page: 0.04048 seconds