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,355 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
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 tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

912 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now