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. Converting text into image

Converting text into image

Scheduled Pinned Locked Moved C / C++ / MFC
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.
  • S Offline
    S Offline
    Shamoon
    wrote on last edited by
    #1

    Dear friends, I've developed an application in VC++/MFC. It is basically a text editor. You can type text message in it, and save the file. The speciality is that this application uses special fonts that i designed. Actually, the problem is that, if i try to open the file on a computer where my font is not present, the file is obviously not readable. Now what i want is that my application that generates this file, saves it as an image instead of text, so that it can me readable on some other machine where the font is not installed. Is it possible to save text file as an image (jpg, or gif)??? Is there any sample code present here ?? Or any other advice from your part ???

    M 1 Reply Last reply
    0
    • S Shamoon

      Dear friends, I've developed an application in VC++/MFC. It is basically a text editor. You can type text message in it, and save the file. The speciality is that this application uses special fonts that i designed. Actually, the problem is that, if i try to open the file on a computer where my font is not present, the file is obviously not readable. Now what i want is that my application that generates this file, saves it as an image instead of text, so that it can me readable on some other machine where the font is not installed. Is it possible to save text file as an image (jpg, or gif)??? Is there any sample code present here ?? Or any other advice from your part ???

      M Offline
      M Offline
      Miguel Lopes
      wrote on last edited by
      #2

      What about converting to .pdf or .ps? I think there are some utilities to convert it in codeproject. Another solution would be to generate an image. For that, i think you can create an image object of some kind, like CBitmap (or CMemDC??), and PAINT in to it, like you would do if it was a printer. Of course, if your doc has multiple pages, it will require multiple images. After that, you can save the data to a file.

      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