How to add and verify digital signature to PDF in dot net framework 2.0 - pdf

I get the task to add a digital signature on any PDF file. After hours of googling, I found that there are few libraries that help me to achieve this task easily. (We have our application on dot ent 2.0)
Below I am listing all the libraries I have found
iTextSharp -- This is too costly to purchase.
PDFSharp -- finds only articles but no code to achieve it.
SelectPDF -- this adds its own watermark in the pdf.
AsposePDF -- this adds its own watermark in the pdf.
SpirePDF -- it is working on dot net 4.0 or above
My question is -
Is there a free library are there to help me with dot net 2.0?
If not free then it should not cost more than $100 a year.
Is there any way to achieve this without the help of libraries?

Related

iTextSharp - where are PdfDocument, PdfCanvas, ...?

I'm generating PDF documents using iText(Sharp).
I'm developing the app using Visual Studio 2017.
I've added iTestSharp using NuGet and I've experimented with both VB and C#
All is fine for the 'high-level' stuff (chapter 1 from the jumpstart tutorial). Now I want to go more low-level using 'page', 'canvas' and 'low-level' drawing commands : chapter 2 from the jumpstart tutorial
http://developers.itextpdf.com/content/itext-7-jump-start-tutorial/chapter-2-adding-low-level-content
My problem is that I can't access the classes PdfDocument, PdfCanvas, etc. these classes are not available..
Also I can't create a New PdfWriter object (New operator is not implemented)
What's wrong ?
am I missing some Imports / using libraries ? (I currently include
iTextSharp.text and iTextSharp.text.pdf)
has this someting to do with iText V5 - > V7 and is the tutorial maybe a bit out of date ?
are these classes only available in the Java libraries, and not in the .NET port ?
Does anyone have an example of drawing stuff on a canvas using VB.NET - this would be very helpful!
Thanks.
To clarify further:
iText 5 .NET is nicknamed iTextSharp because of historical reasons that are beyond the scope of a Stack Overflow question.
iText 7 .NET doesn't have a nickname because we (iText Software) want to emphasize that it is exactly the same product as iText 7 Java, just for a different platform.
The tutorial you found is not out of date, on the contrary, it's the most recent one. It's the iTextSharp you got from NuGet that is out of date.
If you read the description on NuGet.org then you will clearly see that iTextSharp is the old version: https://www.nuget.org/packages/iTextSharp
We have two currently supported versions: iText 5 and iText 7. Both
are available under AGPL and Commercial license.
iText 5 AGPL
iText 7 community: https://www.nuget.org/packages/itext7/
iText 5 is a one solution library that is complex, but well documented
to help you create your solutions.
iText 7 is a complete re-write of iText 5, allowing you to choose your
adventure with add-ons, all based on a simple, modular code structure
that is easy to use and well documented.
and
iTextSharp is the .NET port of iText 5.
If this wasn't clear enough for you (and it obviously wasn't), then I would really, really appreciate your feedback on how we can improve the description on NuGet.org.
Make sure you have the right NuGet packages on your system.
To try this out, create an empty project and include NuGet packages
iText7 by iText Software v 7.0.4
The jumpstart tutorial was written for iText7, so it make sense you'd need that specific version. iText7 is a complete re-write of iText5. So you might indeed find several classes missing if you try to run the samples against the iText5 library.

Add acroform with pdfsharp

how can i add Acroforms (or any inputfields) with pdfsharp lib to a pdf?
For example a textbox (PdfSharp::Pdf::AcroForms::PdfTextField)
I can't find any example for this, only read/modify.
I found "page->Elements->Add(key,pdfitem)", but i cant create a Object from PdfSharp::Pdf::AcroForms::PdfTextField or the others Forms (no Constructor)
Don't know if it is still relevant (maybe it will be relevant for other users), but it is not possible to do that with PDF Sharp, unfortunately, as if it would have had that functionality as well, it would have been a really nice rounded library. The AcroFrom functionality of the library only allows targeting already existing one.
Depending on what is your project for you can use iText sharp, but it has an AGPL license which is not ideal, there are other libraries but they are quite expensive. If it is a small pdf file (under 10 pages) you can use the free tier from the SpirePDF library.
In addition, there is PDFClown library which is open source (as long as you mention that you use it somewhere), but similarly to PDFSharp, it is quite old, and even less documented than PDFSharp.
Sadly, there aren't many solutions to this issue.

Add watermark to various documents investigation

I've been asked to investigate the feasibility of adding watermarks to documents when printed through our application. The documents will consist of word, pdf and cad.
The interface of the application is vb6 with a plethora of vc6 dll's.
I can see a couple of possible solutions:
Convert all documents to PDF, add a watermark and then print.
Find a print driver that will add a watermark to all documents prior to printing and install it and reenable it at runtime if it gets disabled for any reason.
3rd Party suites are possibility (we use Volo View Express for viewing CAD files) but since this application is nearing end-of-life we wouldn't want to spend too much on it.
Has anyone had any experience of the above? Any gotcha's that will bog me down?
Tracker Software has a good set of PDF api's that that will allow you to implement the solution you already have in mind. I've used their Image and PDF libraries quite a bit with a lot of success in both VB6 and .NET. Single user licenses are not expensive (depending on how you look at it I guess), and I've found support to be excellent as well.

Anyway to automatically convert DWF to PDF?

Our eTendering solution, www.monaqasat.com, currently works exclusively with PDF documents for various reasons, some of them being security. We are being asked if we can support DWF documents. For this to happen, we would need to find a way to automatically convert DWF documents to PDF, using some kind of Unix application.
Does anybody know any such application, preferably using Rails or Java?
Thanks,
.Karim
http://www.autodwg.com/pdf/
http://www.dwgto.com/
http://www.aidecad.com/
http://en.wikipedia.org/wiki/List_of_PDF_software
http://www.cogniview.com/convert-pdf-to-excel/category/pdf/
Suggestion would be to install a software printer call its APIs and pass dwf and get back pdf and then apply security as needed.
Autodesk has its DWF Toolkit available at
http://www.autodesk.com/dwftoolkit
It contains full source code in C++ to read & write DWF files, so it should be reasonably easy to make it run under Linux and to use a PDF library to write the output.

Tools to manipulate doc file and convert them to pdf

I am looking for some good tools (free or paid, though free tool is always preferred)
for doing following operations on word doc files:
Manipulation of doc/docx/text files (like replacing some placeholders with DB values) as well as
converts doc files to .pdf
Because, I will be using this tool in my WCF service library,
So I am looking for a code library and not for a GUI based product.
Please share your experience regarding same.
Thank you!
Aspose has a decent collection of MS Office and PDF manipulation libraries.
Aspose Homepage
On the off chance that you're only looking for PDFs for viewing or archival purposes, you could also setup a PDF print driver and print your office files into a given location using Automation. You could also edit Office files through Automation although this may be tedious.
VSTO would give you access to the save as PDF from the Office applications.
Please see my answer to a related question on SO where I recommend a number of ways to convert your Word document to a format that is more easy to manipulate programmatically (using XSL-FO).