Have the parameters Selecting a printer

Have the parameters Selecting a printer

Postby Silvio.Falconi » Mon Jan 15, 2024 9: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Re: Have the parameters Selecting a printer

Postby Otto » Mon Jan 15, 2024 9:49 am

What are these values used for in your program?
I think you always have to set your desired/required values before printing.
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Have the parameters Selecting a printer

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Re: Have the parameters Selecting a printer

Postby Otto » Mon Jan 15, 2024 11:36 am

********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Have the parameters Selecting a printer

Postby Otto » Mon Jan 15, 2024 2: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.
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 98 guests