I study preparing a dictionary programme with delphi. So far I have solved my problems about Word documents but I've got some problem about PDF documents. I imported and installed the AcroPdf component with Delphi 7 and I want to get the word (or text) which was selected by dblclicking by user from pdf document which was viewed by the ACROPDF component in Delphi. If I can get it I'll send it the dictionary database directly. If you help me I'll be glad. Thank you... Remzi MAKAK
how to get the selected text from acropdf component to an edit directly with Delphi 7
2.1k Views Asked by Remzi MAKAK At
1
There are 1 best solutions below
Related Questions in DELPHI
- How to not load all database records in my TListbox in Firemonkey Delphi XE8
- How to catch WM_DEVICECHANGE in a control other than TForm?
- show information with Rolling / moving messages delphi xe7
- What is the different between "Console target" and "GUI target" in DCC32 option?
- How to add new online ressources to RAD Studio help system
- C# and Delphi code have different behaviour when importing unmanaged dll
- Loop through records on a cxgrid and update a field/column
- Delphi 7 - Save to a Specific .INI Files Name
- TImagelist for large images
- how to modify a function so it returns an array of strings
- Checking for internet connection in runtime
- How can I make the main form align correctly after my control height is autosized and then I maximize the form?
- fetch data from web service to dataset in Delphi
- Load candlestick data from file
- Infinite loop in parsing a string using pointer math
Related Questions in PDF
- Itext get special letters from pdf
- Carrierwave file upload with different file types
- Get text from a section of a pdf page with IcePdf
- itext pdf to image convert
- PDF to Text extractor in nodejs without OS dependencies
- PDF to ByteArray Conversion
- Opening PDF file in SWT Browser - XulRunner default viewer
- Generate TCPDF output to a shared drive folder
- Combine base and ggplot graphics in R figure window in different pages
- Updating a PDF Barcode Field in iOS and Android Device
- Prevent PDFsharp from saving an image file?
- Adding attachment links between lines in itext for pdf
- Crop Pdf from each edge using itextshap
- How to create a PDF with iText+XMLWorker from servlet using custom font?
- how to create a pdf editor for grails
Related Questions in AXACROPDF
- Embedding AxAcroPDF into my form causes it to load in the background randomly
- How to directly access text in AxAcroPDFLib?
- How to detect if AxAcroPdf component has loaded PDF?
- WPF / C# Display of Acrobat Toolbar
- Prevent user from printing/saving PDF file in C#
- How to search text (Exect match) in pdf in C#
- How can I get number of pages in a pdf file in AxAcroPdf?
- AxAcroPdf Control - Issues reloading PDF
- Finding coordinates of subform within form, in specific area
- AxAcroPDFLib.AxAcroPDF in Word Addin (32bit & 64bit)
- Embed a PDF into a WPF application
- File being used by another process when using File.CopyTo method
- Adobe PDF Reader component (AcroPDF.dll) - is it possible to access table of contents and bookmarks from code?
- AcroPDFlib, AxAcroPDFLib commercial use
- how to get the selected text from acropdf component to an edit directly with Delphi 7
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The following shows one way to get the selected text from a Pdf document which is open in Adobe Acrobat Professional (v.8, English version).
Update The original version of this answer neglected to check the Boolean result of calling
MenuItemExecuteand specified the wrong argument to it. Both these points are fixed in the updated version of this answer. It turned out that the reason the call toMenuItemExecutewas failing was that it is essential to callBringToFronton the Acrobat document before trying to copy the text selected in to to the clipboard.Create a new Delphi VCL project.
In D7's IDE go to
Projects | Import Type Library, and in theImport Type Librarypop-up, scroll down until you see something like "Acrobat (Version 1.0) in the list of files, and "TAcroApp, TAcroAVDoc..." in theClass namesbox. That is the one you need to import. Click theCreate unitbutton/In the project's main form file
a. Make sure it USES the Acrobat_Tlb.Pas unit from step 2. You may need to add the path to wherever you saved Acrobat_Tlb.Pas to the SearchPath of your project.
b. Drop a TButton on the form, name it
btnGetSel. Drop a TEdit on the form and name itedSelectionEdit the source code of your main form unit as shown below.
Set a debugger breakpoint onDo not set a breakpoint within theAcrobat.MenuItemExecute('File->Copy');GetSelectionprocedure as this is likely to defeat the call toBringToFrontin it.Close any running instance of Adobe Acrobat. Check in Task Manager that there are no hidden instances of it running. The reason for these step is to make sure that when you run your app, it "talks" to the instance of Acrobat that it starts, not another one.
Compile and run your app. Once the app and Acrobat are open, switch to Acrobat, select some text, switch back to your app and click the
btnGetSelbutton.Code: