Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. [SOLVED] WPF Printing in milimeters

[SOLVED] WPF Printing in milimeters

Scheduled Pinned Locked Moved WPF
csharpwpftestingbeta-testing
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Saksida Bojan
    wrote on last edited by
    #1

    Hello I am using DrawingContext to draw text, and then i print visual throu PrintDialog. I want to convert input from milimeters. I do not know formula and on google i only found a few pieces, but i realy want to be printer independet. I found on a Some page 1 mm = 3.779528 px Is this printer independet. I am writing an application that will print on normal A4 printer or on 60mm x Reciept type printers. My app is already printing, but some values i want to be in pixel and some in mm. Thank you Edit: Upon remote testing i noticed that no matter if Printer is 600DPI or 300dpi. I can simply ignore these values

    A 1 Reply Last reply
    0
    • S Saksida Bojan

      Hello I am using DrawingContext to draw text, and then i print visual throu PrintDialog. I want to convert input from milimeters. I do not know formula and on google i only found a few pieces, but i realy want to be printer independet. I found on a Some page 1 mm = 3.779528 px Is this printer independet. I am writing an application that will print on normal A4 printer or on 60mm x Reciept type printers. My app is already printing, but some values i want to be in pixel and some in mm. Thank you Edit: Upon remote testing i noticed that no matter if Printer is 600DPI or 300dpi. I can simply ignore these values

      A Offline
      A Offline
      AlphaDeltaTheta
      wrote on last edited by
      #2

      Saksida Bojan wrote:

      1 mm = 3.779528 px

      WPF uses Device Independent Pixels, you may have a hard-time with this asumption

      Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas.

      ~ Carl von Clausewitz ~

      Source

      S 1 Reply Last reply
      0
      • A AlphaDeltaTheta

        Saksida Bojan wrote:

        1 mm = 3.779528 px

        WPF uses Device Independent Pixels, you may have a hard-time with this asumption

        Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas.

        ~ Carl von Clausewitz ~

        Source

        S Offline
        S Offline
        Saksida Bojan
        wrote on last edited by
        #3

        I Know WPF is DPI indipented when putting it on screen. Does that extend to Printing? I am using Drawing Context and all values are pixel based. My Printer has resolution 600dpi. But other printer that is currently not awaible is STAR SP 200 Series. It is a 300DPI Matrix type printer.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups