FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Have the parameters Selecting a printer
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Have the parameters Selecting a printer
Posted: Mon Jan 15, 2024 09:11 AM

local aPrn := GetPrinters()

Can I automatically have the following parameters of the printer I am going to use?

nPageWidth

nPageHeight

nXOffSet

nYOffSet

nPort

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Have the parameters Selecting a printer
Posted: Mon Jan 15, 2024 09:49 AM

What are these values used for in your program?

I think you always have to set your desired/required values before printing.

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Have the parameters Selecting a printer
Posted: Mon Jan 15, 2024 10:00 AM
Otto wrote:What are these values used for in your program?
I think you always have to set your desired/required values before printing.
NO it's wrong !!!

as I already told you in another topic
when the end user selects the printer
the computer changes some vital parameters for printing among which
xOffset and Yoffset
if I assign the value 0 to these parameters
the printer puts the value 94.94


I need to Know

PaperWidth
PaperHeight
TopMargin
LeftMargin
PageBreak
Orientation
XOffSet
YoffSet

therei s not none sample on fw\samples for Know all paramter of a printer
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Have the parameters Selecting a printer
Posted: Mon Jan 15, 2024 02:34 PM

The values you're looking for, such as PaperWidth, PaperHeight, TopMargin, LeftMargin, PageBreak,

Orientation, XOffSet, and YOffSet, are typically part of a printer's Device Mode (DevMode) structure.

This structure contains information about a printer's capabilities and print job configuration.

This array represents the DevMode structure for the printer.

Access the DevMode Structure: This can be done by either using Windows API calls (which would require a programming language like C# or C++ and cannot be directly

done in PowerShell) or by using a printer configuration tool or dialog that can interpret this information.

Continue the discussion