Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
A3 printing [SOLVED] |
Post Reply ![]() |
Author | |
Eddy ![]() Beginner ![]() Joined: 17 Nov 08 Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() Posted: 02 Mar 09 at 11:44AM |
I've got an A3 printer and I produce A3 pdf files. I would like to print them on my printer...
When I do so, I obtain a... whtie page, with noting on ! My code is : " sPrinterName = oPdf.NewCustomPrinter(sMyPrinter) oPdf.SetupCustomPrinter sPrinterName, 4, frmCustomImpr.iNbCopies 'Nb de copies oPdf.SetupCustomPrinter sPrinterName, 5, frmCustomImpr.iQuality 'Qualité oPdf.SetupCustomPrinter sPrinterName, 6, frmCustomImpr.iCoulor 'Couleur oPdf.SetupCustomPrinter sPrinterName, 7, frmCustomImpr.iRectoVerso 'Duplex oPdf.SetupCustomPrinter sPrinterName, 8, frmCustomImpr.iCollate 'Copies groupées ou non oPdf.PrintDocument sPrinterName, 1, 1, 2, oPdf.PrintOptions(1, 1, "PDF printing : mydoc.pdf") " Do I do something wrong ? Thank you Eddy Edited by Eddy - 04 Mar 09 at 3:32AM |
|
![]() |
|
DELBEKE ![]() Debenu Quick PDF Library Expert ![]() ![]() Joined: 31 Oct 05 Location: France Status: Offline Points: 151 |
![]() ![]() ![]() ![]() ![]() |
I don't know waht happens Perhaps setting the PaperSize? oPdf.SetupCustomPrinter sPrinterName, 4, 8 'Format A3
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Eddy!
I'm using the code below ... Cheers, Ingo QP := TiSEDQuickPDF.Create; try QP.UnlockKey('mykey'); QP.LoadFromFile(Edit1.text); If QP.Encrypted > 0 Then QP.Unencrypt; pc := QP.PageCount; prName := QP.GetDefaultPrinterName(); If ( Pos(' on ',prName) > 0 ) then prName := System.Copy(prName,1,Pos(' on ',prName)-1); prOptions := QP.PrintOptions(2, 1, Edit1.Text); QP.PrintDocument(prName, 1, pc, prOptions); finally QP.Free; end; Edited by Ingo - 02 Mar 09 at 3:41PM |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi again!
In addition to Jean-Luc suggestion here something about SetupCustomPrinter: SetupCustomPrinter Description Changes the properties of a custom printer created with the NewCustomPrinter function. Definition Function SetupCustomPrinter(CustomPrinterName As String, Setting As Long, NewValue As Long) As Long Parameters CustomPrinterName A custom printer name, as returned by the NewCustomPrinter function. Setting 1 = Paper size 2 = Paper length 3 = Paper width 4 = Copies 5 = Print quality 6 = Color 7 = Duplex 8 = Collate 9 = Default source (paper trays / bins) 10 = Media type 11 = Orientation NewValue For paper size: 1 to 68, see DMPAPER_XXX values in Win32 API documentation for DEVMODE data structure. For paper height and width: Size of paper in tenths of millimetres For copies: Number of copies For print quality: 1 = high 2 = medium 3 = low 4 = draft For color: 1 = monochrome 262 262270 Rendering The Colden Group LLC 2 = color For duplex: 1 = simplex 2 = vertical duplex 3 = horizontal duplex For collate: 0 = no 1 = yes For default source: 1 to 15, see DMBIN_XXX values in Win32 API documentation for DEVMODE data structure. 256 and higher for custom bins / paper trays. See the GetPrinterBins function. For media type: 1 = standard 2 = transparency 3 = glossy 256 and higher for device-specific media For orientation: 1 = portrait 2 = landscape Returns 0 The custom printer could not be found, or the Settings or NewValue parameters were invalid. 1 The custom printer settings were changed successfully Edited by Ingo - 02 Mar 09 at 3:45PM |
|
![]() |
|
Eddy ![]() Beginner ![]() Joined: 17 Nov 08 Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() |
Thanks you Ingo and Delbeke.
Unfortunatly, I've also tried out with the code below : oPdf.SetupCustomPrinter sPrinterName, 1, 8 but it does nothing more : only blank pages. Ingo, I've tried also with the printoption pagescalling set on 2, but with no effects anymore. By the way, what is the difference between fit to pagper (1) and Shrink large pages (2) ? Thanks in advance. Eddy |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Eddy!
I think in the security settings of your pdf-document printing seems to be not allowed? Fit means if it's too small (eg A5) it will be larger if the printer is A4 for example. Shrink means (eg A3) compress it to see all on A4-printing. You're right... That's actually not clear - "Fit" should be enough ;-) Cheers, Ingo |
|
![]() |
|
Eddy ![]() Beginner ![]() Joined: 17 Nov 08 Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() |
Hi all,
I finally solved my problem ! It was very strange... In fact, I was trying to print with a High quality (1) and the printer (an HP K8900) wasn't able to manage it ! If I change the quality to 2 or higher, it works. Thank you Ingo and Delbeke for your help. Eddy |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store