locked
PageSettings.PrintableArea not reflecting printer capabilities RRS feed

  • Question

  • I'm printing to a pre-printed form, so objective location matters.  I'm trying to reach .15 in margins.  Using 2 printers I'm dealing with as examples.

    With an HP 1320, using a PCL5 driver, I get a printable area {X=25,Y=16.66667,Width=800,Height=1066.667}; the same printer using a PCL6 driver, the printable area is {X=16.66667,Y=16.66667,Width=816.6667,Height=1066.667}.  I believe the PCL6 is accurately reflecting the printer's capability.  If I use wordpad to find the min-margins, I get the same results as .Net.  (I don't have a PCL6 driver for Win7, only an old XP machine, so no solution)

    With a Canon IR1730if, I get a printable area {X=25,Y=25,Width=800,Height=1050}.  I know it can print farther than that.  Using it as a copy machine, it gets to about .07 in margins.  Trying to print outside of the printable area (negative values or >800/1050) shows nothing (as expected).  If I use wordpad on this printer, it gives 0,0,0,0 as min-margins (everything outside the ~.07 in isn't printed, as expected, but it does print closer than .25).  Printing to a PDF, then printing the PDF allows me to print outside of the .25inch PrintableArea.

    I've tried changing about every property on both the physical printer and installed printer with no resolution.

    I don't know how .Net determines the PrintableArea, so I'm not sure where to go next.  Is there a device property or system call or something that can be tweaked so the PrintableArea accurately reflects the limits of the printer, Or am I stuck hoping driver developers play fair?  Is there some other printing method that isn't bound by same restrictions; afterall, Adobe and Wordpad can reach the correct margins?

    Wednesday, April 27, 2016 9:33 PM

Answers

  • Hi Formal Turtle,

    When check PageSettings.PrintableArea Property in MSDN document. You can see the PrintableArea property type is RectangleF.  That's a structure, a value type.  When you use the property, you get back a copy of the value.

    public RectangleF PrintableArea { get; }

    From above Syntax, the keypoint is that the PrintableArea property only has a getter, it doesn't have a setter.  Which means that you can't change it.  Which makes sense if you think about it, you can't change the size of the piece of paper nor change the design of the printer.  You probably want to use the Margins property.In Remarks section:

    You can use this property to print outside the margins of the page, but within the printable area.

    >>Is there a device property or system call or something that can be tweaked so the PrintableArea accurately reflects the limits of the printer.

    As far as I know, unfortunately, the answer is no.

    Hope it helps!

    Best regards,

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Kristin Xie Friday, April 29, 2016 1:52 AM
    • Proposed as answer by DotNet Wang Monday, May 2, 2016 9:16 AM
    • Marked as answer by DotNet Wang Friday, May 6, 2016 1:51 AM
    Friday, April 29, 2016 1:50 AM