Print API question

Print API question

Anonymous
Not applicable
430 Views
3 Replies
Message 1 of 4

Print API question

Anonymous
Not applicable
I've some problems with the control of the Windows
printer regarding Landscape and Portrait, the example below is a test of the of
DrawingPrintManager
property
Orientation, changing the orientation has no effect in the
code?

 

I may have misunderstood the possibility in the
DrawingPrintManager so
I would appreciate if anyone could clarify the usage of the
object.


title="DrawingPrintManager Object">
 


title="DrawingPrintManager Object">My goal is to make a "poor man"
PDF saver (with GhostScript) that generate a PDF file when the drawing is
saved.


title="DrawingPrintManager Object">
 


title="DrawingPrintManager Object">-Patrick

 

Public Sub PrintTest()

 

    ' Set a reference to the print
manager object of the active document.
    ' This will fail if
a drawing document is not active.
    Dim oPrintMgr As
DrawingPrintManager
    Set oPrintMgr =
ThisApplication.ActiveDocument.PrintManager
   

    ' Set to print in Gray

    oPrintMgr.ColorMode =
kPrintGrayScale
   
    ' Set to
print one copy
    oPrintMgr.NumberOfCopies =
1
    
       
' Set the paper size.
    oPrintMgr.PaperSize =
kPaperSizeA4
   
    ' Set the Windows
printer name
    oPrintMgr.Printer = "EPSON Stylus Photo
750"
      
    ' Set to
print all sheets.
    oPrintMgr.PrintRange =
kPrintAllSheets
   
    ' Set to print full
scale.
    oPrintMgr.ScaleMode =
kPrintFullScale
    
   
' Set to print using portrait orientation.
   
oPrintMgr.Orientation = kPortraitOrientation
   

    ' Submit the print.
   
oPrintMgr.SubmitPrint

   
   
' Set to print using landscape orientation.
   
oPrintMgr.Orientation = kLandscapeOrientation
   

    ' Submit the print.
   
oPrintMgr.SubmitPrint

 

End Sub
0 Likes
431 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Correction to the description:

 

.....Orientation, changing the orientation in the
code has no effect on the print?


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

I've some problems with the control of the
Windows printer regarding Landscape and Portrait, the example below is a test
of the of
title="DrawingPrintManager Object">DrawingPrintManager property
Orientation, changing the orientation has no effect in the
code?

 

I may have misunderstood the possibility in the
DrawingPrintManager
so I would appreciate if anyone could clarify the usage of the
object.


title="DrawingPrintManager Object">
 


title="DrawingPrintManager Object">My goal is to make a "poor man"
PDF saver (with GhostScript) that generate a PDF file when the drawing is
saved.


title="DrawingPrintManager Object">
 


title="DrawingPrintManager Object">-Patrick

 

Public Sub PrintTest()

 

    ' Set a reference to the print
manager object of the active document.
    ' This will fail
if a drawing document is not active.
    Dim oPrintMgr As
DrawingPrintManager
    Set oPrintMgr =
ThisApplication.ActiveDocument.PrintManager
   

    ' Set to print in Gray

    oPrintMgr.ColorMode =
kPrintGrayScale
   
    ' Set to
print one copy
    oPrintMgr.NumberOfCopies =
1
    
       
' Set the paper size.
    oPrintMgr.PaperSize =
kPaperSizeA4
   
    ' Set the Windows
printer name
    oPrintMgr.Printer = "EPSON Stylus Photo
750"
      
    ' Set to
print all sheets.
    oPrintMgr.PrintRange =
kPrintAllSheets
   
    ' Set to print
full scale.
    oPrintMgr.ScaleMode =
kPrintFullScale
    
   
' Set to print using portrait orientation.
   
oPrintMgr.Orientation = kPortraitOrientation
   

    ' Submit the print.
   
oPrintMgr.SubmitPrint

   
   
' Set to print using landscape orientation.
   
oPrintMgr.Orientation = kLandscapeOrientation
   

    ' Submit the print.
   
oPrintMgr.SubmitPrint

 

End Sub
0 Likes
Message 3 of 4

Anonymous
Not applicable
Patrick,

 

I've verified this problem and have filed a
defect.  Unfortunately it's too late to fix it for 5.3 SP2.

 

-Brian 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

Correction to the description:

 

.....Orientation, changing the orientation in the
code has no effect on the print?


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

I've some problems with the control of the
Windows printer regarding Landscape and Portrait, the example below is a
test of the of
title="DrawingPrintManager Object">DrawingPrintManager property
Orientation, changing the orientation has no effect in the
code?

 

I may have misunderstood the possibility in the
DrawingPrintManager
so I would appreciate if anyone could clarify the usage of the
object.


title="DrawingPrintManager Object">
 


title="DrawingPrintManager Object">My goal is to make a "poor man"
PDF saver (with GhostScript) that generate a PDF file when the drawing
is saved.


title="DrawingPrintManager Object">
 


title="DrawingPrintManager Object">-Patrick

 

Public Sub PrintTest()

 

    ' Set a reference to the
print manager object of the active document.
    ' This
will fail if a drawing document is not active.
    Dim
oPrintMgr As DrawingPrintManager
    Set oPrintMgr =
ThisApplication.ActiveDocument.PrintManager
   

    ' Set to print in Gray

    oPrintMgr.ColorMode =
kPrintGrayScale
   
    ' Set to
print one copy
    oPrintMgr.NumberOfCopies =
1
    
       
' Set the paper size.
    oPrintMgr.PaperSize =
kPaperSizeA4
   
    ' Set the Windows
printer name
    oPrintMgr.Printer = "EPSON Stylus Photo
750"
      
    ' Set to
print all sheets.
    oPrintMgr.PrintRange =
kPrintAllSheets
   
    ' Set to print
full scale.
    oPrintMgr.ScaleMode =
kPrintFullScale
    
   
' Set to print using portrait
orientation.
    oPrintMgr.Orientation =
kPortraitOrientation
   

    ' Submit the print.
   
oPrintMgr.SubmitPrint

   
   
' Set to print using landscape orientation.
   
oPrintMgr.Orientation = kLandscapeOrientation
   

    ' Submit the print.
   
oPrintMgr.SubmitPrint

 

End
Sub
0 Likes
Message 4 of 4

Anonymous
Not applicable
Thanks for letting me know, Brian.

 

As a workaround bonus for me it has forced me to
learn all about DEVMODE to control all the printer properties and by doing this
I've made the adding to work.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

Patrick,

 

I've verified this problem and have filed a
defect.  Unfortunately it's too late to fix it for 5.3 SP2.

 

-Brian 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

Correction to the description:

 

.....Orientation, changing the orientation in
the code has no effect on the print?


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">

I've some problems with the control of the
Windows printer regarding Landscape and Portrait, the example below is a
test of the of
title="DrawingPrintManager Object">DrawingPrintManager property
Orientation, changing the orientation has no effect in the
code?

 

I may have misunderstood the possibility in
the
title="DrawingPrintManager Object">DrawingPrintManager so I would
appreciate if anyone could clarify the usage of the
object.


title="DrawingPrintManager Object">
 


title="DrawingPrintManager Object">My goal is to make a "poor man"
PDF saver (with GhostScript) that generate a PDF file when the
drawing is saved.


title="DrawingPrintManager Object">
 


title="DrawingPrintManager Object">-Patrick

 

Public Sub PrintTest()

 

    ' Set a reference to the
print manager object of the active document.
    ' This
will fail if a drawing document is not active.
    Dim
oPrintMgr As DrawingPrintManager
    Set oPrintMgr =
ThisApplication.ActiveDocument.PrintManager
   

    ' Set to print in Gray

    oPrintMgr.ColorMode =
kPrintGrayScale
   
    ' Set to
print one copy
    oPrintMgr.NumberOfCopies =
1
    
       
' Set the paper size.
    oPrintMgr.PaperSize =
kPaperSizeA4
   
    ' Set the
Windows printer name
    oPrintMgr.Printer = "EPSON
Stylus Photo 750"
      

    ' Set to print all sheets.
   
oPrintMgr.PrintRange = kPrintAllSheets
   

    ' Set to print full scale.
   
oPrintMgr.ScaleMode =
kPrintFullScale
    
   
' Set to print using portrait
orientation.
    oPrintMgr.Orientation =
kPortraitOrientation
   

    ' Submit the print.
   
oPrintMgr.SubmitPrint

   
   
' Set to print using landscape orientation.
   
oPrintMgr.Orientation =
kLandscapeOrientation
   

    ' Submit the print.
   
oPrintMgr.SubmitPrint

 

End
Sub
0 Likes