Print Page | Close Window

Duplex not working

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1180
Printed Date: 25 Jun 25 at 1:10PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Duplex not working
Posted By: bernr
Subject: Duplex not working
Date Posted: 19 Aug 09 at 5:58PM
Hello
I can not seem to get duplex working.
I have tried setting duplex on the printer, I get only single pages.
I tried creating a custom printer and changing the settings using the following code
 
 procedure TPDFViewerMainForm.PrintWithDialog(asPrintJobTitle: string = 'ExitCare Print Job');
var
  iPrintOptions: integer;
  iPrintFrom: integer;
  iPrintTo: integer;
  SPrinterName:String;
begin
  PrintDialog.MaxPage := iTotalPages;
  PrintDialog.MinPage := 1;
  printDialog.FromPage := 1;
  printDialog.ToPage := iTotalPages;
  if PrintDialog.Execute then
    begin
      iPrintOptions := PDFFile.PrintOptions(0, 0, 'ExitCare Print Job');
      if PrintDialog.PrintRange = prAllpages then
        begin
          iPrintFrom := 1;
          iPrintTo := iTotalPages;
        end
      else
        begin
          iPrintFrom := printDialog.FromPage;
          iPrintTo := printDialog.ToPage;
        end;
        SPrinterName:=PDFFIle.NewCustomPrinter(Printer.Printers[Printer.PrinterIndex]);
       PDFFIle.SetupCustomPrinter(SPrinterName,7,3);
      PDFFile.PrintDocument(SPrinterName, iPrintFrom, iPrintTo, iPrintOptions);
    end;
end;
Still only get single pages. Nothing I have tried seems to print in duplex mode. I have tested the same PDF in both Adobe Reader and Gnostice and they print in duplex fine.
 
I am testing using the 7.16 beta, but this also happend in 7.15.
 
Thanks
Bern



Replies:
Posted By: bernr
Date Posted: 25 Aug 09 at 3:30PM
After some more testing, the only way I can get QuickPDF to print duplex is if I use the PrintDocumentToPrinterObject function.


Posted By: hbarclay
Date Posted: 26 Aug 09 at 10:14PM
Originally posted by bernr bernr wrote:

After some more testing, the only way I can get QuickPDF to print duplex is if I use the PrintDocumentToPrinterObject function.


PrintDocument with duplex works fine for me in 7.14 (and older) version. I'll get & try 7.15 later, but I'll be very surprised if it worked in 7.14 and not 7.15.

What version of Delphi are you using?



Posted By: hbarclay
Date Posted: 26 Aug 09 at 11:24PM
Just tried it in 7.15 and it works fine for me.

Not sure if this may be what is confusing or not but with the code above it does not matter what you select in the printer dialog.

Duplexing is set by SetupCustomPrinter(SPrinterName,7,3);

If you leave off or comment out SetupCustomPrinter(SPrinterName,7,3); it prints simplex regardless of selecting duplex in the printer dialog.

With the code the way you have above it will duplex every time.




Posted By: bernr
Date Posted: 26 Aug 09 at 11:30PM
Well all I know is it does not work for me, and i have tried on multiple printers.
Doesn't really matter at this point, due to a lack of response on both here and from their support, management here as decided to go with a different PDF solution.


Posted By: Rowan
Date Posted: 27 Aug 09 at 7:25AM
Hi Bern,

I have followed up with you privately to see if there's anything that we can do to help you with this problem if you're still interested.

Cheers,
- Rowan.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk