AllDataFromFile Property
Top  Previous  Next


Returns or sets whether ASP Printer should retrieve all document data (title, body text, header and footer) from the text file specified in the FileName property. Applies only when printing text or text files using the PrintDoc method.


Syntax

object.AllDataFromFile [=boolean]

Where object evaluates to an ASP Printer object.


The settings for boolean are:

TrueSpecifies that the object should retrieve document title, body text, header and footer from the text file specified in the FileName property (see remarks below).  
False(Default). Specifies that the object should only retrieve the document text from the text file.  



Remarks

If this property is set to True, ASP Printer will assume that all document data (title, body text, header and footer) should be read from the text file specified in the FileName property. The format of the text file must comply with the following format:

Document title text   (must be on the first line in the file)  
Document header text   (must be on the second line in the file)  
Document footer text   (must be on the third line in the file)  
Document body text    (starts on the fourth line in the file)  

For example, the text file should show as in the example below when opened in a text editor like Notepad:


ASP Printer Demo
Header Demo
Footer Demo
ASP Printer greatly simplifies printing tasks....


Note: If you want to supply only the document title and text (no header and footer), just leave the second line (header) and third line (footer) blank in the file. The title must still be on the first line and the document text starts on the fourth line.

You don't have to worry about the number of characters on each line in the file; long lines will be wrapped by ASP Printer when the file is printed.

See also PrintText and PrintTextFile methods.