[vwnc] Setting printer preferences from code ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Setting printer preferences from code ...

Dennis smith-4
Anyone done things like setting printer paper size
(host printing on windows) from code?  There is
a method
    primChangeExtent:
in HostPrintJob, but it does not appear to do anything
which is perhaps why its a "prim" method not referenced
anywhere.

My problem is printing to a "pdf" print driver and wanting to
print as "legal size".


--
Dennis Smith                         +1 416.798.7948
Cherniak Software Development Corporation   Fax: +1 416.798.0948
509-2001 Sheppard Avenue East        [hidden email]
Toronto, ON M2J 4Z8              sip:[hidden email]
Canada         http://www.CherniakSoftware.com
Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Setting printer preferences from code ...

Boris Popov, DeepCove Labs (SNN)
You should be able to do something with DocumentProperties() as per,

http://support.microsoft.com/kb/167345 

if you add the following to NTPrinterInterface from Windows Goodies
parcel.

DocumentPropertiesA: hWnd hPrinter: hPrinter pDeviceName: pDeviceName
pDevModeOutput: pDevModeOutput pDevModeInput: pDevModeInput fMode: fMode
        <C: BOOL DocumentPropertiesA(HWND  hWnd, HANDLE
hPrinter, LPTSTR  pDeviceName,  PDEVMODE  pDevModeOutput,  PDEVMODE
pDevModeInput,  DWORD fMode)>
        ^self externalAccessFailedWith: _errorCode

It is also totally possible that there is an easier way, like tweaking
prepareHDevMode: and setting dmOrientation and dmPaperSize, but it's
been a looong time since I played with any of that.

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message header.
Unless otherwise indicated, it contains information that is private and
confidential. If you have received it in error, please notify the sender
and delete the entire message including any attachments.

Thank you.
-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Dennis Smith
Sent: Wednesday, April 08, 2009 8:34 AM
To: VWNC,
Subject: [vwnc] Setting printer preferences from code ...

Anyone done things like setting printer paper size
(host printing on windows) from code?  There is
a method
    primChangeExtent:
in HostPrintJob, but it does not appear to do anything
which is perhaps why its a "prim" method not referenced
anywhere.

My problem is printing to a "pdf" print driver and wanting to
print as "legal size".


--
Dennis Smith                         +1 416.798.7948
Cherniak Software Development Corporation   Fax: +1 416.798.0948
509-2001 Sheppard Avenue East        [hidden email]
Toronto, ON M2J 4Z8              sip:[hidden email]
Canada         http://www.CherniakSoftware.com
Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Setting printer preferences from code ...

Mark Pirogovsky-3
In reply to this post by Dennis smith-4
There is a parcel named:
"WindowsOptions for PrintDialog"

In the contributed section -- It may have what you need...

Dennis Smith wrote:

> Anyone done things like setting printer paper size
> (host printing on windows) from code?  There is
> a method
>     primChangeExtent:
> in HostPrintJob, but it does not appear to do anything
> which is perhaps why its a "prim" method not referenced
> anywhere.
>
> My problem is printing to a "pdf" print driver and wanting to
> print as "legal size".
>
>
>  

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Setting printer preferences from code ...

Boris Popov, DeepCove Labs (SNN)
Oh that's true, I totally forgot about that one. At least I was on the
right track with DEVMODE, this is basically a preferences wrapper for
various settings that get read/written from/to DEVMODE for print dialog
initialization.

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message header.
Unless otherwise indicated, it contains information that is private and
confidential. If you have received it in error, please notify the sender
and delete the entire message including any attachments.

Thank you.
-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Mark Pirogovsky
Sent: Wednesday, April 08, 2009 9:59 AM
To: Dennis Smith
Cc: VWNC,
Subject: Re: [vwnc] Setting printer preferences from code ...

There is a parcel named:
"WindowsOptions for PrintDialog"

In the contributed section -- It may have what you need...

Dennis Smith wrote:

> Anyone done things like setting printer paper size
> (host printing on windows) from code?  There is
> a method
>     primChangeExtent:
> in HostPrintJob, but it does not appear to do anything
> which is perhaps why its a "prim" method not referenced
> anywhere.
>
> My problem is printing to a "pdf" print driver and wanting to
> print as "legal size".
>
>
>  

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc