📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

ABCpdf

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ABCpdf

PDF creation and manipulation using ABCpdf - a powerful and flexible PDF component for .NET. ABCpdf is a .NET component for PDF manipulation. As such, you'll find it documented for C# and VB.NET, with numerous PDF code examples and freely adaptable projects, all designed to help you get up to speed. Re-use existing skills for PDF document layout. ABCpdf supports a wide range of layout methods, including HTML-to-PDF using HTML and CSS, System.Drawing, PostScript, and a powerful set of native drawing commands. Import SVG, DOCX, XPS, EPS, the usual bitmap image formats such as JPEG, TIFF, PSD and many more. And because support for these formats is built-in, ABCpdf makes light work of PDF related document conversion tasks. C# HTML to PDF conversion using HTML and CSS pages from local or remote web sites. Placed HTML support means your HTML can be treated just like any other media - placed wherever you like on your PDF page. Choose between the Chrome style, FireFox style and Internet Explorer style HTML rendering engines. Support for modern web pages using HTML5, CSS3, FontAwesome and similar modern web technologies. A vast range of options gives you full control over the HTML rendering process and DOM. ABCpdf is a robust component, with probably hundreds of thousands of live installations, and almost two decades worth of support and development. But should you ever need help our PDF expert support team are on hand. ABCpdf is fast. ABCpdf does not use a printer driver. Instead it goes Direct to PDF™, generating PDF documents on the fly. And fully multi-threaded, ABCpdf is suitable for use with ASP.NET. ABCpdf supports Unicode and foreign languages, CJK fonts, and right-to-left text such as Arabic and Hebrew, kerning, tracking and contextual ligatures. ABCpdf supports sophisticated color spaces. Mix and match RGB, CMYK, Grayscale, Lab, calibrated color spaces and spot colors. Any kind of graphic from text to lines to blocks of color can be drawn in in any of these color spaces. You can even perform complex operations like colorizing grayscale images using spot colors or converting from one color space to another. PDF optimization and size reduction provides whole document optimization using a variety of options to reduce font sizes, remove embedded fonts, to resample and recompress images, to flatten wherever possible for the smallest possible output. PDF analysis has been extended into easy-to-use operations for text and images. Simple on the surface but sophisticated underneath, they allow you to extract common-sense, de-hyphenated and de-ligatured text from PDFs. Then select items of that text within the PDF and perform operations on those selections. PDF accessibility is now something that can be supported, even for PDFs which were never designed to do so. Standards such as PDF/UA and Section 508 compliance require that PDFs be accessible. Our accessibility operation performs a sophisticated semantic analysis of the document content and adds appropriate tagging information to produce an accessible Tagged PDF output. Download and try out ABCpdf for free. All our components include a 30-day trial. During the trial period, ABCpdf operates as the unrestricted Professional edition.

13.3.3
NuGet
Version published
Maintainers
1
Created
Source

Test Code

Quite often when creating a new project you want some simple test code to ensure your installation is correct.

First you need to ensure you are using the correct namespace. Insert the following at the top of your C# module.

using WebSupergoo.ABCpdf13;

If you are in a forms or console application, the following Hello World code may be useful.

using (Doc doc = new Doc()) {
	doc.FontSize = 96;
	doc.AddText("Hello World!");
	doc.Save(@"C:\_output.pdf"); // adjust path for your needs
}

Alternatively if you are running under ASP.NET, you may want a Page_Load function something like this.

byte[] theData = null;
using (Doc doc = new Doc()) {
	doc.FontSize = 96;
	doc.AddText("Hello World!");
	theData = doc.GetData();
}
Response.Clear();
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "inline; filename=MyPDF.PDF");
Response.AddHeader("content-length", theData.Length.ToString());
Response.BinaryWrite(theData);
Response.End();

For more example projects, please download the installer bundle from the ABCpdf download site.

Documentation

Documentation for ABCpdf can be found here:

https://www.websupergoo.com/helppdfnet/

Alternatively you can download the installer bundle from the ABCpdf download site as this contains full documentation in CHM format.

Installation

ABCpdf is an Xcopy deployment. All that is needed is that the DLLs and associated files be copied to your bin directory.

This should happen automatically because it is what is specified in the NuGet installer. However not all platforms and not all project types do this reliably.

For example if you select the Visual Studio "Create Web Site" option and then select an "ASP.NET Web Forms Site" you will get a web site without a project file. NuGet requires a project file for certain types of installations so it will leave some DLLs out. However if you instead select "Create Project" and select an "ASP.NET Web Application" then this will work fine.

Here we explain the installation process in case you need to do anything yourself.

At minimum you only need either ABCpdf.dll or ABCpdf.NET5.dll (for .NET 4 and .NET 5 respectively) and either ABCpdf13-32.dll or ABCpdf13-64.dll (for x86 and x64 respectively). If you are not sure then just copy all of them to your bin directory.

The extra DLLs and files which come with ABCpdf provide extra functionality like HTML import, 3D rendering and AcroForm JavaScript. They are not required for all deployments but we copy them to the bin directory as standard in case you need them.

For more details please see the Manual Installation section of the documentation.

License

When you run the installer a trial license is created for you. If you do not have a valid license - either full or trial - then an exception will be raised when you use methods like Doc.Save.

Most notably, if you Xcopy deploy to another machine, the license is not copied. So if you push your bin directory up to a machine in the cloud, you need to ensure that it gets a copy of your license.

To do this you can use code of the following form to be called before any ABCpdf objects are created.

if (!XSettings.InstallLicense(" **** insert your license key here *** ")) {
	Response.Write("Could not install trial license. ");
	Response.Write("You have: " + XSettings.LicenseDescription);
	return;
}

The license key you need to insert will typically be a trial key which looks something like this.

"XeJREBodo/8B4SFWbfuBP42jLr5NPdtypry10sywB1pg4nufPib5NccZcUJK72QFBw=="

You can get your trial key from PDFSettings.exe - part of the ABCpdf installation. Alternatively you can run the following ASP.NET code to report your trial license.

Response.Write("Code for installation of trial license:</br>");
string key = System.Web.HttpUtility.HtmlEncode(XSettings.Key);
Response.Write("if (!XSettings.InstallLicense(\"" + key + "\")) {..</br>");

*** Azure ***

It is important to understand that Azure is not one thing - it is a set of varied types of virtual machines and devices. Some are simpler, cheaper and more restrictive. Some are more sophisticated.

Azure is also a rapidly moving target. What is current and default now, may not be in the future. With a growth of almost 100% every year, you have to expect a certain amount of change and perhaps even some rough edges.

ABCpdf will run on the default Azure instances. However the simpler default Azure instances do not have the features required for functionality like HTML import. For those you need a slightly different model. See our Azure deployment guide for details.

http://www.websupergoo.com/support-azure-abcpdf.htm

Sometimes ASP.NET Azure deployments are 32 bit. The platform itself is x64 but it may run code, by default, in a 32 bit space. You may wish to change this in your Azure settings.

Keywords

PDF

FAQs

Package last updated on 20 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts