[]
        
(Showing Draft Content)

Version 6.2.0

Breaking Changes

  • The stream that is passed to one of GcPdfDocument.Load() method overloads must be kept open while the loaded GcPdfDocument is in use.

  • If using GcPdfDocument.MergeWithDocument(), the passed GcPdfDocument is effectively in use while the current document is in use. If it was loaded from a stream, that stream must be kept open too.

  • Several existing collection properties can no longer be modified in place (see below). Instead, create a new instance of the collection and assign it to the property.

  • WidgetAnnotation.TextFormat property is removed (previously it was obsolete).

  • GrapeCity.Documents.Pdf.Layers.OptionalContentOrderCollection class is now derived from PdfCollection (previously it was derived from List).

  • GrapeCity.Documents.Pdf.AcroForms.SignatureLockedFields.FieldNames property type changed from ObservableCollection to IEnumerable. To change the value, create a new instance of the collection and assign it to the property.

  • GrapeCity.Documents.Pdf.SoundObject.EncodingFormat property type changed from string to IPdfName.

  • GrapeCity.Documents.Pdf.Text.CMap.CMap class is renamed to CMapTable, and CMapBase class is removed.

  • GrapeCity.Documents.Pdf.Actions.ActionHide.LinkedObjects property type changed from List to LinkedObjectCollection. To change the value, create a new instance of the collection and assign it to the property.

  • GrapeCity.Documents.Pdf.Actions.ActionFieldsBase.FieldNames property changed from List FieldNames { get; } to IList Fields { get; }.

  • Properties ViewerPreferences.PageMode and ViewerPreferences.PageLayout marked as obsolete, corresponding properties are now available directly on GcPdfDocument: GcPdfDocument.PageMode and GcPdfDocument.PageLayout.

  • Property WidgetAnnotation.TriggerEvents.Activate marked as obsolete; the corresponding property is now available directly on WidgetAnnotation: WidgetAnnotation.Activate.

  • GrapeCity.Documents.Pdf.Annotations.PolygonAnnotationBase.Points property type changed from IList to IReadOnlyList. To change the value, create a new instance of the collection and assign it to the property.

  • GrapeCity.Documents.Pdf.Annotations.ImageScale class is now derived from GrapeCity.Documents.Pdf.Wrappers.PdfDictWrapper (previously it was derived from NotifyObject).

  • GrapeCity.Documents.Pdf.Annotations.ButtonAppearance.Image property type changed from object to IXObject. IXObject is a common interface for FormXObject and PdfImageObjectBase. An IImage can be assigned to this property using PdfImageHandler: doc.ImageHandlers.GetImageHandler(someBitmap).

  • GrapeCity.Documents.Pdf.Annotations.InkAnnotation.Paths property type changed from ObservableCollection<PointF[]> to IReadOnlyList<IReadOnlyLust>. To change the value, create a new instance of the collection and assign it to the property.

  • GrapeCity.Documents.Pdf.Annotations.TextMarkupAnnotation.Area property type changed from ObservableCollection to IReadOnlyList. To change the value, create a new instance of the collection and assign it to the property.

  • GrapeCity.Documents.Pdf.Annotations.RedactAnnotation.Area property type changed from ObservableCollection to IReadOnlyList. To change the value, create a new instance of the collection and assign it to the property.

  • Now, even if an annotation belongs to several pages, its vertical coordinates are converted to the GcPdf top/left coordinate system using the media box of the first page in the annotation's Pages collection. The AnnotationBase.PdfRect property provides access to native PDF coordinates.

  • GrapeCity.Documents.Pdf.Structure.StructElement.ID property type changed from IList to IPdfString.

  • PdfIndirectSerializableObject class was removed, the GrapeCity.Documents.Pdf.Wrappers.PdfWrapperBase and its descendants can be used instead.

  • PdfDict class is now derived from Dictionary<PdfName, IPdfObject> (previously it was derived from Dictionary<string, object>). Instead of using a string directly, use new PdfName(string) instead.

  • GcPdfDocument.NamedDestinations property type changed from IDictionary<string, Destination> to IDictionary<string, IDestination>. The IDestination interface is common to the Destination and ActionGoTo classes.

  • PdfLang type is removed, and all properties that previously had that type are now of the type string.

  • ICCProfile.IsSame() method was removed.

  • GrapeCity.Documents.Pdf.Annotations.UnknownAnnotation.Subtype property type changed from string to PdfName.

  • PdfDictWrapperObject class was removed; use PdfDictWrapper instead.

  • CheckBoxField.ValueObj property behavior changed; now it returns a Boolean true if all widgets of the CheckBoxField use the same name for the appearance stream used to display a checked state. Previously, it returned "Off" if the field was unchecked or the name of the checked appearance stream. Use PdfValue property to get the PdfName used to hold the value.

New Features and Improvements

  • GcPdfDocument.Load() method now implements lazy loading of PDF objects. This provides several advantages, including improved compatibility with PDFs produced by various vendors, the preservation of custom content unknown to GcPdf as is, and improved average load speed.

  • Added the ability to open or modify (with limitations) a password-protected PDF without specifying the password; see GcPdfDocument.Load(stream, DecryptionOptions) overload.

  • Added helper methods to TextBoxField, ComboBoxField, and CombTextField: SetPercentFormat(), SetPercentValue(), SetNumberFormat(), SetNumberValue(), SetDateFormat(), SetDateValue(), SetTimeFormat(), SetTimeValue(), SetSpecialFormat(), and SetSpecialFormatValue().

  • Added the ability to generate custom time-stamp tokens. The new ITimeStampGenerator interface can be implemented by the user and assigned to SignatureProperties.TimeStamp and TimeStampProperties.TimeStamp.

  • Added following helper classes in GrapeCity.Documents.Layout.Composition namespace to simplify drawing layouts on a GcGraphics:

    • Surface Class: Represents a surface that can draw its views on a GcGraphics.

    • Layer Class: Represents a drawing layer with visuals, optional clipping, and nested layers.

    • View Class (derived from Layer Class): Represents a Layer with an associated LayoutView object and transformation.

    • Space Class: Represents a space on a Layer with an associated LayoutRect.

    • Visual Class (derived from Space Class): Represents a figure, text, or image on a Layer.

Resolved Issues

  • Fixed several issues related to errors when opening existing PDFs.