Print Page | Close Window

Formatting text in columns

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=487
Printed Date: 22 Nov 24 at 1:36PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Formatting text in columns
Posted By: Hopeful
Subject: Formatting text in columns
Date Posted: 10 Aug 06 at 2:32AM

I want to format a receipt for printing. I can see from the docs that there are functions to draw wrapped text which can be left or right justified which is great. However, these functions all need a starting x and y position.

My question is, how do I determine the correct y position to use for each line of text? Also, it's possible that the left text column will wrap - the right text column must always have a y position that corresponds to the first line of the corresponding block of left text column.

Line 1 which       $12.20

has wrapped

Line 2                $10.20

Line 3                $23.34




Replies:
Posted By: chicks
Date Posted: 10 Aug 06 at 11:35AM
There are a couple of helper functions in QuickPDF you can use to determine the height or # of wrapped lines, then you can do the math to get the next y position.

GetWrappedTextHeight()
GetWrappedTextLineCount()




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk