Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Printer Paper Sizes

13 REPLIES 13
Reply
Message 1 of 14
Anonymous
1081 Views, 13 Replies

Printer Paper Sizes

Has anyone gotten Custom Printer Paper Sizes to work in the API? Event the
Example in Help doesn't seem to work. Thinking this may be part of the
"Order" bug I have switched around the order things get set practically
every way I can think of and the print always seems to come out 8.5 x 11 no
matter what the custom size is set to.

--
Kent Keller
http://www.MyMcad.com/KWiK/Mcad.htm

Assistant Moderator
Autodesk Discussion Forum Moderator Program
13 REPLIES 13
Message 2 of 14
Anonymous
in reply to: Anonymous

I have in my VBA used all kind of nice functions for replacing borders and heading but I haven't been able to change sheet size that normaly should go with the border size. I also want to know the answer to this Q?

Mikael
Message 3 of 14
ianb
in reply to: Anonymous

I too have been unable to get custom paper sizes to work - my fiddled code here works A4 A3 on laserjets and A2 A1 A0 on Oce TDS400 - only tested with one drawing containing 5 sheets (1 of each size all scaled 1:1).
I've only actually used kPaperSizeCustom for A1
A1 fiddled by scaling but can't understand logic here.
A0 relies on print driver default set to A0.

I have tried adapting this to HP Designjets but can't even get kPaperSizeA2 to work.

I can't understand why Autodesk did not include A1 A0 papersizes?

Select Case vPaperWidth
Case 20 To 22 '21 (A4) works on laserjets
oDrgPrintMgr.Printer = sA4Printer
oDrgPrintMgr.PaperSource = 2
oDrgPrintMgr.ScaleMode = kPrintBestFitScale
oDrgPrintMgr.PaperSize = kPaperSizeA4
oDrgPrintMgr.Orientation = kPortraitOrientation
oDrgPrintMgr.Rotate90Degrees = False

Case 41 To 43 '42 (A3) works on laserjets
oDrgPrintMgr.Printer = sA3Printer
oDrgPrintMgr.PaperSource = 2
oDrgPrintMgr.ScaleMode = kPrintBestFitScale
oDrgPrintMgr.PaperSize = kPaperSizeA3
oDrgPrintMgr.Orientation = kLandscapeOrientation
oDrgPrintMgr.Rotate90Degrees = False

Case 58 To 61 '59.4 (A2) works on Oce TDS400
oDrgPrintMgr.Printer = sLargePrinter
oDrgPrintMgr.ColorMode = kPrintGrayScale
oDrgPrintMgr.PaperSource = 2 '2 = roll 2 on oce
oDrgPrintMgr.ScaleMode = kPrintCustomScale
oDrgPrintMgr.[Scale] = 1
oDrgPrintMgr.PaperSize = kPaperSizeA2
oDrgPrintMgr.Orientation = kLandscapeOrientation
oDrgPrintMgr.Rotate90Degrees = False

Case 83 To 85 '84.1 (A1) works on Oce TDS400
oDrgPrintMgr.Printer = sLargePrinter
oDrgPrintMgr.ColorMode = kPrintGrayScale
oDrgPrintMgr.PaperSource = 279 '279 = roll 1 on oce
oDrgPrintMgr.ScaleMode = kPrintCustomScale
oDrgPrintMgr.[Scale] = 0.36 '0.3535 sq root of 0.128 more precise
oDrgPrintMgr.PaperSize = kPaperSizeCustom
oDrgPrintMgr.PaperHeight = vPaperHeight
DrgPrintMgr.PaperWidth = vPaperWidth
oDrgPrintMgr.Orientation = kLandscapeOrientation
oDrgPrintMgr.Rotate90Degrees = False

Case 110 To 120 '118.9 (A0) works on Oce TDS400
oDrgPrintMgr.Printer = sLargePrinter
oDrgPrintMgr.ColorMode = kPrintGrayScale
oDrgPrintMgr.PaperSource = 7 '7 seems to be default paper size (A0) on oce
oDrgPrintMgr.ScaleMode = kPrintCustomScale
oDrgPrintMgr.[Scale] = 1
oDrgPrintMgr.Orientation = kPortraitOrientation
oDrgPrintMgr.Rotate90Degrees = True
Message 4 of 14
Anonymous
in reply to: Anonymous

I have gotten a few messages from people having trouble with custom
sizes. It would be nice to hear if it is truly a bug or if it is
something we are doing wrong. And if it is a bug is it going to be
fixed for R8?

--
Kent Keller
http://www.MyMcad.com/KWiK/Mcad.htm

Assistant Moderator
Autodesk Discussion Forum Moderator Program

"ianb" wrote in message
news:f1734f4.1@WebX.maYIadrTaRb...
> I too have been unable to get custom paper sizes to work
Message 5 of 14
Anonymous
in reply to: Anonymous

Kent:

Add me to the list of people having trouble with custom paper sizes.

Richard


Kent Keller wrote:
> I have gotten a few messages from people having trouble with custom
> sizes. It would be nice to hear if it is truly a bug or if it is
> something we are doing wrong. And if it is a bug is it going to be
> fixed for R8?
>
Message 6 of 14
SRayC
in reply to: Anonymous

Add my name also. I am having trouble with just getting standard sizes to work. No matter the orientation setting and paper size setting it all comes out 8.5x11 portrait.
Set PrintMgr = oApp.ActiveDocument.PrintManager
PrintMgr.Orientation = kLandscapeOrientation
PrintMgr.PaperSize = kPaperSize11x17
PrintMgr.Printer = Form1.Text1
PrintMgr.SubmitPrint
Ray C.
Message 7 of 14
Anonymous
in reply to: Anonymous

The order of setting paper size, orientation is
very finicky.  Also the first thing you need to do is specify the
printer.Try something like the order of below.

 

Kathy Johnson


    Select Case
Me.frmPrinter
        Case 1:
oPrintMgr.Printer = "\\W2K_1\HP LaserJet
1200"
        Case 2:
oPrintMgr.Printer = "\\W2K_1\HP DesignJet 800PS3
42"
        Case 3: oPrintMgr.Printer
= "Acrobat Distiller"
    End Select

    Select Case
Me.frmSize
        Case 1:
oPrintMgr.PaperSize =
kPaperSizeLetter
        Case 2:
oPrintMgr.PaperSize =
kPaperSize11x17
        Case 3:
oPrintMgr.PaperSize = kPaperSizeCSheet
    End
Select
    oPrintMgr.PrintRange =
kPrintCurrentSheet
    oPrintMgr.ScaleMode =
kPrintBestFitScale
    oPrintMgr.Orientation =
kLandscapeOrientation

Message 8 of 14
SRayC
in reply to: Anonymous

Kathy,
You made my day. That works great. I must have missed that in the documentation. I just figured since you had to submit the print that the order didn't matter. How wrong I was. Thanks again!!! Ray COrdery
Message 9 of 14
Anonymous
in reply to: Anonymous

There is nothing in the documentation that I have ever seen that indicates order matters.
I feel it is a likely a defect and am hopefully it will get fixed in the next release.

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program


"srayc" wrote in message news:f1734f4.6@WebX.maYIadrTaRb...
> Kathy,
> You made my day. That works great. I must have missed that in the documentation. I just
figured since you had to submit the print that the order didn't matter. How wrong I was.
Thanks again!!! Ray COrdery
Message 10 of 14
Anonymous
in reply to: Anonymous

Second that

It seems like the configuration setting is working directly on the printer
( difficult to explain ) , and not in a temporary kind of "buffer" setting
that applies when the print is "submitted".

If this could be implemented, there should be added som kind af "Apply"
method just before the print is actually submitted, to check if everything
went well, and give us humble programmers a chance to give some feedback to
the users and the programcode

BTW

Regarding papersizes and settings, many printers and plotters doesn't
support custom papersizes.
I have no problem setting up various papersizes, plotting IDW's for an OCÉ
9300 roll-feed plotter with two paperrolls.that supports plots up to
approx.10 meters.
I just read the sheetsize, select papersizecustom and put the
sheetsizevalues into Paperwidth, and Paperheight

Mybe I can give some hints, that could be helpfull, at least it's working
for me and my customers:

To track down problems with configurationsettings, make a bit of VBA code in
a running Inventor session, and step through the code, following what
happens to all the settings, when the code changes something.

With PlotConfiguration:
.Printer=MyPrinterNameFromWindowsPrinters
.Colormode=kPrintColorPalette
or
.Colormode=kPrintGrayScale
.PrintRange=kPrintCurrentSheet I'm switching sheets
manually via code elsewhere, it's easier to control collated and not prints.
.Rotate90Degrees=true/false
.Papersource=? This is VERY
printer/Plotter specific, make a small routine in IV-VBA and use wathcer to
see when changing printsetup. Remove this line to use default.
.Scalemode=kPrintCustomScale Just for my own convenience as
I scale a lot and feel a lot calmer if I control this myself. ;-),else
kPrintFullscale works fine
.Scale=1 or just what is
needed
.PaperWidth
.PaperHeight
.NumberOfCopies I don't use this
.PrintToFile MyPrintFileName If print to file
IvApp.ActiveView.Fit True line of code to make the
display update text on the sheet. else it's garbled when printed. ( at least
in IV5.3 )
.SubmitPrint
end with

Notice the lack of ".kPaperSizeCustom", yes, it says in the help file to use
it, but in my old code i had it commented out and it's still running
without, and it's used for our European A4/A3 sizes on a laserprinter, and
larger sizes for a plotter.

In my early "IV-printing program" days I opened a new empty drawing and
closed it again before opening the actual IDW to plot, I don't remember why,
but it's still in my program, and I don't dare to remove it 🙂 It doesn't
do anything at all, but I had trouble too that time, so I guess I tried to
get some kind of "reset" of printsettings if I did that ( the program is for
a plotserver, and the settings varies from plot to plot ).
The lines are:

IvApp.Documents.Add kDrawingDocumentObject
IvApp.ActiveDocument.Close True

placed just before the printing part, nothing else.

It may not but the right way of doing things, but this has been working with
IDW's for me since IV5.3.

And a final word

Good luck on the plotting fields.

Regards
Lars Nielsen
www.laroni.dk



"Kent Keller" wrote in message
news:AAA46BAAF089D1CFD59BA12639BA3AF2@in.WebX.maYIadrTaRb...
> There is nothing in the documentation that I have ever seen that indicates
order matters.
> I feel it is a likely a defect and am hopefully it will get fixed in the
next release.
>
> --
> Kent
> Assistant Moderator
> Autodesk Discussion Forum Moderator Program
>
>
> "srayc" wrote in message
news:f1734f4.6@WebX.maYIadrTaRb...
> > Kathy,
> > You made my day. That works great. I must have missed that in the
documentation. I just
> figured since you had to submit the print that the order didn't matter.
How wrong I was.
> Thanks again!!! Ray COrdery
>
>
Message 11 of 14
Anonymous
in reply to: Anonymous

Hi Lars

Thanks for the help. I have filed this away to look at when I am not so swamped with
other things. 8^)

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program


"Lars R Nielsen" wrote in message
news:B33A02868616F491BC904F168743AC27@in.WebX.maYIadrTaRb...
> Second that
>
> It seems like the configuration setting is working directly on the printer
> ( difficult to explain ) , and not in a temporary kind of "buffer" setting
> that applies when the print is "submitted".
Message 12 of 14
Anonymous
in reply to: Anonymous

I tired using his method with both Adobe PDFwriter and Distiller and still
had no luck.

Kathy Johnson

"Kent Keller" wrote in message
news:BE7039D8C26B3E213B4193DCD7498DC6@in.WebX.maYIadrTaRb...
> Hi Lars
>
> Thanks for the help. I have filed this away to look at when I am not so
swamped with
> other things. 8^)
>
> --
> Kent
> Assistant Moderator
> Autodesk Discussion Forum Moderator Program
>
>
> "Lars R Nielsen" wrote in message
> news:B33A02868616F491BC904F168743AC27@in.WebX.maYIadrTaRb...
> > Second that
> >
> > It seems like the configuration setting is working directly on the
printer
> > ( difficult to explain ) , and not in a temporary kind of "buffer"
setting
> > that applies when the print is "submitted".
>
>
Message 13 of 14
Anonymous
in reply to: Anonymous

Yes, AcrobatPDF-W and Distiller are painfull programs to control without
documentation :-(.

Inventor won't use custompapers in these, tried it too some time ago, no
luck

Use the "normal" papersizes don't use "Screen" / "PS custom" they don't
work. ( my experience, but most certainly could be wrong 🙂 )

It should be possible to program, digging into Adobe's documentation, but
regarding "CustomPapersizes" from Inventor I feel that the call from
Inventor to WindowsPrinters specifying that "Custom" size should be used,
isn't recognized by all printerdrivers, specially not Acrobat's ( as before,
many printerdrivers doesn't support custom sizes ), or Inventor calling
format is incorrect.
It's just my best guess to understand, what's going on behind the scenes in
IV/Win.

Many things can be done programticly, modifying directly the Registry,
controlling the program interface via calls filling out textboxes and
pressing buttons, but I don't like these solutions, I do these things
allright, because there are no alternatives, but it's may experience that
much of the time that is spend on programming, isn't doing all the funny
things we like working with IV, but to make IV and Windows interact
correcly, due to limitations from either IV's API or Windows.

Well, a bit OT., sorry.

Regards
Lars Nielsen
www.laroni.dk

"KJohnson" wrote in message
news:9117E2A187B8DBB1DA972321AD27721C@in.WebX.maYIadrTaRb...
> I tired using his method with both Adobe PDFwriter and Distiller and still
> had no luck.
>
> Kathy Johnson
>
> "Kent Keller" wrote in message
> news:BE7039D8C26B3E213B4193DCD7498DC6@in.WebX.maYIadrTaRb...
> > Hi Lars
> >
> > Thanks for the help. I have filed this away to look at when I am not
so
> swamped with
> > other things. 8^)
> >
> > --
> > Kent
> > Assistant Moderator
> > Autodesk Discussion Forum Moderator Program
> >
> >
> > "Lars R Nielsen" wrote in message
> > news:B33A02868616F491BC904F168743AC27@in.WebX.maYIadrTaRb...
> > > Second that
> > >
> > > It seems like the configuration setting is working directly on the
> printer
> > > ( difficult to explain ) , and not in a temporary kind of "buffer"
> setting
> > > that applies when the print is "submitted".
> >
> >
>
>
Message 14 of 14
Anonymous
in reply to: Anonymous

Thanks.

Kathy Johnson

"Lars R Nielsen" wrote in message
news:4E9C529B48D1283D9CB2BC8F32B75A36@in.WebX.maYIadrTaRb...
> Yes, AcrobatPDF-W and Distiller are painfull programs to control without
> documentation :-(.
>
> Inventor won't use custompapers in these, tried it too some time ago, no
> luck
>
> Use the "normal" papersizes don't use "Screen" / "PS custom" they don't
> work. ( my experience, but most certainly could be wrong 🙂 )
>
> It should be possible to program, digging into Adobe's documentation, but
> regarding "CustomPapersizes" from Inventor I feel that the call from
> Inventor to WindowsPrinters specifying that "Custom" size should be used,
> isn't recognized by all printerdrivers, specially not Acrobat's ( as
before,
> many printerdrivers doesn't support custom sizes ), or Inventor calling
> format is incorrect.
> It's just my best guess to understand, what's going on behind the scenes
in
> IV/Win.
>
> Many things can be done programticly, modifying directly the Registry,
> controlling the program interface via calls filling out textboxes and
> pressing buttons, but I don't like these solutions, I do these things
> allright, because there are no alternatives, but it's may experience that
> much of the time that is spend on programming, isn't doing all the funny
> things we like working with IV, but to make IV and Windows interact
> correcly, due to limitations from either IV's API or Windows.
>
> Well, a bit OT., sorry.
>
> Regards
> Lars Nielsen
> www.laroni.dk
>
> "KJohnson" wrote in message
> news:9117E2A187B8DBB1DA972321AD27721C@in.WebX.maYIadrTaRb...
> > I tired using his method with both Adobe PDFwriter and Distiller and
still
> > had no luck.
> >
> > Kathy Johnson
> >
> > "Kent Keller" wrote in message
> > news:BE7039D8C26B3E213B4193DCD7498DC6@in.WebX.maYIadrTaRb...
> > > Hi Lars
> > >
> > > Thanks for the help. I have filed this away to look at when I am not
> so
> > swamped with
> > > other things. 8^)
> > >
> > > --
> > > Kent
> > > Assistant Moderator
> > > Autodesk Discussion Forum Moderator Program
> > >
> > >
> > > "Lars R Nielsen" wrote in message
> > > news:B33A02868616F491BC904F168743AC27@in.WebX.maYIadrTaRb...
> > > > Second that
> > > >
> > > > It seems like the configuration setting is working directly on the
> > printer
> > > > ( difficult to explain ) , and not in a temporary kind of "buffer"
> > setting
> > > > that applies when the print is "submitted".
> > >
> > >
> >
> >
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report