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