Solved

Creating  PDF  in VB.NET because ABCPDF no longer supported by DiscountASP.net

Posted on 2015-02-07
7
518 Views
Last Modified: 2015-02-09
I made a program about 6 years ago that collects data from the end user for a lease, and then prints it onto the lease form.

How it does it is it uses a component (Websupergoo ABCPDF) that was free on DiscountASP.NET, imports a background image (the form), and allowed me to add text boxes onto a layer above the image, and write text to the boxes by playing with the X and Y coordinates.

An example of the code is below:

            Dim theImg As XImage = New XImage() 
            theImg.SetFile(Server.MapPath("Myform1-1fhd1.gif"))
            
            Dim theDoc5 As Doc = New Doc() 
            theDoc5.Topdown = True       
            theDoc5.Layer = 2
            theDoc5.Rect.String = "25 25 587 767"
            'theDoc5.Rect.String = "8 8 562 742"
            theDoc5.AddImageObject(theImg, false)
            
            theDoc5.Layer = 1
            theDoc5.FontSize = 11
            
            ' Show the 1st lessee
            theDoc5.Rect.String = "540 89 600 550"
            theDoc5.AddText(leasenoLabel)
            theDoc5.Rect.String = "66 162 550 550"
            theDoc5.AddText(l1nameLabel)
            theDoc5.Rect.String = "58 182 550 550"
            theDoc5.AddText(l1numberLabel)
            theDoc5.Rect.String = "115 182 550 550"
            theDoc5.AddText(l1streetLabel)
            theDoc5.Rect.String = "260 182 550 550"
            theDoc5.AddText(l1aptLabel)
            theDoc5.Rect.String = "90 203 550 550"
            theDoc5.AddText(l1cityLabel

           theDoc5.Save(Server.MapPath("Firstpagea.pdf"))
            theImg.Clear()

Dim theDocE As Doc = New Doc() 
            theDocE.Append(theDoc5)
            theDocE.Append(theDoc6)
            theDocE.Append(theDoc7)
            theDocE.Append(theDoc8)
            
            theDocE.Save(Server.MapPath("Englishpages.pdf"))

            theDoc5.Clear()
            theDoc6.Clear()
            theDoc7.Clear()
            theDoc8.Clear()
            theImg.Clear()            

Open in new window


Now DiscountASP.NET has deprecated the ABCPDF component and I unfortunately don't have $500 - $2000 for the license.

I am prepared to do some recoding, but would like to avoid a week solid of work.

Can anyone suggest a solution  or alternative that can help me minimize the rework I have to do, either that is free or comes at a reasonable price ?

Thanks, Peter
0
Comment
Question by:pbissegger
7 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 40596762
How about PDFSharp: http://www.pdfsharp.net/MainPage.ashx

I specced this for a VB.NET utility that needed to create and merge PDF files, and in my (somewhat limited) testing it seemed to work well. I was easily able to create PDF files, and was able to merge those PDF files with existing files, or create entirely new files. It's open source and licensed for use in commercial software. You can purchase support, if needed.

There are some restrictions when running on a web server, but those involve fonts and such:

http://www.pdfsharp.net/wiki/PDFsharpFAQ.ashx#Can_PDFsharp_run_on_Web_Servers_under_Medium_Trust_5
0
 
LVL 33

Expert Comment

by:ste5an
ID: 40596810
Take a look at iTextSharp.
0
 
LVL 84
ID: 40596908
Be careful with iTextSharp. It's been released under AGPL, which basically means that any code which includes those components would have to have the same licensing  - which essentially means your product would have to be open source. If you're okay with that, then iTextSharp would be a good choice. If not, then you'd be wise to look elsewhere.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 33

Expert Comment

by:ste5an
ID: 40597363
@Scott: but only for software products.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 40597470
You can get a license for ABCPDF for free: http://www.websupergoo.com/free-license.htm

This way, you would not have to change your application. BTW, a license of ABCPDF.NET Standard is $329
0
 

Author Closing Comment

by:pbissegger
ID: 40597626
Thanks for the multiple answers guys.

Unfortunately, my site does not meet the criteria for obtaining a free license for ABCPDF  (it is on a subdomain on an intranet), so I had to go with something new.

I went to the PDFSharp site and got my functionality working in about 30 minutes. It has many of the same commands, and it works well with my hosting provider.

Thanks, Peter
0
 
LVL 84
ID: 40598297
@Scott: but only for software products.
I made a program about 6 years ago that collects data from the end user for a lease
I would assume the author is referring to a software product, regardless of the hosting environment. Of course, you'd have to contact the authors of the software to be sure of the licensing status, but when I contacted iTextSharp about my use in my product, they basically informed me that any use in a "commercial environment" (which means any software product that is not used by you, and ONLY you, for non-business reasons) required a license.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now