<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Convert text to raster image in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/convert-text-to-raster-image/m-p/5365591#M11836</link>
    <description>&lt;P&gt;I need to convert an AcDbText o Mtext entity to a raster image that is as large as the text.&lt;/P&gt;&lt;P&gt;What can I use?&lt;/P&gt;&lt;P&gt;Raster printer in Autocad doesn't allow me to add custom image size while printing and is really slow on exixting formats.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Flavio&lt;/P&gt;</description>
    <pubDate>Tue, 28 Oct 2014 16:53:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-10-28T16:53:22Z</dc:date>
    <item>
      <title>Convert text to raster image</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/convert-text-to-raster-image/m-p/5365591#M11836</link>
      <description>&lt;P&gt;I need to convert an AcDbText o Mtext entity to a raster image that is as large as the text.&lt;/P&gt;&lt;P&gt;What can I use?&lt;/P&gt;&lt;P&gt;Raster printer in Autocad doesn't allow me to add custom image size while printing and is really slow on exixting formats.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Flavio&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2014 16:53:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/convert-text-to-raster-image/m-p/5365591#M11836</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-28T16:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Convert text to raster image</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/convert-text-to-raster-image/m-p/5367345#M11837</link>
      <description>&lt;P&gt;1. so, custom paper size doesn't work because of too small size? am i right (that's one of the limitations i told)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. are you sure that you want "raster image that is as large as the text" and the task is correct?&lt;/P&gt;&lt;P&gt;autocad's font can be too small of too big (it's a vector object). so, your picture can be 10000000000000x10000000000000 or 1x1 pixel &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;as a sample (bitmap 1x1 pixel. font size is 0.25):&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/136397iC405BC88D6CB5EE0/image-size/original?v=mpbl-1&amp;amp;px=-1" title="text.jpg" alt="text.jpg" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS:&amp;nbsp;actually, you can use printing to jpg, and then cut the part of it (you can get width and height of your text and position of your text on jpg, you know width and height of the jpg.)&lt;BR /&gt;&lt;BR /&gt;PS2: but if you want your text was always readable, it's better to create it manually. you can get text string, color(s), angle... from an autocad object and then create canvas and write this text on it with all needed parameters and save it to file&lt;/P&gt;</description>
      <pubDate>Wed, 29 Oct 2014 11:43:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/convert-text-to-raster-image/m-p/5367345#M11837</guid>
      <dc:creator>nick83</dc:creator>
      <dc:date>2014-10-29T11:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Convert text to raster image</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/convert-text-to-raster-image/m-p/5369593#M11838</link>
      <description>&lt;P&gt;Hi Nick, thanks for your reply.&lt;/P&gt;&lt;P&gt;Adding custom paper size doesn't work because the raster printer to create JPG&amp;nbsp;&lt;/P&gt;&lt;P&gt;is a pc3 file and not actually a physical printer, so the open printer method returns false.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even if I print on standard raster format (VGA) the process is really slow due to spool and background work of autocad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've chosen the way of create a new jpeg file using a .NET graphic object with the drawstring method on a bitmap object.&lt;/P&gt;&lt;P&gt;It seems to work for the quality of the text but I'm facing some problems with pixel offset and padding.&lt;/P&gt;&lt;P&gt;I'll let you know the final solution&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Flavio&lt;/P&gt;</description>
      <pubDate>Thu, 30 Oct 2014 08:08:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/convert-text-to-raster-image/m-p/5369593#M11838</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-30T08:08:55Z</dc:date>
    </item>
  </channel>
</rss>

