Help - How to add something on the bottom
Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2301
Printed Date: 03 Feb 26 at 11:19AM Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com
Topic: Help - How to add something on the bottom
Posted By: muemic62
Subject: Help - How to add something on the bottom
Date Posted: 15 Jun 12 at 9:04AM
I want to add tables and text on a page. I dont know the height because they are unknown. On the bottom of a table or a text I wand to add the next table or text. But: how can I calculate the y - coordinate (top) when I dont know the height of the element before? Thank you very much!
|
Replies:
Posted By: Ingo
Date Posted: 15 Jun 12 at 9:32AM
Hi Muemic62!
Try this link from the official support pages: http://www.quickpdflibrary.com/help/quickpdf/Search.php in the searchfield you should insert "Tables"... The resulting list below will offer many useful things for you.
Cheers and welcome here, Ingo
|
Posted By: muemic62
Date Posted: 15 Jun 12 at 9:51AM
Hello, before I used this forum I search in every help I could found (fory many many days). But now I dont know how I can finished my project (VB6). I need a way to get the bottom position of the last element I put in the pdf objekt to calculate where I have to place the next objekt. Thank you.
|
Posted By: Ingo
Date Posted: 15 Jun 12 at 11:22AM
Hi!
You should know the PSUnits (similar to pixels) of your page. You should know the number of your table entries. You should know the font height of the used textfonts. You should be able to estimate (in percent) the height of the blank space between two table rows. And then you should try. Don't forget SetOrigin to determine where point 0/0 shall be ;-)
Cheers, Ingo
|
Posted By: muemic62
Date Posted: 15 Jun 12 at 12:27PM
Hi, that is unuseable, because the cellheight is variable. Now I found following in the documentation: GetPageText()
My new function gives me the data I need:
Private Function get_bottom() As Long Dim s As String Dim feld Dim s_y As String Dim last_zeile As String Dim start As Integer
s = QP.GetPageText(3) 'all Infos about the page-text, including x,y coordinate, many lines feld = Split(s, vbCrLf) If Len(s) > 0 Then last_zeile = feld(UBound(feld) - 1) 'last line start = InStr(1, last_zeile, "#") 'because the first field can contain a "," last_zeile = Mid(last_zeile, start) 'split aigain when I am on the correct place s_y = Split(last_zeile, ",")(3) 'the data I am looking for is here get_bottom = Val(s_y) + 10 End If
End Function
|
|