2017 Releases

Docotic.Pdf Library Help > 2017 Releases

Version 5.4

November 21st, 2017

  • Fixed copying of text with invalid or incomplete encoding information. Take a look at the new PdfTextData.GetCharacterCodes() and PdfCanvas.DrawString(Byte[]) methods and updated Copy text, paths and images sample. You no longer need to use fallback fonts to copy existing text.
  • Added new PdfFont.ContainsGlyphsForText(String) method that checks whether the font contains all glyphs required to draw the specified text.
  • Added new PdfDocument.ReplaceDuplicateFonts method that replaces all duplicate fonts with the first duplicate. This method is useful when you are trying to reduce output file size. The method gives good results for documents which were incrementally updated or created by a merge of several documents with the same fonts.
  • Added new enumeration values PdfaConformance.Pdfa2A, PdfaConformance.Pdfa3A and PdfaConformance.Pdfa4A so that library can properly report PDF/A conformance for newer documents.
  • Added new enumeration value PdfEncryptionAlgorithm.None.
  • Added new enumeration value PdfPageLayout.Default. This value can be used when you want Single Page layout but do not want to have layout information in the PDF.
  • Added new PdfDocument.RemoveWidget(PdfWidget) method that can be used to remove widgets from document.
  • PdfDocument.Patterns, PdfDocument.PatternCount properties, and PdfDocument.GetPattern(System.Int32) method are marked obsolete (and will be removed in the next release of Docotic.Pdf). Please use PdfDocument.GetPatterns() method instead.
  • PdfDocument.ColorProfiles, PdfDocument.ColorProfileCount properties, and PdfDocument.GetColorProfile(System.Int32) method are marked obsolete (and will be removed in the next release of Docotic.Pdf). Please use PdfDocument.GetColorProfiles() method instead.
  • PdfDocument.Controls, PdfDocument.ControlCount properties, and PdfDocument.GetControl(System.Int32) method are marked obsolete (and will be removed in the next release of Docotic.Pdf). Please use PdfDocument.GetControls() method instead.
  • PdfDocument.Widgets, PdfDocument.WidgetCount properties, and PdfDocument.GetWidget(System.Int32) method are marked obsolete (and will be removed in the next release of Docotic.Pdf). Please use PdfDocument.GetWidgets() method instead.
  • PdfDocument.Images, PdfDocument.ImageCount properties, and PdfDocument.GetImage(System.Int32) method are marked obsolete (and will be removed in the next release of Docotic.Pdf). Please use PdfDocument.GetImages() method instead.
  • PdfPage.Images, PdfPage.ImageCount properties, and PdfPage.GetImage(System.Int32) method are marked obsolete (and will be removed in the next release of Docotic.Pdf). Please use PdfPage.GetImages() method instead.
  • PdfDocument.Actions, PdfDocument.ActionCount properties, and PdfDocument.GetAction(System.Int32) method are marked obsolete (and will be removed in the next release of Docotic.Pdf). Please use PdfDocument.GetActions() method instead.
  • PdfDocument.Fonts, PdfDocument.FontCount properties, and PdfDocument.GetFont(System.Int32) method are marked obsolete (and will be removed in the next release of Docotic.Pdf). Please use PdfDocument.GetFonts() method instead.
  • PdfDocument.Views, PdfDocument.ViewCount properties, and PdfDocument.GetView(System.Int32) method are marked obsolete (and will be removed in the next release of Docotic.Pdf). Please use PdfDocument.GetViews() method instead.
  • Improved import of JPEG images in sRGB and Adobe RGB colorspaces.
  • Improved formatting of font names for new TrueType fonts.
  • Improved precision of drawing when document is rendered within small bounding rectangle.
  • Improved precision of drawing for documents with small rectangles.
  • Improved parsing of PDFs with broken or incorrect structure.
  • Fixed bugs related to processing of rotated controls.
  • Fixed loading of font from read-only file.
  • Fixed reading and writing of XMP metadata names which contain spaces.
  • Fixed bugs related to parsing of TrueType fonts.

Version 5.3

August 10th, 2017

  • Breaking change: Fixed behavior and changed signature of MediaBox, CropBox, BleedBox, TrimBox and ArtBox properties. From now on, the above properties return PdfBox structure, which is expressed in PDF's default user space coordinate system. In default user space the positive Y axis extends vertically upward. Previously these properties returned PdfRectangle structure, which is expressed in PdfPage coordinate system. In PdfPage coordinate system origin is located at the upper-left corner of the page, positive Y axis extends vertically downward. Use PdfBox.ToRectangle(Double) method to map PdfBox structure to PdfRectangle structure. Use PdfBox.FromRectangle(PdfRectangle, Double) method to map PdfRectangle structure to PdfBox structure.
  • Breaking change: Fixed behavior of some of the PdfDocumentView methods in cases when the instance of PdfDocumentView is used to setup the target view of a PdfRemoteGoToAction object. From now on, the following methods produce destination (document view) that opens the target page with its top edge positioned at the top edge of the viewer's window: PdfDocumentView.SetZoom(Double), PdfDocumentView.SetFitWidth(), PdfDocumentView.SetFitBBoxWidth(). Previously, the above methods produced remote destinations that incorrectly opened the next page after the target page.
  • Breaking change: Changed some of the PdfDocumentView methods in order to provide consistent behavior for both PdfGoToAction and PdfRemoteGoToAction. From now on, the following methods expect vertical coordinates relative to the bottom edge of the target page: PdfDocumentView.SetZoom(PdfPoint, Double), PdfDocumentView.SetFitWidth(Double), PdfDocumentView.SetFitRect(BitMiracle.Docotic.Pdf.PdfRectangle), PdfDocumentView.SetFitRect(System.Drawing.RectangleF), PdfDocumentView.SetFitBBoxWidth(Double). Previously, the above methods expected vertical coordinates relative to the top edge of the target page:
  • Breaking change: PdfDocumentView.Top property is now nullable and relative to the bottom edge of the page. Previously, it was relative to the top edge of the page except of the case when it was used to setup the target view of a PdfRemoteGoToAction object.
  • PdfDocumentView.SetFitRect(PdfRectangle) and PdfDocumentView.SetFitRect(RectangleF) methods are marked obsolete (and will be removed in the next release of Docotic.Pdf). Please use PdfDocumentView.SetFitRect(PdfBox) method instead.
  • Added new PdfTextBox.Scrollable property.
  • Added ability to set mapping name for control. Take a look at the new PdfControl.MappingName property.
  • Fixed bugs related to creation of XObjects from pages.
  • Fixed bugs related to parsing of named destinations.
  • Fixed bugs related to processing of controls that use CJK fonts.
  • Fixed bugs related to drawing of documents with CJK fonts.
  • Fixed drawing of PDF documents with hidden controls.
  • Improved speed of drawing for PDF documents with blend modes and soft masks.
  • Greatly improved speed of text extraction.
  • Improved speed of PDF opening.
  • Improved parsing of PDFs with broken or incorrect structure.
  • Improved loading of non-embedded fonts.
  • Improved processing of fonts with incorrect /LastChar property.
  • Fixed bugs related to importing of PNG images.
  • Fixed PdfDocument.SaveAsTiff(Stream, PdfDrawOptions) method so that it no longer closes input stream.

Version 5.2

May 14th, 2017

  • Added support for 16 bit TIFF images. You can now add them to PDFs.
  • Added ability to extract 16 bit images from documents.
  • Added error event. You can subscribe to the event and receive notifications when the library detects an error in the PDF document structures and/or when the library can't process the PDF properly for some reason. It's a good idea to send all documents for which this event occurs to Bit Miracle. Take a look at the PdfDocument.Error event for more information.
  • Added sample code showing how to copy text, images and paths to a new PDF document. Take a look at the new Copy text, paths and images sample.
  • Added sample code showing how to draw PDF document to multipage TIFF image. Take a look at the new Save PDF as multipage TIFF sample.
  • Added ability to create text markup annotations. Take a look at the new PdfPage.AddHighlightAnnotation(String, PdfRectangle, PdfColor), PdfPage.AddJaggedUnderlineAnnotation(String, PdfRectangle, PdfColor), PdfPage.AddStrikeoutAnnotation(String, PdfRectangle, PdfColor) and PdfPage.AddUnderlineAnnotation(String, PdfRectangle, PdfColor) methods. Also take a look at the Text markup annotations sample.
  • Added ability to modify existing text markup annotations. Take a look at the new PdfTextMarkupAnnotation.GetTextBounds() and PdfTextMarkupAnnotation.SetTextBounds(IEnumerable<PdfQuadrilateral>) methods. Also take a look at the new PdfTextMarkupAnnotation.Color and PdfTextMarkupAnnotation.Contents properties.
  • Improved extraction of incorrect images produced by broken PDF generators.
  • Improved calculation of PdfControl.FullName property for PDFs with broken or incorrect structure.
  • Improved parsing of PDFs with broken or incorrect structure.
  • Improved parsing of XMP metadata with incorrect structure.
  • Improved extraction of words.
  • Improved drawing of PDF documents with zero line width.
  • Fixed bugs related to parsing of layers.
  • Fixed bugs related to extraction of CMYK images.

Version 5.1

February 11th, 2017

  • Breaking change: the library no longer sets black color in RGB colorspace as the default color of canvas pen and brush. From now on, the default color is black in Gray colorspace (as per PDF specification). This change does not affect document appearance. Please note that contents of the file (internal PDF structures) is affected by the change.
  • Replaced JPEG 2000 codec with a new, much improved one.
  • Added ability to recompress images with JPEG 2000 compression. See PdfImage.RecompressWithJpeg2000() methods. These methods recompress images using JPEG 2000 compression either lossless or using specified conversion ratio.
  • The PdfImageFrame.OutputCompression property can now be set to PdfImageCompression.Jpeg2000. The PdfImageFrame.Jpeg2000CompressionRatio property can be used to specify compression ratio to use while recompressing frame using JPEG 2000 compression.
  • The PdfImageFrames.SetOutputCompression(PdfImageCompression) method now accepts PdfImageCompression.Jpeg2000 as its parameter. The PdfImageFrames.SetJpeg2000CompressionRatio(Int32) method can be used to specify compression ratio to use while recompressing frames using JPEG 2000 compression.
  • Added custom exception classes for specific error groups. All the new exception classes are descendants of the PdfException class, so the change is not a breaking one. Here is the list of the new classes: CannotDecryptPdfException, CannotParseFdfException, CannotShowTextException, IncorrectPasswordException, UnexpectedStructureException, UnsupportedFontException, UnsupportedImageException, UnsupportedMetadataException.
  • Added ability to draw whole PDF document to multipage TIFF image. See PdfDocument.SaveAsTiff() methods. These methods produce one TIFF from all pages of a PDF document. The produced TIFF will consist of multiple pages (frames).
  • Added ability to get fill color of painted mask image. Please take a look at the new PdfPaintedImage.Brush property.
  • Added ability to extract visible text only. Please take a look at the new PdfTextExtractionOptions.SkipInvisibleText property. Use PdfDocument.GetText(PdfTextExtractionOptions) or PdfPage.GetText(PdfTextExtractionOptions) methods to extract visible text only.
  • Now page objects contain layer information. Take a look at the new PdfPageObject.Layer property.
  • Upon opening existing documents the value of PdfDocument.Encryption property is the encryption algorithm used to protect the document.
  • Extend PdfPenInfo class. Take a look at the new PdfPenInfo.DashPattern, PdfPenInfo.EndCap, PdfPenInfo.LineJoin and PdfPenInfo.MiterLimit properties.
  • PdfCanvas.MiterLimit property is marked obsolete (and will be removed in the next release of Docotic.Pdf). Please use PdfPen.MiterLimit property instead.
  • Improved LZW decoder so it can handle improperly encoded streams.
  • Improved speed of drawing for PDF documents with transparency groups and blend modes.
  • Improved parsing of PDFs with broken or incorrect structure.
  • Improved calculation of PdfControl.FullName property.
  • Fixed bugs related to copying and extraction of pages from documents with layers.
  • Fixed bugs related to creation of XObjects from pages.
  • Fixed bugs related to processing of stitching (Type 3) functions.
  • Fixed bugs related to processing of shadings.
  • Fixed bugs related to drawing of documents with dash patterns.
  • Fixed bugs related to drawing of documents with shadings.
  • Fixed bugs related to drawing and extraction of rotated widgets.
  • Fixed bugs related to drawing of documents with invalid ToUnicode streams.
  • Fixed bugs related to loading of font bytes for non-embedded Type0 fonts.
  • Fixed bugs related to grayscale OJpeg-in-Tiff images.
  • Fixed bugs related to extraction of JPEG 2000 images.
  • Fixed bugs related to extraction of JBig2 images.
  • Fixed bugs related to extraction of images with L*a*b* colors.
  • Fixed bugs related to extraction of FDF data.
  • Fixed bugs related to parsing of XMP metadata.

Previous releases