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. C / C++ / MFC
  4. how to get the paper name

how to get the paper name

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
5 Posts 3 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.
  • A Offline
    A Offline
    ashxly
    wrote on last edited by
    #1

    recently, i worked on printing program. can anyone help me how to get the name of a system pre-defined paper? such as : value 1 return Letter (8.5 x 11 in.) thanks

    C J 2 Replies Last reply
    0
    • A ashxly

      recently, i worked on printing program. can anyone help me how to get the name of a system pre-defined paper? such as : value 1 return Letter (8.5 x 11 in.) thanks

      C Offline
      C Offline
      CodeBrain
      wrote on last edited by
      #2

      I think that may be a problem of the printer driver rather than the problem of the system. I don't know it exactly, but the paper size is defined in the DEVMODE printer struct (member: dmPaperSize). But here the definiton is only per number (symbolic constant). So I think the printer driver does the mapping from those numbers to the string which is visible in the windows common printer dialog!

      A 1 Reply Last reply
      0
      • C CodeBrain

        I think that may be a problem of the printer driver rather than the problem of the system. I don't know it exactly, but the paper size is defined in the DEVMODE printer struct (member: dmPaperSize). But here the definiton is only per number (symbolic constant). So I think the printer driver does the mapping from those numbers to the string which is visible in the windows common printer dialog!

        A Offline
        A Offline
        ashxly
        wrote on last edited by
        #3

        thank you CodeBrain, I do know the member of DEVMODE dmPaperSize identitify the dimension of the paper. but not very easy to get the size in strings. maybe the only thing i can do is mapping constants to strings by myself.

        1 Reply Last reply
        0
        • A ashxly

          recently, i worked on printing program. can anyone help me how to get the name of a system pre-defined paper? such as : value 1 return Letter (8.5 x 11 in.) thanks

          J Offline
          J Offline
          Joel Lucsy
          wrote on last edited by
          #4

          Look up DeviceCapabilities specifing DC_PAPERNAMES Joel Lucsy

          A 1 Reply Last reply
          0
          • J Joel Lucsy

            Look up DeviceCapabilities specifing DC_PAPERNAMES Joel Lucsy

            A Offline
            A Offline
            ashxly
            wrote on last edited by
            #5

            thank you Joel, it works using DeviceCapabilities function. very kind of you

            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