Solved

ABCPDF 6.0/7.0 Rect Object - How to determine if any text inside a fixed size rectangle has been truncated.

Posted on 2009-06-30
2
1,380 Views
Last Modified: 2012-05-07
Hi, I am wanting to determine if all of a long string content that I am loading into a fixed size rect object will be visible.

'I have this sub
Sub PDFAddHTML(ByVal sHTML As String, ByVal oPos As Position)
        oDoc.TopDown = True
        oDoc.Rect.String = oPos.Left & " " & oPos.Top + oPos.Height & " " & oPos.Left + oPos.Width & " " & oPos.Top
        oDoc.AddHtml(sHTML)
End Sub
 
'I would like to convert the sub into a function like below.
Function PDFAddHTML(ByVal sHTML As String, ByVal oPos As Position) as boolean
        oDoc.TopDown = True
        oDoc.Rect.String = oPos.Left & " " & oPos.Top + oPos.Height & " " & oPos.Left + oPos.Width & " " & oPos.Top
        oDoc.AddHtml(sHTML)
 
        'Your code here          
       'Return True where there is no truncation in the Rect object
       'Return False where there is truncation in the Rect object
 
End Function

Open in new window

0
Comment
Question by:mildurait
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Expert Comment

by:lharrispv
ID: 24745541
just do an If Then to check to see if the length of the string is less then width of the rectangle.
0
 
LVL 11

Accepted Solution

by:
mildurait earned 0 total points
ID: 24746053
Thanks lharrispv

i found the solution...
oDoc.GetInfo(ObjectID,"Truncated")
This returns 1 if truncated else 0
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
key press alert 2 46
Obtaining data on ASP 8 41
calculate days away 11 61
I'm looking for a dynamic length jQuery/javascript currency editor mask? 2 62
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question