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

Cross-Platform Printing

Printing Styled Text and Graphics

Issue: 7.4 (May/June 2009)
Author: Tom Baumgartner
Article Description: No description available.
Article Length (in bytes): 11,604
Starting Page Number: 20
RBD Number: 7410
Resource File(s):

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

Related Link(s): None
Known Limitations: None

Excerpt of article text...

Writing your first REALbasic program that prints only from the Mac is both a blessing and a curse. It is a blessing because printing from the Mac works basically as you expect. It is a curse because, when you port the program to Windows, you find that printing is not straightforward. Both text and graphics will be smaller than you expect and spacing will be incorrect. The REALbasic documentation regarding printing of graphics is not as helpful as it should be. This article discusses the issues and presents one method of writing a cross-platform program that prints styled text and graphics.

Our example project is based on a project I created for myself when I wanted to print four-up postcards (the same design four times on a letter-sized page). The program has a main window in which the user will enter their styled text into an EditField and the user can put a picture into a movable imageWell as shown in Figure 1. (The same functionality could be achieved by drawing the user's typed input on a canvas but implementing a text editor in a canvas is extremely complex.) The text and picture are then printed four times in the four quadrants of an 8.5 by 11 inch page (see printout results in Figure 2). Seems simple, but let's start digging into the details.

...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