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,347 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
Comment Utility
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
Comment Utility
Thanks lharrispv

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

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

763 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

10 Experts available now in Live!

Get 1:1 Help Now