[Mono-list] 3rd party dlls - ABCpdf

louaish88 louaish88 at hotmail.com
Wed Mar 21 11:09:11 EDT 2007


iText certainly looks like a good solution for people building and
manipulating pdfs from scratch and what not, but we are using ABCpdf to do
XHTML/CSS -> PDF conversion. We were using dompdf (a php script) but it was
slow and getting the formatting correct was extremely difficult. ABCpdf does
what the client requires (they are completely fine using it since they
already have a few windows servers for other purposes), and it is FAST.
Dompdf would take 30-90 seconds to render out a complex 7 page report (on a
dual opteron server), ABCpdf only takes 3 seconds, and that is from my
LAPTOP (2 year old Dell Inspiron 9300). I will certainly keep iText in mind
for other projects.

I have done a little digging and it seems that ABCpdf uses COM, which mono
only has partially implemented. It is my suspicion that ABCpdf uses the html
renderer from IE to render the documents, which would make running it on
mono next to impossible. Anyway, it doesn't hurt to just ask a question.

Thanks,
louaish88



Antonello Provenzano-3 wrote:
> 
> louaish88 ,
> 
> This answer doesn't want to solve your problem: why are you using
> ABCpdf from WebSupergoo, when you can use iText#?
> I remember when I used to use it under ASP (many moons ago) and it was
> one of the crappiest PDF managers ever seen.
> 
> Furthermore, ABCpdf is a VB product and you can use it through
> Interop, while iText# is a fully managed solution, ported from Java
> version some time ago, running under .NET and Mono with no issues.
> 
> At your place I'd go for it.
> 
> Cheers.
> Antonello
> 
> On 3/20/07, louaish88 <louaish88 at hotmail.com> wrote:
>>
>> Here is the code that works fine in windows:
>> <=============================================>
>> <%@ WebHandler Language="C#" Class="pdfgen" %>
>>
>> using System;
>> using System.Web;
>> using WebSupergoo;
>> using WebSupergoo.ABCpdf6;
>>
>> public class pdfgen : IHttpHandler {
>>         HttpContext context;
>>
>>         public void ProcessRequest(HttpContext c) {
>>                 context = c;
>>                 try {
>>                         DoRequest();
>>                 } catch (Exception e) {
>>                         context.Response.Write("SERVER\nException: " +
>> e.ToString() + "\n");
>>                 }
>>         }
>>
>>         void DoRequest() {
>>                 Doc theDoc = new Doc();
>>                 theDoc.Rect.Inset(30, 30);
>>                 theDoc.Color.String = "255 255 255";
>>                 Random random = new Random();
>>                 int theID =
>> theDoc.AddImageUrl("http://www.websupergoo.com/support.htm?random="+random.Next());
>>                 while (theDoc.Chainable(theID)) {
>>                         theDoc.FrameRect();
>>                         theDoc.Page = theDoc.AddPage();
>>                         theID = theDoc.AddImageToChain(theID);
>>                 }
>>                 for (int i = 1; i <= theDoc.PageCount; i++) {
>>                         theDoc.PageNumber = i;
>>                         theDoc.Flatten();
>>                 }
>>                 context.Response.ContentType = "application/pdf";
>>                 context.Response.AddHeader("content-disposition",
>> "attachment;
>> filename=MyPDF.PDF");
>>                 theDoc.Save(context.Response.OutputStream);
>>                 theDoc.Clear();
>>         }
>>
>>         public bool IsReusable {
>>                 get {
>>                         return true;
>>                 }
>>         }
>> }
>> <================================================>
>>
>> directory structure:
>> /
>>    pdfgen.ashx
>>    web.config
>>    bin/
>>       ABCpdf.dll
>>       ABDpdfCE6.dll
>>
>> The web.config is minimal, probably not even needed:
>> <configuration>
>>     <system.web>
>>         <customErrors mode="Off" />
>>                 <compilation debug="true" />
>>                 <trace enabled="true"/>
>>     </system.web>
>> </configuration>
>> --
>> View this message in context:
>> http://www.nabble.com/3rd-party-dlls---ABCpdf-tf3435030.html#a9578721
>> Sent from the Mono - General mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Mono-list maillist  -  Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 

-- 
View this message in context: http://www.nabble.com/3rd-party-dlls---ABCpdf-tf3435030.html#a9596112
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list