Page 1 of 1

How to use this COM library in Visual studio 2005

Posted: Sat Mar 08, 2008 2:48 am
by Haissam
Well, after i saw your product i said to myself i have to try it before buying.
I took the SDK and from the tlb file i produced the P2F.dll and add its reference to Visual studio
Now using the below code is giving an error

P2F.Server2 s = new P2F.Server2();
s.ConvertFile(Server.MapPath("~/1.pdf"), Server.MapPath("~/1.pdf.swf"), null, null, null);

ERROR:
{System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {7F8A0980-3F6E-421B-87EA-4D4A077B1DDD} failed due to the following error: 80040154.
at Conversion._Default.Button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\hmalak\My Documents\Visual Studio 2005\Projects\Conversion\Conversion\Default.aspx.cs:line 24}

If you have proper documents on how to use it in Visual studio it would be excellent.
I would not care about the proper if the integration with .NET is hard.

Regards,

Re: How to use this COM library in Visual studio 2005

Posted: Tue Mar 11, 2008 7:53 am
by staff
Have you setup Print2Flash service as specified at this help page: http://print2flash.com/help/SettingupAu ... ccount.php ? You need to do this in order to use P2F.Server2 class. You may also use P2F.Server class which does not require setting up the service but it does not work well in web server (ASP.NET) environment. See also instructions in the ReadMe.htm file located in the ASP.NET sample folder.