Basics
 

ABCpdf 11 is a new version completely independent of the old. It incorporates the ABCpdf2, ABCpdf3, ABCpdf4, ABCpdf5, ABCpdf6, ABCpdf7, ABCpdf8, ABCpdf9 and ABCpdf10 namespaces so that you can upgrade with minimal changes to your code. When you want to take advantage of the new features, simply reference the new name.

Simply replace...

[C#]
using WebSupergoo.ABCpdf10;

[Visual Basic]
Imports WebSupergoo.ABCpdf10

with...

[C#]
using WebSupergoo.ABCpdf11;

[Visual Basic]
Imports WebSupergoo.ABCpdf11

 

   

Changes
 

ABCpdf is fully backward compatible. Although extensive changes have been made to the core engine, we check that these changes produce results that are compatible with previous versions.

There are some minor differences in behavior between the ABCpdf10 and ABCpdf11 namespaces.

In PDF 2.0 the SHA1 digest algorithm has been deprecated in favor of SHA256. For this reason the default digest algorithm used by the Sigature.Sign method is now SHA256. If you are relying on SHA1 digests you should explicitly set the digest type in your code when calling this function. There is a parameter in one of the function overloads that allows you to do this.

The new Chrome HTML conversion engine is our new default as it produces better output than the previous one. If your HTML conversions rely on specific output styles created by the previous default engine - MSHTML - you will want to use the following line of code after creating any Doc object, after calling Doc.Read and after calling Doc.Clear.

doc.HtmlOptions.Engine = EngineType.MSHtml;

To reflect the fact that HTML and JavaScript have become increasingly inseparable, the default value of HtmlOptions.UserScript has been changed to true. If your HTML conversions rely on disabled JavaScript, you will want to use the following line of code after creating any Doc object, after calling Doc.Read and after calling Doc.Clear.

doc.HtmlOptions.UseScript = false;

Similarly, PDF AcroForm processing is becoming more reliant on form and field calculations working via embedded form JavaScript. In this release, we now automatically perform field calculations to ensure that dependent values update in the way people expect. However if you are relying on the old behavior, you will want to use the following line of code after creating any Doc object, after calling Doc.Read and after calling Doc.Clear.

doc.Form.UseFieldScript = false;

In ABCpdf 10, the function used for adding styled text was called AddHtml. This caused a lot of confusion for people who were looking for a true HTML addition function - AddImageHtml. So in ABCpdf 11 the functions AddHtml and FitHtml have become AddTextStyled and FitTextStyled. The old functions are still there but they are now marked as obsolete so you will get a warning if you continue to use them. Just swap the names round in your code when you get a moment.

doc.AddTextStyled(mytext);

In previous versions of ABCpdf, we used to apply the XTextStyle.LineSpacing and XTextStyle.ParaSpacing values before every line added using AddText or AddTextStyled (aka AddHtml). In the case of the first line, this could lead to counter-intuitive behavior, as people expected it to be at the top of the Doc.Rect that they had defined for the text.

In the ABCpdf11 namespace we no longer apply line and paragraph spacing before the first line. However if you have been relying on this behavior you may wish to disable this feature. Simply insert the following line of code after creating any Doc object, after calling Doc.Read and after calling Doc.Clear.

doc.SetInfo(0, "ApplySpacingToFirstLine", true);

In ABCpdf 10, the property used to allow corrupt documents to be read, was called ExtraChecks. However this gave the impression that the read process was being stricter rather than more lenient. As such it has been renamed Repair. The old property is still there but marked as obsolete so you will get a warning if you continue to use it. Just swap the names round when you get a moment.

XReadOptions xr = new XReadOptions();
xr.Repair = true;

In the ABCpdf11 namespace we now default to our new JPEG, PNG and GIF export engines. You will only notice this if you were relying on export to indexed color JPEG - a simulation - not a format which actually exists. However if you have been relying on this you may wish to disable this feature. Simply insert the following lines of code after creating any Doc object, after calling Doc.Read and after calling Doc.Clear.

doc.SetInfo(0, "UseLibGIF", false);
doc.SetInfo(0, "UseLibPNG", false);
doc.SetInfo(0, "UseLibJPEG", false);

In ABCpdf 11 the XRendering.PaletteSize property has been moved to the XRendering.Palette object. The old property is still there but marked as obsolete so you will get a warning if you continue to use it. When you get a moment, simply replace code of the following form...

doc.PaletteSize = 10;

with...

doc.Palette.Size = 10;

In ABCpdf 11 the IndirectObject.Version property has been updated to reflect the introduction of PDF 2.0. In the past a version such as PDF 1.5 would have been reported as a value of 5. Now it will be reported as 15. If you were relying on the old behavior, simply subtract ten.