Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
RobatPF RobatPF is offline
external usenet poster
 
Posts: 2
Default Using Xerox postscript PDL commands in Word 2003 to control printer function?

Question from the postscript uninitiated!.............

We currently have a lot of templates with code written to control a
number of primary functions such as Tray and Duplex, but it only works
via the PCL drivers for our Xerox printers. We are missing a lot of
functionality as well as having a lot of problems with other
applications printing effectively. We want to use the postscript
drivers for our printers and be able to pass postscript PDL commands as
per the PDL reference for each printer. I have tried using the PRINT
\p page field, but the commands do not execute or the printer prints
error pages. If anyone can help with code or point me in the right
direction it would be greatly appreciated.

  #2   Report Post  
Posted to microsoft.public.word.newusers
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Using Xerox postscript PDL commands in Word 2003 to control printer function?

See:

Controlling the Printer from Word VBA
Part 1: Using VBA to Select the Paper Tray
http://pubs.logicalexpressions.com/P...cle.asp?ID=101

Controlling the Printer from Word VBA
Part 2: Using VBA to control Duplex, Color Mode and Print Quality
http://pubs.logicalexpressions.com/P...cle.asp?ID=116

Controlling the Printer from Word VBA
Part 3: Dealing with Different Paper Sizes
http://pubs.logicalexpressions.com/P...cle.asp?ID=132

Controlling the Printer from Word VBA
Part 4: Getting printer driver details
http://pubs.logicalexpressions.com/P...cle.asp?ID=183


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"RobatPF" wrote in message
oups.com...
Question from the postscript uninitiated!.............

We currently have a lot of templates with code written to control a
number of primary functions such as Tray and Duplex, but it only works
via the PCL drivers for our Xerox printers. We are missing a lot of
functionality as well as having a lot of problems with other
applications printing effectively. We want to use the postscript
drivers for our printers and be able to pass postscript PDL commands as
per the PDL reference for each printer. I have tried using the PRINT
\p page field, but the commands do not execute or the printer prints
error pages. If anyone can help with code or point me in the right
direction it would be greatly appreciated.



  #3   Report Post  
Posted to microsoft.public.word.newusers
RobatPF RobatPF is offline
external usenet poster
 
Posts: 2
Default Using Xerox postscript PDL commands in Word 2003 to control printer function?

Thanks very much for the pointers for this. I have retreived the code
samples and are using them to get some of what I wanted to work.

Two questions though, how can I check capabilites of a printer without
necessarily knowing them and I need to be able tp staple but cannot
work out how to turn on or control that parameter. What I mainly need
to know is how to get other printer properties from the API / Printer
Driver and then set them as required.

Regards.


Doug Robbins - Word MVP wrote:
See:

Controlling the Printer from Word VBA
Part 1: Using VBA to Select the Paper Tray
http://pubs.logicalexpressions.com/P...cle.asp?ID=101

Controlling the Printer from Word VBA
Part 2: Using VBA to control Duplex, Color Mode and Print Quality
http://pubs.logicalexpressions.com/P...cle.asp?ID=116

Controlling the Printer from Word VBA
Part 3: Dealing with Different Paper Sizes
http://pubs.logicalexpressions.com/P...cle.asp?ID=132

Controlling the Printer from Word VBA
Part 4: Getting printer driver details
http://pubs.logicalexpressions.com/P...cle.asp?ID=183


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"RobatPF" wrote in message
oups.com...
Question from the postscript uninitiated!.............

We currently have a lot of templates with code written to control a
number of primary functions such as Tray and Duplex, but it only works
via the PCL drivers for our Xerox printers. We are missing a lot of
functionality as well as having a lot of problems with other
applications printing effectively. We want to use the postscript
drivers for our printers and be able to pass postscript PDL commands as
per the PDL reference for each printer. I have tried using the PRINT
\p page field, but the commands do not execute or the printer prints
error pages. If anyone can help with code or point me in the right
direction it would be greatly appreciated.


  #4   Report Post  
Posted to microsoft.public.word.newusers
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default Using Xerox postscript PDL commands in Word 2003 to control printer function?

Hi Robat,

The following PRINT field coding uses postscript code I found on a website
to return the printer's media capabilities:

{PRINT \p page " % Print the InputAttributes dictionary for a printer, to
see what media it thinks it has.

erasepage %% hide the above instructions
clippath flattenpath pathbbox %% Bounding box of current page
/ury exch def
/urx exch def
/lly exch def
/llx exch def
/width urx llx sub def %% Width of current page
/height ury lly sub def %% Height of current page
/Depth 0 def %% Nesting depth of composite objects
/FStr 256 string def %% Scratch string

/Courier findfont 12 scalefont setfont %% Select a guaranteed font @ 12
point
llx 10 add ury 15 sub moveto %% Move to top left corner

/DownOneLine
{
currentpoint exch pop %% Get the current point, discard x co-ordinate
15 sub %% Move down one line
dup 15 lt{ %% Have we enough space to draw the next line?
pop %% If no, discard the y co-ordinate
showpage %% Show the page so far
ury 30 sub %% Start from the top of the next one
}if
llx 10 add exch %% And back to the start of the line
moveto
}bind def

/dumparray
{
/Depth Depth 1 add def
([) show
0 1 Depth { pop ( ) show} for
{
dup type /dicttype eq{
dumpdict
}{
dup type /arraytype eq{
dumparray
}{
dup type /stringtype eq{
() show
show
() show
DownOneLine
}{
dup type /nametype eq{
(/)show
DownOneLine
}if
FStr cvs show
}ifelse
}ifelse
} ifelse
( ) show
} forall
/Depth Depth 1 sub def
0 1 Depth {( ) show} for
(]) show
}bind def

/dumpdict
{
0 1 Depth {pop ( ) show} for
/Depth Depth 1 add def
() show
DownOneLine
{
%% swap key/value, and output key
exch
0 1 Depth { pop ( ) show} for
(/) show
FStr cvs show
( ) show
dup type /dicttype eq{
dumpdict
}{
dup type /arraytype eq{
dumparray
}{
dup type /stringtype eq{
(\() show
show (\)) show
}{
dup type /nametype eq{
(/) show
}if
FStr cvs show
}ifelse
}ifelse
}ifelse
DownOneLine
} forall
/Depth Depth 1 sub def
0 1 Depth {( ) show} for
() show
DownOneLine
}bind def

/PD currentpagedevice def %% Get current page device

systemdict /languagelevel known %% check at least Level 2
{
PD /InputAttributes known %% Check for presence of InputAttributes
dictionary
{
PD /InputAttributes get %% Get the InputAttributes dictionary
dumpdict %% dump the contents
}
{(Interpreter has no InputAtrributes dictionary in the page device) show}
ifelse
}
{(Interpreter is Level 1 and does not support InputAtrributes) show}
ifelse

"}

Note that the first "{" and last "}" are the field braces created via
Ctrl-F9 - the rest are plain text. Using the Adobe postscript manuals, you
should be able to modify the code to test for stapling, duplexing etc,
capabilities.

Cheers

--
macropod
[MVP - Microsoft Word]


"RobatPF" wrote in message
oups.com...
Thanks very much for the pointers for this. I have retreived the code
samples and are using them to get some of what I wanted to work.

Two questions though, how can I check capabilites of a printer without
necessarily knowing them and I need to be able tp staple but cannot
work out how to turn on or control that parameter. What I mainly need
to know is how to get other printer properties from the API / Printer
Driver and then set them as required.

Regards.


Doug Robbins - Word MVP wrote:
See:

Controlling the Printer from Word VBA
Part 1: Using VBA to Select the Paper Tray
http://pubs.logicalexpressions.com/P...cle.asp?ID=101

Controlling the Printer from Word VBA
Part 2: Using VBA to control Duplex, Color Mode and Print Quality
http://pubs.logicalexpressions.com/P...cle.asp?ID=116

Controlling the Printer from Word VBA
Part 3: Dealing with Different Paper Sizes
http://pubs.logicalexpressions.com/P...cle.asp?ID=132

Controlling the Printer from Word VBA
Part 4: Getting printer driver details
http://pubs.logicalexpressions.com/P...cle.asp?ID=183


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"RobatPF" wrote in message
oups.com...
Question from the postscript uninitiated!.............

We currently have a lot of templates with code written to control a
number of primary functions such as Tray and Duplex, but it only works
via the PCL drivers for our Xerox printers. We are missing a lot of
functionality as well as having a lot of problems with other
applications printing effectively. We want to use the postscript
drivers for our printers and be able to pass postscript PDL commands

as
per the PDL reference for each printer. I have tried using the PRINT
\p page field, but the commands do not execute or the printer prints
error pages. If anyone can help with code or point me in the right
direction it would be greatly appreciated.




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why dont MS just f**king re-write Word from scratch? Its dogsh*t Word Hater Microsoft Word Help 33 May 5th 23 02:52 PM
How to put graphics on envelopes? Steve Koenig Microsoft Word Help 21 April 29th 23 02:47 AM
take yet another lesson from wordperfect "reveal codes" wordperfect is superior Microsoft Word Help 5 May 11th 09 07:58 PM
Change paper size; Word changes to invalid margins OhioTech New Users 10 July 6th 06 02:00 PM
Word & WordPerfect MrsMac Microsoft Word Help 5 June 10th 06 03:14 AM


All times are GMT +1. The time now is 06:52 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"