Results 1 to 1 of 1

Thread: Visagesoft PDF Editor

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Visagesoft PDF Editor

    Hi All

    I am trying to use Visagesoft to add text to a PDF document. I am able to add a text object but cannot figure out of to associate the text object with the object that allows me to move the text.

    The example shows this

    VSPDFTextObj textObj = VSEditor.addTextObj();


    textObj.Text = "Hello World !!\nNext line";
    textObj.fontName = "Arial";
    textObj.fontSize = 20;
    textObj.fillColor = 0xFFFF0000; // ARGB color set to red with full opacity (alpha = 0xFF)
    VSPDFObj pdfObj = (VSPDFObj)textObj; <<= Not sure how to do this

    // position the object to page, units are in points, you may still use clienttopaper method
    // for converting controls screen coordinates to pdf page coordinates
    pdfObj.MoveTo(20, 50);

    In dataflex I have this

    Get ComLoad of oPDFEditor "c:\test\mypdf.pdf" "" to iok

    Get Create (RefClass(cComVSPDFDoc)) to hodoc
    Get ComGetPdfDocument of oPDFEditor to vdoc
    Set pvComObject of hodoc to vdoc

    Send ComBeginUpdate of oPDFEditor

    Get Create (RefClass(cComVSPDFTextObj)) to hotext
    Get ComAddTextObj of oPDFEditor to vtext
    Set pvComObject of hotext to vtext
    Set ComText of hotext to "Testing"
    Set ComFontName of hotext to "Arial"
    Set ComFontSize of hotext to 20

    Send ComEndUpdate of oPDFEditor

    This does add the text in the upper left hand corner of the PDF document.

    I have attached the pkg created as well

    Thanks for any help
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts