Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).


New Forum | Previous | Next | (P-PDF) Beginners


Topic: FindText with PDTextSelect
Conf: (P-PDF) Beginners, Msg: 90979
From: Allquixotic
Date: 6/27/2003 11:16 PM

Hi,

Has anyone found a solution for this common problem yet? Using VB/the Acrobat 6 automation library within an Access form... all of my 'big picture' stuff is irrelevant here, I need a specific answer... have spent many hours trying to get the active hilite... don't know if it's possible! Please tell me it is. I need to know if this code works, or how to correct it, because it is such a small part of my application I can't even tell what it does without spending 15 minutes to figure it out each time I do a test. The comments at the very bottom of the code explain the source of my confusion; I only hope that there is a sneaky algorithm to complete this process.

TIA,
Sean
*****CODE*****
'Variable Prototypes
'Public POBuyer As String
' Let POBuyer = "Aandi Inston"
'Dim avDoc As CAcroAVDoc
'End Variable Prototypes
Dim rect As CAcroRect
Dim Hilite As CAcroHiliteList
Dim avPage As CAcroAVPageView
Dim avX As CAcroPDTextSelect
c = 0
Do While avDoc.FindText(POBuyer, , , 0) > 0
c = c + 1 'Count of found instances
Loop
'Yummy.... stupid message boxes!
SendKeys "{ENTER}", True
'*crunch crunch crunch*

'OK start over
avDoc.FindText POBuyer, , , 1
For i = 0 To i = c - 1
'Loop til the last instance found in prev. loop
'Minus one because we started over already
avDoc.FindText POBuyer, , , 0
Next
'Gimme a PDTextSelect
Set avX = CreateObject("AcroExch.PDTextSelect")
'DOES THIS get a pdTextSelect for the current selection???
'If it does.. woohoo!
'If not.. argh.....
'I need the rotated pagespace coords for the found text...
'I can get the bounding rect once I get the proper
'PDTextSelect object..... ALMOST THERE...!!!!
'Please help....


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.