<?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 : How to get quickpdf to work on azure?</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 : How to get quickpdf to work on azure?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 11 Jul 2026 02:55:57 +0000</pubDate>
  <lastBuildDate>Tue, 12 Oct 2021 14:23:12 +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=3955</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[How to get quickpdf to work on azure? : i guess i gotta be my own brainiac...]]></title>
   <link>http://www.quickpdf.org/forum/how-to-get-quickpdf-to-work-on-azure_topic3955_post15905.html#15905</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=3300">geauxOnAndOn</a><br /><strong>Subject:</strong> 3955<br /><strong>Posted:</strong> 12 Oct 21 at 2:23PM<br /><br /> i guess i gotta be my own brainiac and fortune smiled upon me after I paid the pain price of trial and error.&nbsp;<div><br></div><div>The problem was with loadLibrary. I changed the declaration to this.</div><div><br></div><div><div>&nbsp; &nbsp; &#091;DllImport("kernel32", SetLastError = true, CharSet = CharSet.Ansi)&#093;</div><div>&nbsp; &nbsp; internal static extern IntPtr LoadLibrary(&#091;MarshalAs(UnmanagedType.LPStr)&#093; string lpFileName);</div></div><div><br></div><div>changed the dll constructor to this</div><div><br></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dllHandle = LoadLibrary(dllFileName);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (dllHandle == IntPtr.Zero) {&nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="white-space:pre">	</span>var error = Marshal.GetLastWin32Error(); }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp;</div></div><div>last error returned 126 which means it could not find the dll I passed in.</div><div><br></div><div>this solved the problem</div><div><br></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var full = Path.GetFullPath(dllName64);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var&nbsp; pdfLib = new PDFLibrary(full);</div><div><br></div><div>Seems on my local machine kernel32 had no problem resolving a relative path but the azure server could not. So I sent loadLibrary the full path to the debenu dll and it worked.&nbsp;</div><div><br></div><div>Onward to the next coding disaster, this one is history.</div><div>&nbsp; &nbsp;&nbsp;</div></div><div><br></div><div><br></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Tue, 12 Oct 2021 14:23:12 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/how-to-get-quickpdf-to-work-on-azure_topic3955_post15905.html#15905</guid>
  </item> 
  <item>
   <title><![CDATA[How to get quickpdf to work on azure? : I have successfully gotten both...]]></title>
   <link>http://www.quickpdf.org/forum/how-to-get-quickpdf-to-work-on-azure_topic3955_post15904.html#15904</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=3300">geauxOnAndOn</a><br /><strong>Subject:</strong> 3955<br /><strong>Posted:</strong> 11 Oct 21 at 8:58PM<br /><br /> I have successfully gotten both the dll and the activeX to work on my local machine. However when I push to azure a totally dismal story. The dll will load but will not unlock. The activeX will not create comObject.&nbsp;<div><br></div><div>My environment is Azure Web App, Core 5 and I am developing using the Code editor.&nbsp; It is a development instance but not B1 plan, not shared, 64 bit. The key is a trial key.&nbsp;<br><div><br></div><div>This is the entries I included in the the csproj. I confirmed azure deployment includes them in the root with the other compiled dlls and I&nbsp; have even confirmed they are accessible by loading them into memory.&nbsp;</div></div><div><br></div><div><div>&nbsp; &lt;ItemGroup&gt;</div><div>&nbsp; &nbsp; &lt;None Update="DebenuPDFLibrary64DLL1811.dll"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;CopyToOutputDirectory&gt;Always&lt;/CopyToOutputDirectory&gt;</div><div>&nbsp; &nbsp; &lt;/None&gt;</div><div>&nbsp; &nbsp; &lt;None Update="DebenuPDFLibraryDLL1811.dll"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;CopyToOutputDirectory&gt;Always&lt;/CopyToOutputDirectory&gt;</div><div>&nbsp; &nbsp; &lt;/None&gt;</div><div>&nbsp; &nbsp; &lt;None Update="DebenuPDFLibrary64AX1811.dll"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;CopyToOutputDirectory&gt;Always&lt;/CopyToOutputDirectory&gt;</div><div>&nbsp; &nbsp; &lt;/None&gt;</div><div>&nbsp; &nbsp; &lt;None Update="DebenuPDFLibraryAX1811.dll"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;CopyToOutputDirectory&gt;Always&lt;/CopyToOutputDirectory&gt;</div><div>&nbsp; &nbsp; &lt;/None&gt;</div><div>&nbsp; &lt;/ItemGroup&gt;</div></div><div><br></div><div>This is code I use with the dll that works fine locally. On azure it will create an object but instanceId is 0 and of course it will not unlock.</div><div><br></div><div><div>&nbsp; &nbsp; &nbsp; public static string pdfKey = "br549";</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; public static PDFLibrary newPdfLib()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var pdfLib = new PDFLibrary("./DebenuPDFLibrary64DLL1811.dll");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var result = pdfLib.UnlockKey(pdfKey);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return pdfLib;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; public static void closePdfLib(PDFLibrary pdfLib)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pdfLib.ReleaseLibrary();</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><br></div><div><br></div><div>This is code I am using for ActiveX which doesn't create a new object of the class.</div><div><br></div><div><div>&nbsp; &nbsp;public class PDFLibraryAx</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; private object comObject;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; private Type comType;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; public static string pdfKey = "br549";</div><div>&nbsp; &nbsp; &nbsp; &nbsp; public static bool unlocked = false;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; public static int renderer = 0;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; public static string error = "";</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; public PDFLibraryAx()</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; comType = null;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (IntPtr.Size == 4)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; comType = Type.GetTypeFromProgID("DebenuPDFLibraryAX1811.PDFLibrary");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (IntPtr.Size == 8)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; comType = Type.GetTypeFromProgID("DebenuPDFLibrary64AX1811.PDFLibrary");</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (comType != null)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; comObject = Activator.CreateInstance(comType);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error = "comType is null";</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch (Exception ex)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error = "bombs at com " + ex.Message;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div><span style="white-space:pre">	</span>}<span style="white-space:pre">	</span></div><div><br></div><div><br></div><div>this is the code that creates the activeX object.&nbsp;</div></div><div><br></div><div><div>var pdfLib = new Debenu.PDFLibraryAx();</div><div><span style="white-space:pre">	</span>if (pdfLib is object)</div><div><span style="white-space:pre">	</span>{</div><div><span style="white-space:pre">		</span>Debenu.PDFLibraryAx.unlocked = pdfLib.UnlockKey(Debenu.PDFLibraryAx.pdfKey) == 1;</div><div><span style="white-space:pre">		</span>Debenu.PDFLibraryAx.renderer = pdfLib.SelectRenderer(2);</div><div><span style="white-space:pre">		</span>if (Debenu.PDFLibraryAx.unlocked)</div><div><span style="white-space:pre">		</span>{</div><div><span style="white-space:pre">			</span>var ret = pdfLib.LoadFromVariant(fileBytes, Debenu.PDFLibrary.pdfKey);</div><div><br></div><div><span style="white-space:pre">			</span>pdfLib.AddFreeTextAnnotation(100, 200, 300, 30, "Your mama don't dance", 0, 0);</div><div><span style="white-space:pre">			</span>pdfLib.AddFreeTextAnnotation(100, 160, 300, 30, "and your daddy don't rock and roll", 0, 0);</div><div><span style="white-space:pre">			</span>fileBytes = pdfLib.SaveToVariant();</div><div><span style="white-space:pre">		</span>}</div><div><br></div><div><span style="white-space:pre">		</span>pdfLib.ReleaseLibrary();</div><div><span style="white-space:pre">		</span>pdfLib = null;</div><div><span style="white-space:pre">	</span>}</div><div><span style="white-space:pre">	</span>else</div><div><span style="white-space:pre">	</span>{</div><div><span style="white-space:pre">		</span>// "bombs in data, not an object ";</div><div><span style="white-space:pre">	</span>}</div><div>}</div><div>catch (Exception ex)</div><div>{</div><div><span style="white-space:pre">	</span>// "bombs in data " + ex.Message;</div><div>}</div></div><div><br></div><div><br></div></div><div>Hopefully some brainiac, which I obviously am not, will pipe up and save me from this pain. I am shocked searching this site there was only one thread about azure. I had read that debenu will not work on azure because of GDI+ but I haven't gotten that far. I am hopeful if that is an issue using some of the other renderers available will solve that problem. I have used debenu in the past and really like it. Really want it to work.</div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Mon, 11 Oct 2021 20:58:11 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/how-to-get-quickpdf-to-work-on-azure_topic3955_post15904.html#15904</guid>
  </item> 
 </channel>
</rss>