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#
  4. Wordwrapping when printing

Wordwrapping when printing

Scheduled Pinned Locked Moved C#
helpquestion
2 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.
  • N Offline
    N Offline
    numbers1thru9
    wrote on last edited by
    #1

    I am designing my print form but im having a small problem, some strings that I am wanting to print are longer than the print bounds and I would like to know if there is a way to make the string print within the bounds and wrap to the next line when it hits those bounds?

    L 1 Reply Last reply
    0
    • N numbers1thru9

      I am designing my print form but im having a small problem, some strings that I am wanting to print are longer than the print bounds and I would like to know if there is a way to make the string print within the bounds and wrap to the next line when it hits those bounds?

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, the application that shows stuff on the screen is also responsible for formatting it while printing. It could use the same PaintEvent handler for doing so. Amongst others this means the application itself must do any word wrapping that is required. Printing may vary from simple to complex depending on functionality: - if the screen also shows pages (as in MS Word when viewing "Print layout", then nothing much has to change for printing (except some border settings, and scaling that is) - if the screen only shows continuous data (as in Word's "Normal view", or in a simple text editor) then new code is required to figure out page boundaries etc. - furthermore there are issues around printer selection, page settings (per document? per page?), duplex printing, etc. So my advice is to separate all these concerns as much as possible. For one this implies providing a "page mode" or "print layout" view capability to your app (at least during the development phase, but then why not keep it?), in order to separate the different problem domains. Good luck ! :)

      Luc Pattyn

      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