What's new in PDFNet SDK v4?

What’s new in PDFNet SDK v4?

  • PDFNet SDK in now available for Java. The Java API is exactly the
    same as the API for .NET or C/C++ API. PDFNet for Java is available as
    part of the same package distribution as PDFNet SDK for C++ and is
    available on all supported platforms (i.e.Windows, Linux, Mac,
    Solaris, and mobile platforms).

  • Complete PDF transparency support. The built-in rasterizer in PDFNet
    SDK now features full support for PDF transparency, including
    transparency groups and all blend modes. The following is a sample PDF
    document generated and rendered using PDFNet SDK version 4.0 that is
    extensively relies on some of the new transparency features.

  • Automatic removal of some of the anti-aliasing artifacts such as
    thin-lines and gaps between adjacent image elements. Although it is
    impossible to completely remove all anti-aliasing artifacts in PDF
    graphics, PDFNet SDK will reduce the appearance of commonly occurring
    artifacts. Also, the users can manually control the rendering quality
    using PDFDraw.SetGamma() and PDFView.SetGamma().

  • Fast and high-quality text extraction. Using PDFNet SDK users can
    extract text from PDF pages in Unicode or XML. For more information,
    please refer to the TextTextract sample project as well as to the
    documentation for pdftron.PDF.TextExtractor.

  • High-level logical structure API which can be used to extract the
    logical structure from ‘tagged’ PDF documents. The API resides in a
    new namespace - pdftron.PDF.Struct. To test drive this functionality,
    please take a look at the LogicalStructure sample project.

  • Built-in tools for text selection/highlighting as well as for text
    search in the PDFView class . Also, all PDFView sample projects (for
    C#, Java, VB.NET) are extended with code showing how to use new text
    selection modes, text search, image export, etc.

  • The SDF/Cos API is refactored to simplify coding and thus reduce
    errors during development. The updated API is the same in all
    programming languages, which also simplifies porting code from one
    language to another. Finally, the new SDF/Cos architecture allows
    PDFNet SDK to deliver further performance improvements in upcoming
    PDFNet v.4.x releases. For more information on how to upgrade to the
    new API, please see the migration guide for PDFNet v.4. (http://
    www.pdftron.com/net/pdfnet4_upgrade.txt)

  • PDFNet SDK for C/C++ is now available as compiler-independent shared
    library on all supported platforms (i.e. Windows, Linux, Mac, Solaris,
    and mobile platforms). For native code developers this removes the
    possiblity of collisions arising between incompatible C++ compilers
    and libraries.

  • Automatic error recovery for PDF documents with minor corruptions
    (such as broken cross reference tables, etc).

  • The object size of the core DLL(s) is decreased, despite
    introduction of many new features.

  • New utility methods in the ElementBuilder class are introduced to
    simplify drawing of ellipses, circles, and arcs.

  • PDF Split and Merge operations (i.e. PDFDoc.ImportPages()) can now
    optionally copy associated bookmarks and preserve document internal
    and external links.

  • Automatic stroke adjustment for thin lines. Improved rendering speed
    for certain graphical elements.

  • Users that require tight control of the location where temporary
    files are created can now use PDFNet.SetTempPath() to specify the
    location of the temporary folder.

  • New sample project PDFViewSimple (for C# and VB.Net only): a
    stripped-down version of the full PDFView sample, which can be useful
    to developers learning how to integrate a basic PDF viewer within
    their applications.

  • The PDFView sample is extended with the option to open TIFF, GIF,
    PNG, BMP and other image formats besides PDF. There is also an option
    to export PDF pages as raster images, code to execute document links,
    etc.

  • There a number of new methods controlling the way pages are viewed
    using PDFNet SDK. For example, a user can selectively enable or
    disable progressive rendering in the PDF viewer using
    PDFView.SetProgressiveRendering(). There are also new methods
    controlling horizontal and vertical alignment of pages within the
    control, and functions to set the default background and paper color.

  • A new option in the PDF rasterizer to export dithered monochrome
    TIFF or PNG output. To export 1 BPC, dithered TIFF (CCITT Fax G4)
    output, specify extra ‘BPC’ or ‘Gray’ hint parameter. For some
    concrete sample code, please refer to the PDFDraw sample project.

New Types and Methods:

class pdftron.SDF.ObjSet
class pdftron.Struct.STree
class pdftron.Struct.SElement
class pdftron.Struct.RoleMap
class pdftron.Struct.ContentItem
class pdftron.Struct.ClassMap
class pdftron.Struct.AttrObj
class pdftron.PDF.TextExtract
class pdftron.PDF.TextExtract.Word
class pdftron.PDF.TextExtract.Line
class pdftron.PDF.TextExtract.Style
class pdftron.PDF.PDFView.Selection
PDFNet.Initialize(key)
PDFNet.SetTempPath()
PDF.PDFDoc.FieldCreate(String name, Type, String value)
PDF.FDFDoc.FieldCreate(String name, Type, String value)
PDF.FDFDoc.GetFieldIterator()
PDF.FDFDoc.GetField()
PDF.PDFDoc.GetPageIterator()
PDF.PDFDoc.GetPage(num)
PDF.PDFDoc.GetFieldIterator()
PDF.PDFDoc.GetField(name)
PDF.PDFDoc.RemoveSecurity()
PDF.Element.GetParentStructElement()
PDF.Element.GetStructMCID()
PDF.ElementBuilder.CreateEllipse()
PDF.ElementBuilder.ArcTo()
PDF.Page.Scale()
PDF.Destination.IsValid()
PDF.Rect.Contains(x, y)
PDF.Field.SetValue(String)
PDF.Field.GetValueAsString()
PDF.Field.GetDefaultValueAsString()
PDF.PDFDraw.SetCaching()
PDF.PDFView.GetSelection()
PDF.PDFView.SelectByRect()
PDF.PDFView.SelectByStruct()
PDF.PDFView.SelectAll()
PDF.PDFView.FindText()
PDF.PDFView.IsFinished()
PDF.PDFView.HasSelection()
PDF.PDFView.ClearSelection()
PDF.PDFView.SetProgressiveRendering()
PDF.PDFView.SetPageBorderVisibility();
PDF.PDFView.SetDefaultPageColor();
PDF.PDFView.SetBackgroundColor();
PDF.PDFView.OnBackColorChanged ()
PDF.PDFView.OnForeColorChanged ()
PDF.PDFView.SetHorizontalAlign();
PDF.PDFView.SetVerticalAlign();
PDF.DictIterator.HasNext()
PDF.PageIterator.HasNext()
PDF.FieldIterator.HasNext()
PDF.FDFFieldIterator.HasNext()
PDF.GSChangesIterator.HasNext()
PDF.CharIterator.HasNext()
PDF.FontCharCodeIterator.Next()
PDF.FontCharCodeIterator.HasNext()
PDF.FontCharCodeIterator.Current()
PDF.Font.GetCharCodeIterator()
SDF.SDFDoc.RemoveSecurity()
SDF.NameTreeIterator.GetIterator()
SDF.NameTreeIterator.GetValue()
SDF.NumberTreeIterator.GetIterator()
SDF.NumberTreeIterator.GetValue()
Dictionary Specific Methods --------
SDF.Obj.FindObj()
SDF.Obj.PutName (key, name)
SDF.Obj.PutArray (key)
SDF.Obj.PutBool (key, value)
SDF.Obj.PutDict (key)
SDF.Obj.PutNumber (key, value)
SDF.Obj.PutString (key, value)
SDF.Obj.PutString (key, buf)
SDF.Obj.PutText(key, value)
SDF.Obj.PutNull (key)
SDF.Obj.Put(key, obj)
SDF.Obj.PutRect (key, x1, y1, x2, y2)
SDF.Obj.PutMatrix(key, mtx)
SDF.Obj.Erase(key)
SDF.Obj.Rename(old_key, new_key)
Array Specific Methods ---------
SDF.Obj.GetAt(index)
SDF.Obj.InsertName (pos, name)
SDF.Obj.InsertArray (pos)
SDF.Obj.InsertBool (pos, value)
SDF.Obj.InsertDict (pos)
SDF.Obj.InsertNumber (pos, value)
SDF.Obj.InsertString (pos, value)
SDF.Obj.InsertString (pos, buf)
SDF.Obj.InsertText(pos, value)
SDF.Obj.InsertNull(pos)
SDF.Obj.InsertRect (pos, x1, y1, x2, y2)
SDF.Obj.InsertMatrix(pos, mtx)
SDF.Obj.Insert(pos, obj)
SDF.Obj.PushBackName (name)
SDF.Obj.PushBackArray ()
SDF.Obj.PushBackBool (value)
SDF.Obj.PushBackDict ()
SDF.Obj.PushBackNumber (value)
SDF.Obj.PushBackString (value)
SDF.Obj.PushBackString (buf)
SDF.Obj.PushBackText (value)
SDF.Obj.PushBackNull ()
SDF.Obj.PushBack(obj)
SDF.Obj.PushBackRect (x1, y1, x2, y2);
SDF.Obj.PushBackMatrix(mtx)
UString.ToLower()
UString.ToUpper()

Other Changes:

(.NET Specific) PDFNet11.DLL is renamed to PDFNet.DLL
(.NET Specific) Element.GetTextString() returns String instead of
Char[].

class SDF::Doc() → class SDF::SDFDoc()
SDF/Doc.h → SDF/SDFDoc.h
PDFDoc.GetPagesCount() → PDFDoc.GetPageCount()
Obj.IsStr() → Obj.IsString()
Obj.SetStr() → Obj.SetString()
GState.GetOpacityFill → GetFillOpacity
GState.GetOpacityStroke → GetStrokeOpacity
Obj.DictBegin() → Obj.GetDictIterator()
FDFDoc.FieldBegin() → FDFDoc.GetFieldIterator()

Deprecated:

PDF.PDFDoc.FindPage(), use PDFDoc.GetPage() instead.
PDF.PDFDoc.FindField(), use PDFDoc.GetField() instead.
PDF.Rect.CreateSDFRect(), use obj.PutRect()/obj.InsertRect() instead.
PDF.Date.CreateSDFDate
class SDF.ObjVisitor, SDF.AtomVisitor, SDF.ContainerVisitor
SDF.NameTree.Find(), use NameTree.GetValue() instead.
SDF.NumberTree.Find(), use NumberTree.GetValue() instead.
SDFDoc.FixBrokenDoc() - PDFNet now automatically attempts to repair
broken PDF documents so this method is removed from the public
interface.
SDF.DictIterator.Prev()
SDF.DictIterator.Advance()
SDF.Obj.DictEnd(), use DictIterator.HasNext() instead.
SDF.Obj.Accept()
SDF.Obj.CreateName()
SDF.Obj.CreateArray()
SDF.Obj.CreateBool()
SDF.Obj.CreateDict()
SDF.Obj.CreateNull()
SDF.Obj.CreateNumber()
SDF.Obj.CreateString()
SDF.Obj.Clone()
SDF.Obj.Rename(DictIterator, String)
SDF.Obj.Replace(DictIterator, Obj)
SDF.PDFDoc.FixBrokenDoc()
SDF.SDFDoc::AddObj()
FDF.FDFDoc.FieldEnd(), use FDFFieldIterator.HasNext() instead.
FDF.PDFDoc.FieldEnd(), use FieldIterator.HasNext() instead.
FDF.FDFDoc.PageEnd(), use PageIterator.HasNext() instead.