GdPicture.NET.14
GdPicture14 Namespace / GdPictureDocumentConverter Class / DropGdPictureAnnotations Property
Example





DropGdPictureAnnotations Property (GdPictureDocumentConverter)
Specifies if present GdPictureAnnotations objects in the loaded document should be copied before further processing.
Syntax
'Declaration
 
Public Property DropGdPictureAnnotations As Boolean
 

Property Value

The default value is false.
Remarks
For PDF document format, copying annotations means, that firstly they are copied into their native format (xmp metadata) and secondly, they are converted to PDF annotations to allow other PDF viewers render their appearance.
Example
Loading and converting only the first page of the source document with copied annotations on that page.
Using gdpictureDocumentConverter As New GdPictureDocumentConverter()
    gdpictureDocumentConverter.LoadOnlyFirstPage = True
    'Please try to use also a multi-page document.
    Dim status As GdPictureStatus = gdpictureDocumentConverter.LoadFromFile("test_doc.docx", GdPicture14.DocumentFormat.DocumentFormatDOCX)
    If status = GdPictureStatus.OK Then
        MessageBox.Show("The file has been loaded successfully.", "GdPicture")
        gdpictureDocumentConverter.DropGdPictureAnnotations = True
        status = gdpictureDocumentConverter.SaveAsPDF("first_page_dropped_annots.pdf", PdfConformance.PDF)
        If status = GdPictureStatus.OK Then
            MessageBox.Show("The file has been saved successfully.", "GdPicture")
        Else
            MessageBox.Show("The file has failed to save. Status: " + status.ToString(), "GdPicture")
        End If
    Else
        MessageBox.Show("The file has failed to load. Status: " + status.ToString(), "GdPicture")
    End If
End Using
See Also