Special

Special Print Closeout!

We're clearing out the remainder of our print issues at fire sale prices -- as much as 75% off! Quantities are extremely limited and only available while supplies last. Hurry to take advantage of this one-time offer.

RBD Magazines

Once these printed back issues are gone, they are gone!

Article Preview


Buy Now

PDF:

Feature

Printing with Templates

Instead of making your simple app support complicated printing, why not use a pre-formatted template instead?

Issue: 7.4 (May/June 2009)
Author: Jens Bendig
Article Description: No description available.
Article Length (in bytes): 14,106
Starting Page Number: 24
RBD Number: 7411
Resource File(s):

Download Icon 7411.zip Updated: Friday, May 1, 2009 at 11:36 AM

Related Link(s): None
Known Limitations: None

Excerpt of article text...

At the REALbasic Developer Conference in Frankfurt at the end of 2008 at least two developers talked to me about how to generate print files. They seemed to think this was something like brewing magic potions in Professor Snapes lessons!

Both developers were surprised to hear that I print several standard letters with my software without experiencing all those problems. But I'll let it out at the beginning: I am cheating.

Instead of worrying about the complexities of formatting styled text and printing it on different platforms, I build new "print" documents from a pre-formatted template file. That way I don't care about the structure or design of that file, or have to code my own printing routine. Instead I just care about placing the new content within the existing template file.

That's easy! Perhaps it's too basic for an article, but since these developers hadn't used this approach, perhaps others out there will benefit from the same technique. So here goes.

Don't generate a printable file -- just let your program fill a template

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.


 


|

 


Weblog Commenting and Trackback by HaloScan.com