[Mono-list] 3rd party dlls - ABCpdf

Antonello Provenzano antonello at deveel.com
Wed Mar 21 05:18:38 EDT 2007


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
>


More information about the Mono-list mailing list