How to Copy Rich text to clip board

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
Floater
User
Posts: 2
Joined: Fri Aug 24, 2012 8:33 am

How to Copy Rich text to clip board

Post by Floater »

Hi
How do I extract/copy-to-clipboard text from PDF in Rich Text format ? I have read the IPXV_TextSelection Interface but am unable to find out how exactly to access the interface.

Regards
Floater
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: How to Copy Rich text to clip board

Post by Lzcat - Tracker Supp »

Hi floater.
If you need just copy to clipborad please call CopyAsRich fucntion, and all selected text will be copied to clipboard.
If you need to inspect or get selection other way code will be much more complicated (at least for now).
HTH.
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Dima - Tracker Dev Team
User
Posts: 3
Joined: Mon Sep 21, 2015 6:16 am

Re: How to Copy Rich text to clip board

Post by Dima - Tracker Dev Team »

Here's the sample which you can experiment with:

Code: Select all

            PDFXEdit.IPXV_Document doc = pdfCtl.Doc;
            if (doc == null)
                return;

            int cmdID = pdfCtl.Inst.Str2ID("selection.text");

            PDFXEdit.IPXV_TextSelection textSel = (PDFXEdit.IPXV_TextSelection)doc.GetSel(cmdID);
            if (null != textSel)
            {
                textSel.CopyAsRich();
            }
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply