Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).

New Forum | Previous | Next | (P-PDF) Developers

Topic: low-level string formatting where length can vary
Conf: (P-PDF) Developers, Msg: 98597
From: aerickson
Date: 10/17/2003 12:38 PM


I am an experienced software developer but new to the PDF generation. Is the following possible:

My client currently generates PDFs using activePDF and database data. For the most part this solution is okay as about 90% of the PDFs appear just fine. They have asked me to develop some granular formatting routines to fix the 10% that have issues.

The routines I wish to implement would take the database data, apply a font, and determine if the result would fit well in the allotted space on the PDF. If not then I would work with the data, i.e. strip out whitespace characters such as new lines, tab, and extra spaces, hyphenate words, or integrate line breaks and run the new string through the routines again until it fit in the allotted space. Finally I would feed this output to activePDF.

In concept I would think this could work although not easily and we'd still need to tweak the routines over time as we could not account for all scenarios up front.

Are there ways/libraries to apply fonts to data and determine low-level formatting characteristics in the way I have described? Chances are there must be standard ways of doing this as I couldn't be the first to ask so feel free to educate me if there are better/standard ideas.

Thanks for your time,
Andy Erickson

PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Five visions of a PDF Day

In the world of PDFs or as we like to say Planet (of) PDF, a year isn't a real PDF year without an intense few days of industry knowledge sharing.

May 15, 2018
Platinum Sponsor

Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.


Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.