VeryPDF PDF Editor OCX vs Alternatives: Feature Comparison

How to integrate VeryPDF PDF Editor OCX into a Windows app

1) Prepare

  • Download the PDF Editor OCX package from the vendor and unzip.
  • Register the OCX on the target machine (run elevated Command Prompt):

    Code

    regsvr32 “C:\path\to\pdfocx.ocx”
  • Keep the vendor sample apps and documentation handy (they include API references and examples).

2) Add the OCX to your project

  • .NET (C# / VB.NET):
    • In Visual Studio: Project → Add Reference → COM → select the PDF Editor OCX (or use “Choose Toolbox Items” → COM Components → add the control). Visual Studio will generate an interop assembly and place an AxHost wrapper (e.g., AxPdfocx).
    • Drag the control from the Toolbox onto a Form to create an instance (axPdfocxMarkup).
  • Native C++ / ATL / MFC:
    • Import the OCX type library (.tlb) or add the OCX as a COM component; use the provided wrapper classes or CoCreateInstance to instantiate the control.
  • VB6 / Delphi / VBA:
    • Add the ActiveX control via Components → Controls (or Component palette) and drop the control onto a form.

3) Initialize and license

  • Call the control’s license/registration method early (typical example):
    • C#:

      Code

      axPdfocxMarkup.SetOrderID(“YOUR_REGCODE”, “Company”, “email”);
    • VB:

      Code

      Pdfocx1.SetOrderID “YOUR_REGCODE”, “Company”, “email”
  • Optionally show/hide toolbars and panels using provided methods (e.g., ShowToolbar, MainToolbarHideButton).

4) Common usage patterns (examples)

  • Open a PDF:
    • C#:

      Code

      axPdfocxMarkup.OpenPDFFile(@“C:\docs\sample.pdf”, “”, “”, 0);
  • Close a PDF:

    Code

    axPdfocxMarkup.ClosePDFFile();
  • Detect unsaved changes:

    Code

    int modified = 0; axPdfocxMarkup.InvokeMethod(71, 0, ref(modified)); if (modified != 0) { /prompt to save */ }
  • Show/Hide panels:

    Code

    axPdfocxMarkup.ShowLeftPanel(true);
  • Invoke built-in or custom commands using InvokeMethod / InvokeMethodEx (refer to control docs for numeric IDs).

5) UI and resizing

  • Host the control in a resizable container (Dock = Fill or handle Form_Resize) so

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *