Print Page | Close Window

TMemo to PDF

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=1781
Printed Date: 21 Sep 24 at 4:22AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: TMemo to PDF
Posted By: Luke
Subject: TMemo to PDF
Date Posted: 23 Mar 11 at 3:50AM
I have 5 TMemo fields that store a variable amount of plain text data. Is there an "easy" way to convert the text to PDF? Theoretically a memo field could have more than 1 page worth of information and I need to start each memo field after each other, i.e. no automatic page breaks after each field.

TIA.


-------------
Luke M. Miller

ResCorSoft, Inc.



Replies:
Posted By: Ingo
Date Posted: 23 Mar 11 at 6:55AM
Hi Luke!

There's no automatic way inside QuickPDF.
Why should it be inside (each language is a bit different)?
Put your memo-fields in a stringlist.
Get the number of stringlist entries.
Check how many rows you want to have on each pdf-page.
At least use DrawText or something similar from QuickPDF.

Cheers, Ingo



Posted By: Luke
Date Posted: 23 Mar 11 at 7:38AM
Thank you for the quick replay. Additional question:

Is there any way to tell how many rows will fit assuming that I use the same font and font size for all rows?


-------------
Luke M. Miller

ResCorSoft, Inc.


Posted By: Ingo
Date Posted: 23 Mar 11 at 12:02PM
Hi!

You have to do your own algorithm regarding this case.
You know the dimensions (pixels) of your page.
You can get the used font dimensions.
Let's do some math ;-)
An idea: What about the html-textbox-functions with
wrapped text in QuickPDF? Perhaps you should investigate
there... see the online reference.

Cheers, Ingo



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