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. Graphics
  4. How do I convert iTextSharp text to outline (vectorize)?

How do I convert iTextSharp text to outline (vectorize)?

Scheduled Pinned Locked Moved Graphics
graphicsquestionwinformstutorial
2 Posts 1 Posters 2 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.
  • J Offline
    J Offline
    Jakob Farian Krarup
    wrote on last edited by
    #1

    Hi :) I am generating a PDF for use in a lasercutter. The printerdriver for the laser cutter takes vectors with a specific color and stroke-width, and uses them to cut all the way through the material. All rasters/bitmaps are just burnt into the surface of the material. I would like to be able to take a piece of text and convert it to a vector outline. I thought this would do it:

    cb.BeginText()
    cb.SetLineWidth(0.01f)
    cb.SetColorStroke(BaseColor.RED)
    cb.SetTextRenderingMode(PdfContentByte.TEXT_RENDER_MODE_STROKE)

    But apparently the stroke generated is a raster and not a vector. Any ideas? I could also go from the metods in GDI+/System.Drawing if anyone knows how to do that. Kind regards - Jakob

    J 1 Reply Last reply
    0
    • J Jakob Farian Krarup

      Hi :) I am generating a PDF for use in a lasercutter. The printerdriver for the laser cutter takes vectors with a specific color and stroke-width, and uses them to cut all the way through the material. All rasters/bitmaps are just burnt into the surface of the material. I would like to be able to take a piece of text and convert it to a vector outline. I thought this would do it:

      cb.BeginText()
      cb.SetLineWidth(0.01f)
      cb.SetColorStroke(BaseColor.RED)
      cb.SetTextRenderingMode(PdfContentByte.TEXT_RENDER_MODE_STROKE)

      But apparently the stroke generated is a raster and not a vector. Any ideas? I could also go from the metods in GDI+/System.Drawing if anyone knows how to do that. Kind regards - Jakob

      J Offline
      J Offline
      Jakob Farian Krarup
      wrote on last edited by
      #2

      Well, I've gone with this for now: GDI+ Path to PDF[^] If anyone else has other methods, I'd still like to hear about them 👍 /Jake

      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