Solved

Printing multiple pages if dynamic text is too long for one page

Posted on 2009-05-13
1
245 Views
Last Modified: 2012-05-06
I have a dynamic text field that is populated by XML. I have a simple print MC that loads the text into a dynamic text box and prints using the code below. It prints well, however sometimes there will be more than one pages worth of text drawn from the XML.

I can work out a way of printing  to multiple pages if the text is too long for one page. Right now it just cuts of the text that doesn't fit. Is there someway of checking how many lines there are and splitting the text up or someway of forcing multiple pages?
var pj = new PrintJob();

var success = pj.start();

if(success) {

	pj.addPage("_root.print_notes");

	pj.send();

}

delete pj;

Open in new window

0
Comment
Question by:alex_wareing
1 Comment
 
LVL 39

Accepted Solution

by:
blue-genie earned 500 total points
ID: 24383367
Hello, I'm going to provide you with the logic i'd use.
you'll stick the text from the xml into a textfield off stage. the textfield autosizes.then get the size of the textfield. set the coordinates for the print job.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now