Hyperlinks & Hiding Carriage Return Chars

  • I'm looking to do 2 things with TextDynamic

    1) Hyperlinks
    I've created a few bookmarks then hyperlinks to the bookmarks
    When a user clicks the hyperlink the bookmark is shown at the bottom of the editor window.
    How do I make the bookmark appear at the top of the editor window when a hyperlink to it is clicked so the user doesn't have to scroll down each time to read the text underneath the bookmark ?
    So far I use the following code to jump to the bookmark
    --------------------------
    private void wpdWordProcessor_OnHyperlink(object sender, int i, string sBookmark, IWPTextObj t)
    {
    IWPMemo memo = wpdWordProcessor.Memo;
    IWPTextCursor cursor = memo.TextCursor;
    cursor.MoveToBookmark(t.Command.ToString());
    }
    ----------------------------

    2) Hiding Carriage Return Chars
    When the editor starts I want it to start with the Carriage Return characters hidden
    I've tried the following but it doesn't seem to work
    ----------------------------
    wpdWordProcessor.Memo.SetBProp(BPropSel.wpViewOptions, 2, 0);
    ----------------------------

    Thanks
    Wayne

  • Thanks GRS
    That worked

    Now, anyone know how to get the Hyperlink/Bookmark problem working ?

    Zitat von GRS

    Hi,

    Hiding carriage returns can be done by

    Code
    wpdWordProcessor.Memo.wpaProcess("ShowCR","")


    I think repeated calls toggle CR on and off.

    GRS

    • Offizieller Beitrag

    Hi,

    >> Now, anyone know how to get the Hyperlink/Bookmark problem working ?

    Please check the upcoming release of TextDynamic - what you need is actually very easy to do in the engine but the interface does not provide a method for it. It will likely be an EditOptionEx (setBProp method)

    Next release of TextDynamic will also integrate our new unicode and PDF/A enabled PDF engine.

    This is the manual page for SetBProp
    https://www.wpcubed.com/manuals/word_p…mo_SetBProp.htm

    Group 6 changes or reads the view options, including the special chars for CR etc.

    Kind Regards,

    Julian Ziersch