Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-05-13
1
Medium Priority
?
253 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

971 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