<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : Metafile to PDF</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : I need help - I can help : Metafile to PDF]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 19:13:15 +0000</pubDate>
  <lastBuildDate>Fri, 04 Oct 2013 10:21:59 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=2741</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[Metafile to PDF : Here is some tested code that...]]></title>
   <link>http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11246.html#11246</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2741<br /><strong>Posted:</strong> 04 Oct 13 at 10:21AM<br /><br /><div>Here is some tested code that creates a MetaFile in memory, saves it to a MemoryStream and then DQPL loads the metafile and converts it to a PDF file.</div><div><br></div>unit MainForm;<div><br></div><div>interface</div><div><br></div><div>uses</div><div>&nbsp; Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,</div><div>&nbsp; System.Classes, Vcl.Graphics,</div><div>&nbsp; Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, DebenuPDFLibrary0916,</div><div>&nbsp; Printers;</div><div><br></div><div>type</div><div>&nbsp; TfrmMainForm = class(TForm)</div><div><span style="line-height: 1.4;">&nbsp; &nbsp; btnPDFByQuickPDF: TButton;</span></div><div><span style="line-height: 1.4;">&nbsp; &nbsp; procedure btnPDFByQuickPDFClick(Sender: TObject);</span></div><div>&nbsp; private</div><div>&nbsp; &nbsp; { Private declarations }</div><div>&nbsp; &nbsp; procedure prCreatePDFByQuickPDF(pMFList: TList);</div><div>&nbsp; public</div><div>&nbsp; &nbsp; { Public declarations }</div><div>&nbsp; end;</div><div><br></div><div>var</div><div>&nbsp; frmMainForm: TfrmMainForm;</div><div>&nbsp; uCanvas: TCanvas;</div><div><span style="line-height: 1.4;">&nbsp; MyMetafile: TMetafile;</span></div><div>&nbsp; uMFList: TList;</div><div><br></div><div>implementation</div><div><br></div><div>{$R *.dfm}</div><div><br></div><div>procedure TfrmMainForm.btnPDFByQuickPDFClick(Sender: TObject);</div><div>var</div><div>&nbsp; List: TList;</div><div>&nbsp; MF: TMetaFile;</div><div>&nbsp; st: TMemorystream;</div><div>begin</div><div><br></div><div>&nbsp; List := TList.Create;</div><div>&nbsp; MF := TMetaFile.Create;</div><div><br></div><div>&nbsp; MF.MMWidth := 21000; &nbsp; // A4</div><div>&nbsp; MF.MMHeight := 29700;</div><div>&nbsp; MF.Enhanced := True;</div><div><br></div><div>&nbsp; uCanvas := TMetaFileCanvas.Create(MF, GetDC(Handle)); &nbsp;// Also works with Printer.Handle</div><div>&nbsp; uCanvas.TextOut(100, 100, 'This is text from meta file');</div><div>&nbsp; uCanvas.Rectangle(90, 90, 200, 30);</div><div>&nbsp; uCanvas.Free;</div><div><br></div><div>&nbsp; st := TMemorystream.Create;</div><div>&nbsp; MF.SaveToStream(st);</div><div>&nbsp; st.Position := 0;</div><div><br></div><div>&nbsp; List.Add(st);</div><div><br></div><div>&nbsp; prCreatePDFByQuickPDF(List);</div><div>end;</div><div><br></div><div>procedure TfrmMainForm.prCreatePDFByQuickPDF(pMFList: TList);</div><div>var</div><div>&nbsp; QP: TDebenuPDFLibrary0916;</div><div>&nbsp; ret: Integer;</div><div>&nbsp; I, id: Integer;</div><div>&nbsp; dpix, dpiy: Integer;</div><div>&nbsp; xx, yy: Integer;</div><div>&nbsp; ImageWidthInPoints, ImageHeightInPoints: Double;</div><div>begin</div><div>&nbsp; QP := TDebenuPDFLibrary0916.Create;</div><div>&nbsp; ret := QP.UnlockKey('&lt;insert license key here&gt;');</div><div>&nbsp; if (ret &lt;&gt; 1) then</div><div>&nbsp; begin</div><div>&nbsp; &nbsp; ShowMessage('QPL DLL not loaded');</div><div>&nbsp; &nbsp; Exit;</div><div>&nbsp; end;</div><div><br></div><div>&nbsp; for I := 0 to pMFList.Count - 1 do</div><div>&nbsp; begin</div><div><br></div><div>&nbsp; &nbsp; id := QP.AddImageFromStream(TMemoryStream(pMFList), 0);</div><div>&nbsp; &nbsp; QP.SelectImage(id);</div><div><br></div><div>&nbsp; &nbsp; if (I &lt;&gt; 0) then &nbsp; &nbsp; // Do not add the 1st page it is created by default.</div><div>&nbsp; &nbsp; &nbsp; QP.NewPage();</div><div><br></div><div>&nbsp; &nbsp; QP.SetOrigin(1);</div><div>&nbsp; &nbsp; QP.SetPageDimensions(QP.ImageWidth(), QP.ImageHeight());</div><div>&nbsp; &nbsp; QP.DrawImage(0, 0, QP.ImageWidth(), QP.ImageHeight());</div><div>&nbsp; end;</div><div><br></div><div>&nbsp; QP.SaveToFile('out.pdf');</div><div>&nbsp; QP.Free;</div><div>end;</div><div><br></div><div>end.</div><em></em><span style="font-size:10px"><br /><br />Edited by AndrewC - 04 Oct 13 at 10:22AM</span>]]>
   </description>
   <pubDate>Fri, 04 Oct 2013 10:21:59 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11246.html#11246</guid>
  </item> 
  <item>
   <title><![CDATA[Metafile to PDF : Here is a simpler, somewhat relevant,...]]></title>
   <link>http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11242.html#11242</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1532">HNRSoftware</a><br /><strong>Subject:</strong> 2741<br /><strong>Posted:</strong> 03 Oct 13 at 1:49PM<br /><br />Here is a simpler, somewhat relevant, piece of code that worked for me.&nbsp; I really don't know or use emf files, so I just searched windows and found an emf file to see what happens.&nbsp; This produced a pdf file with what would appear to be the proper emf drawn into a 2"x2" block, which is what I would expect from the help file.<br><br>Note - TQuickPDF is my intercepted/extended usage of the TQuickPDF class, so Create does some additional setup.&nbsp; You reference "dll not loaded" -- my arrangement doesn't use the dll.&nbsp; I'm assuming you have some QuickPDF code somewhere that does do something correctly - a "Hello World" class of pdf file creation.&nbsp; I try to make it a point of starting with something that does something simple correctly before trying the fancy stuff.&nbsp; <br><br><br>Function&nbsp; EMFTest(EMFfname : string) : string;<br>var QP&nbsp;&nbsp;&nbsp; : TQuickPDF;<br>&nbsp;&nbsp;&nbsp; pdffn : string;<br>&nbsp;&nbsp;&nbsp; err&nbsp;&nbsp; : Integer;<br>&nbsp;&nbsp;&nbsp; lMF&nbsp;&nbsp; : TMetafile;<br>&nbsp;&nbsp;&nbsp; lCount: Integer;<br>&nbsp;&nbsp;&nbsp; st: TMemoryStream;<br>&nbsp;&nbsp;&nbsp;&nbsp; begin<br>&nbsp;&nbsp;&nbsp;&nbsp; pdffn := 'EMFTest.pdf';<br>&nbsp;&nbsp;&nbsp;&nbsp; QP := TQuickPDF.Create('');<br>&nbsp;&nbsp;&nbsp;&nbsp; try<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (QP.UnlockKey(QPDF_LicenseKey) &lt;&gt; 1) then logit('QuickPDF license key problem &#091;'+QPDF_LicenseKey+'&#093;');<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.SetOrigin(1);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // TOP LEFT - default is 0=BOTTOM LEFT<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.SetMeasurementUnits(2);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //2=Inches<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if FileExists(EMFfname) then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; begin<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lMF := TMetaFile.Create;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lMF.LoadFromFile(EMFfname);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; st := TMemoryStream.Create;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lMF.SaveToStream(st);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; st.Position := 0;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.ImportEMFFromStream(st, 1, 1);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.DrawImage(1.00,1.00,2.00,2.00);&nbsp; //draws on currently selected page<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; finally<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; st.Free;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lMF.Free;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end; // of try<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.SaveToFile(pdffn);<br>&nbsp;&nbsp;&nbsp;&nbsp; finally<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; result := 'EMFTest &#091;'+pdffn+'&#093;&nbsp; '+fileinfostr(pdffn);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.Free;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end;&nbsp; // of try<br>&nbsp;&nbsp;&nbsp;&nbsp; end;<br>]]>
   </description>
   <pubDate>Thu, 03 Oct 2013 13:49:31 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11242.html#11242</guid>
  </item> 
  <item>
   <title><![CDATA[Metafile to PDF : Based on your original code here...]]></title>
   <link>http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11241.html#11241</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2741<br /><strong>Posted:</strong> 03 Oct 13 at 9:47AM<br /><br />Based on your original code here is another option to import the EMF files and then draw them onto the PDF file. &nbsp;This code will handle the creation of new pages for each image in the list. &nbsp;By default DQPL creates the 1st page by default so it is not required to call QP.NewPage.<div><br></div><div>Here is some code to import a PDF file from a list of TList of MetaFiles. &nbsp;The code could be change easily to import a list of EMF files from disk also.</div><div><br></div><div><div>procedure TfrmMainForm.prCreatePDFByQuickPDF(pMFList: TList);</div><div>var</div><div>&nbsp; QP: TDebenuPDFLibrary0916;</div><div>&nbsp; ret: Integer;</div><div>&nbsp; I, id: Integer;</div><div><br></div><div>begin</div><div><span style="line-height: 1.4;">&nbsp; QP := TDebenuPDFLibrary0916.Create;</span></div><div>&nbsp; ret := QP.UnlockKey('&lt; Put your license key here &gt;');</div><div>&nbsp; if (ret &lt;&gt; 1) then</div><div>&nbsp; begin</div><div>&nbsp; &nbsp; ShowMessage('QPL DLL not loaded');</div><div>&nbsp; &nbsp; Exit;</div><div>&nbsp; end;</div><div><br></div><div>&nbsp; for I := 0 to pMFList.Count - 1 do</div><div>&nbsp; begin</div><div><span style="line-height: 1.4;">&nbsp; &nbsp; id := QP.AddImageFromStream(TStream(pMFList<em>), 0);</em></span></div><div><em><br></em></div><div><em>&nbsp; &nbsp;</em> if (I &lt;&gt; 0) then &nbsp; &nbsp; // Do not add the 1st page it is created by default.</div><div>&nbsp; &nbsp; &nbsp; QP.NewPage();</div><div><br></div><div><span style="line-height: 1.4;">&nbsp; &nbsp; QP.SetPageDimensions(</span><span style="line-height: 1.4;">QP.ImageWidth(), QP.ImageHeight());</span></div><div>&nbsp; &nbsp; QP.SetOrigin(1);</div><div>&nbsp; &nbsp; QP.DrawImage(0, 0,&nbsp;<span style="line-height: 1.4;">QP.ImageWidth(), QP.ImageHeight());</span></div><div>&nbsp; end;</div><div><br></div><div>&nbsp; QP.SaveImageToFile('output.pdf');</div><div>&nbsp; QP.Free;</div><div>end;</div><div><em><br></em></div></div><em></em><span style="font-size:10px"><br /><br />Edited by AndrewC - 03 Oct 13 at 9:48AM</span>]]>
   </description>
   <pubDate>Thu, 03 Oct 2013 09:47:41 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11241.html#11241</guid>
  </item> 
  <item>
   <title><![CDATA[Metafile to PDF : Unfortunately suggestions given...]]></title>
   <link>http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11240.html#11240</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2473">tushar</a><br /><strong>Subject:</strong> 2741<br /><strong>Posted:</strong> 03 Oct 13 at 7:23AM<br /><br /><P style="MARGIN: 0cm 2.25pt 0.75pt" =Ms&#111;normal><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB; mso-bidi-: MR" lang=EN>Unfortunately suggestions given by Andrew is not working. Using QP.UnlockKey doesn’t help. I quit agree with HNR software about the use of ImportEMF functionality. I also feel that " I figured out that "adding" an emf, or any image, doesn't actually do anything useful " <?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><SPAN style="FONT-FAMILY: 'Verdana','sans-serif'; COLOR: black; FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN; mso-fareast-: EN-GB; mso-bidi-: MR" lang=EN><DIV>&nbsp;</DIV><DIV>Also code sample given by Andrew uses Canvas Handle of QP component. It might result in different output. When creating metafile canvas we are using Printer handle. This may get different result and to make compatible with QP component there will be big efforts in existing code.</SPAN></DIV>]]>
   </description>
   <pubDate>Thu, 03 Oct 2013 07:23:56 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11240.html#11240</guid>
  </item> 
  <item>
   <title><![CDATA[Metafile to PDF : Hi Andrew - great example, but...]]></title>
   <link>http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11239.html#11239</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1532">HNRSoftware</a><br /><strong>Subject:</strong> 2741<br /><strong>Posted:</strong> 02 Oct 13 at 1:57PM<br /><br />Hi Andrew - great example, but I think it belongs on the other thread about Get/LoadFromCanvasDC.&nbsp; From what little I know about "emf" files, your string "<span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;"> ‘This is text from meta file’"&nbsp; </span>doesn't have a lot of meaning for the example.&nbsp; Without actually executing the code, it seems to me like it should produce a single page pdf file with that text line in it, page 2 never gets invoked.&nbsp; Regardless, it helps me a great deal, I think I understand your point.&nbsp; Howard<br>]]>
   </description>
   <pubDate>Wed, 02 Oct 2013 13:57:39 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11239.html#11239</guid>
  </item> 
  <item>
   <title><![CDATA[Metafile to PDF : Hello,I came up with the following...]]></title>
   <link>http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11234.html#11234</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2741<br /><strong>Posted:</strong> 02 Oct 13 at 1:08PM<br /><br /><div>Hello,</div><div><br></div><div>I came up with the following code that generated a valid PDF from a Delphi TCanvas object.</div><div><br></div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">procedure TfrmMainForm.prCreatePDFByQuickPDF(pMFList: TList);</span><p style="border: 0px; margin: 6px 0px 12px; padding: 0px; font-size: 13px; color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; line-height: 19px;">var<br>&nbsp; QP: TDebenuPDFLibrary0916;<br>&nbsp; ret, page: Integer;<br>begin<br>&nbsp; QP := TDebenuPDFLibrary0916.Create;<br>&nbsp; ret := QP.UnlockKey(‘&lt;insert your key here&gt;’);<br>&nbsp; if (ret &lt;&gt; 1) then<br>&nbsp; begin<br>&nbsp; &nbsp; ShowMessage(‘QPL DLL not loaded’);<br>&nbsp; &nbsp; Exit;<br>&nbsp; end;</p><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; page := 1;&nbsp;</span><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;"><br></span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; uCanvas := TCanvas.Create;</span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; uCanvas.Handle := QP.GetCanvasDC(612, 792); // Let DQPL provide the handle.&nbsp;</span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;"><br></span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; Arial10 := TFont.Create;</span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; Arial10.Name := ‘Arial’;&nbsp;</span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; Arial10.Height := -10;&nbsp;</span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;"><br></span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; uCanvas.Font := Arial10;&nbsp;</span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; uCanvas.TextOut(100, 100, ‘This is text from meta file’);&nbsp;</span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;"><br></span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; if (Page = 1) then</span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; &nbsp; QP.LoadFromCanvasDC(72, 0) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Now generate the PDF file.onto page 1&nbsp;</span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; else</span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; &nbsp; QP.NewPageFromCanvasDC(72, 0); &nbsp; // Add a new page if page &gt;= 2</span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;"><br></span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; QP.SaveToFile(‘out.pdf’);</span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; uCanvas.Free;</span></div><div><span style="color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; font-size: 13px; line-height: 19px;">&nbsp; QP.Free;</span></div><div><font color="#222222" face="Helvetica Neue, Helvetica, Arial, Liberati&#111;n Sans, FreeSans, sans-serif" size="2"><span style="line-height: 19px;"><br></span></font><p style="border: 0px; margin: 6px 0px 12px; padding: 0px; font-size: 13px; color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; line-height: 19px;">end;</p><p style="border: 0px; margin: 6px 0px 12px; padding: 0px; font-size: 13px; color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; line-height: 19px;"><br></p><p style="border: 0px; margin: 6px 0px 12px; padding: 0px; font-size: 13px; color: rgb34, 34, 34; font-family: 'Helvetica Neue', Helvetica, Arial, 'Liberati&#111;n Sans', FreeSans, sans-serif; line-height: 19px;">Andrew.</p></div>]]>
   </description>
   <pubDate>Wed, 02 Oct 2013 13:08:05 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11234.html#11234</guid>
  </item> 
  <item>
   <title><![CDATA[Metafile to PDF : Andrew - I think you are correct....]]></title>
   <link>http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11229.html#11229</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1532">HNRSoftware</a><br /><strong>Subject:</strong> 2741<br /><strong>Posted:</strong> 01 Oct 13 at 10:03PM<br /><br />Andrew - I think you are correct.&nbsp; The unlock key is probably the source of the actual error.<br><br>&nbsp;I had fun converting his code to something I understood, but then had to figure out what an "imported EMF" was actually good for.&nbsp; By trial and error and the reference help (and some luck), I figured out that "adding" an emf, or any image, doesn't actually do anything useful - you then need to "select" it&nbsp; and "draw" it.&nbsp; This suggests to me that tushar's code needed to either be calling drawimage immediately, or be keeping track of imageids for later use.&nbsp; Very entertaining exercise.<br>]]>
   </description>
   <pubDate>Tue, 01 Oct 2013 22:03:50 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11229.html#11229</guid>
  </item> 
  <item>
   <title><![CDATA[Metafile to PDF : tushar,Are you calling QP.UnlockKey...]]></title>
   <link>http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11218.html#11218</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1483">AndrewC</a><br /><strong>Subject:</strong> 2741<br /><strong>Posted:</strong> 30 Sep 13 at 7:49AM<br /><br />tushar,<div><br></div><div>Are you calling QP.UnlockKey with your trial key ? &nbsp;You would need to do this after the call to Create. &nbsp;This will unlock the library and you should find the EMF file will convert.</div><div><br></div><div>If this is still an issue then you may need to create a support case by sending your questions and the EMF file to support@debenu.com</div><div><br></div><div>Andrew.</div>]]>
   </description>
   <pubDate>Mon, 30 Sep 2013 07:49:03 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11218.html#11218</guid>
  </item> 
  <item>
   <title><![CDATA[Metafile to PDF : I am using QuickPDF trial version...]]></title>
   <link>http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11214.html#11214</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=2473">tushar</a><br /><strong>Subject:</strong> 2741<br /><strong>Posted:</strong> 26 Sep 13 at 12:17PM<br /><br /><DIV>I am using QuickPDF trial version 09.16. I am using this library in Delphi XE2 (update 4). I wanted to create PDF from existing set of metafiles which are created runtime.&nbsp;Here is method&nbsp;which I am using to create new PDF file, but I am getting following error at highlighted red line. </DIV><DIV>&nbsp;</DIV><DIV><FONT color=#9900cc>Project PrintingDemo.exe raised exception class EInvalidGraphic with message 'Metafile is not valid'.</FONT></DIV><DIV>&nbsp;</DIV><DIV>============================================================</DIV><DIV><FONT color=#0000ff>procedure TForm1.prCreatePDFByQuickPDF(pMFList: TList);<BR>var<BR>&nbsp; QP: TDebenuPDFLibrary0916;<BR>&nbsp; li, lj, lx: Integer;<BR>&nbsp; lMF: TMetafile;<BR>&nbsp; lCount: Integer;<BR>&nbsp; st: TMemoryStream;<BR>begin<BR>&nbsp; QP := TDebenuPDFLibrary0916.Create;<BR>&nbsp; try<BR>&nbsp;&nbsp;&nbsp; if pMFList.Count &gt; 0 then<BR>&nbsp;&nbsp;&nbsp; begin<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for li := 0 to pMFList.Count - 1 do<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; begin<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lMF := pMFList.Items<li>;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; st := TMemoryStream.Create;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lMF.SaveToStream(st);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; st.Position := 0;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.insertPages(li + 1, 1);<BR><FONT color=#ff0000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QP.ImportEMFFromStream(st, 1, 1);</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end;<BR>&nbsp;&nbsp;&nbsp; end;<BR>&nbsp;&nbsp;&nbsp; QP.SaveToFile('C:\temp\QuickPDFTest.pdf');<BR>&nbsp; finally<BR>&nbsp;&nbsp;&nbsp; QP.Free;<BR>&nbsp; end;<BR>end;</FONT></DIV>]]>
   </description>
   <pubDate>Thu, 26 Sep 2013 12:17:04 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/metafile-to-pdf_topic2741_post11214.html#11214</guid>
  </item> 
 </channel>
</rss>