VintaSoft Imaging .NET SDK v8.6
Vintasoft.Imaging.Pdf.UI Namespace / PdfContentEditorTool Class
Members Example



In This Topic
    PdfContentEditorTool Class
    In This Topic
    Visual tool that allows to edit content of PDF page.
    Object Model
    PdfContentEditorTool ClassIInteractionController InterfaceBringToBackItemUIAction ClassBringToFrontItemUIAction ClassIObjectClipboard InterfaceCopyItemUIAction ClassPdfPage ClassCutItemUIAction ClassDeleteItemUIAction ClassDeselectAllItemsUIAction ClassImageViewer ClassPasteItemWithOffsetUIAction ClassGraphicsFigure ClassGraphicsFigurePoints ClassGraphicsFigureView Class
    Syntax
    Example
    This example shows how to add ellipse to PDF document loaded into image viewer.
    Public Partial Class FormWithPdfEditorTool
        Inherits System.Windows.Forms.Form
        '...
        Private _imageViewer As Vintasoft.Imaging.UI.ImageViewer
        Private _editorTool As Vintasoft.Imaging.Pdf.UI.PdfContentEditorTool
        Private _pen As Vintasoft.Imaging.Pdf.Drawing.PdfPen
        Private _brush As Vintasoft.Imaging.Pdf.Drawing.PdfBrush
        '...
                
        Public Sub New()
            '...
            ' create an instance of the PdfEditorTool
            _editorTool = New Vintasoft.Imaging.Pdf.UI.PdfContentEditorTool()
                
            ' set the editor tool as current tool
            _imageViewer.VisualTool = _editorTool
            ' create a pen and brush for figure drawing
                
            _pen = New Vintasoft.Imaging.Pdf.Drawing.PdfPen(System.Drawing.Color.Red, 5)
            _brush = New Vintasoft.Imaging.Pdf.Drawing.PdfBrush(System.Drawing.Color.Green)
        End Sub
                
        '...
                
        Private Sub drawEllipseToolStripButton_Click(sender As Object, e As System.EventArgs)
            ' start building an ellipse
            _editorTool.StartBuildEllipse(_pen, _brush)
        End Sub
    End Class
    public partial class FormWithPdfEditorTool : System.Windows.Forms.Form
    {
        //...
        Vintasoft.Imaging.UI.ImageViewer _imageViewer;
        Vintasoft.Imaging.Pdf.UI.PdfContentEditorTool _editorTool;
        Vintasoft.Imaging.Pdf.Drawing.PdfPen _pen;
        Vintasoft.Imaging.Pdf.Drawing.PdfBrush _brush;
        //...
                
        public FormWithPdfEditorTool()
        {
            //...
            // create an instance of the PdfEditorTool
            _editorTool = new Vintasoft.Imaging.Pdf.UI.PdfContentEditorTool();
                
            // set the editor tool as current tool
            _imageViewer.VisualTool = _editorTool;
            // create a pen and brush for figure drawing
                
            _pen = new Vintasoft.Imaging.Pdf.Drawing.PdfPen(System.Drawing.Color.Red, 5);
            _brush = new Vintasoft.Imaging.Pdf.Drawing.PdfBrush(System.Drawing.Color.Green);
        }
                
        //...
                
        private void drawEllipseToolStripButton_Click(object sender, System.EventArgs e)
        {
            // start building an ellipse
            _editorTool.StartBuildEllipse(_pen, _brush);
        }
    }
    Inheritance Hierarchy
    Requirements

    Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also