Model Railroad System 2.2.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
FCFSupport::PDFPrinterDevice Class Reference

PDF Printer device. More...

#include <PDFPrinter.h>

Inheritance diagram for FCFSupport::PDFPrinterDevice:
FCFSupport::PrinterDevice

Public Member Functions

 PDFPrinterDevice (const string filename="", const string title_="", PageSize pageSize=Letter, char **outmessage=NULL)
 Constructor. More...
 
virtual bool OpenPrinter (const string filename, PageSize pageSize=Letter, char **outmessage=NULL)
 Open the printer file. More...
 
virtual bool ClosePrinter (char **outmessage=NULL)
 Close the printer. More...
 
virtual bool SetTypeSpacing (TypeSpacing spacing)
 Set the type spacing. More...
 
virtual bool SetTypeWeight (TypeWeight weight)
 Set the type weight. More...
 
virtual bool SetTypeSlant (TypeSlant slant)
 Set the type slant. More...
 
virtual bool NewPage (const string heading="")
 Generate a new page. More...
 
virtual bool PutLine (const string line="")
 Put a line of text. More...
 
virtual bool Put (const string text)
 Put a string. More...
 
virtual bool Tab (int column)
 Move to the specified tab column. More...
 
virtual ~PDFPrinterDevice ()
 Destructor. More...
 
- Public Member Functions inherited from FCFSupport::PrinterDevice
 PrinterDevice (const string filename="", const string title="", PageSize pageSize_=Letter, char **outmessage=NULL)
 Constructor. More...
 
virtual bool OpenPrinter (const string filename, PageSize pageSize_=Letter, char **outmessage=NULL)
 Member function to open the printer. More...
 
virtual bool ClosePrinter (char **outmessage)
 Close the printer. More...
 
bool IsOpenP () const
 Is the printer open? More...
 
PageSize PrinterPageSize () const
 Return the page size. More...
 
virtual bool SetTypeSpacing (TypeSpacing spacing)
 Set the the spacing. More...
 
virtual bool SetTypeWeight (TypeWeight weight)
 Set the type weight. More...
 
virtual bool SetTypeSlant (TypeSlant slant)
 Set the type slant. More...
 
virtual bool NewPage (const string heading="")
 Perform a page feed and print a heading. More...
 
virtual bool PutLine (const string line="")
 Print out a string and follow it with a new line sequence. More...
 
virtual bool Put (const string text)
 Print a string of text. More...
 
virtual bool Put (int number)
 Print an integer. More...
 
virtual bool Put (double number)
 Print a double. More...
 
virtual bool Tab (int column)
 Tab over to the specified column. More...
 
virtual ~PrinterDevice ()
 Destructor. More...
 

Private Member Functions

bool CreateNewPage ()
 Create a new page. More...
 
bool CreateNewStream ()
 Create new stream. More...
 

Private Attributes

PDFFileStructures::CrossReferenceTable crossReferenceTable
 PDF Cross reference table. More...
 
PDFFileStructures::CatalogDictionaryrootDictionary
 PDF Root catalog. More...
 
PDFFileStructures::PagecurrentPage
 Current PDF Page. More...
 
PDFFileStructures::PDFStreamcurrentStream
 Current PDF Stream. More...
 
PDFFileStructures::PageTreepageTreeRoot
 PDF Page Tree root. More...
 
PDFFileStructures::InformationDirectoryinfo
 Information dictionary. More...
 
ofstream printerStream
 Output stream. More...
 
string title
 Title string. More...
 
string currentFontName
 Current font name. More...
 
int lines
 Number of lines. More...
 
int horizontalScaling
 Current horizontal scaling. More...
 
int maxLines
 Maximum number of lines. More...
 
bool partline
 Partial line flag. More...
 
bool needPage
 Need page flag. More...
 
int currentColumn
 Current column. More...
 
double currentColumnFraction
 Current column fraction. More...
 

Additional Inherited Members

- Public Types inherited from FCFSupport::PrinterDevice
enum  PageSize { Letter , A4 }
 Page size selection, for those printers that support different page sizes. More...
 
enum  TypeSpacing { One , Half , Double }
 Horizontal type spacing. More...
 
enum  TypeWeight { Normal , Bold }
 Type weight. More...
 
enum  TypeSlant { Roman , Italic }
 Type slant. More...
 
- Protected Attributes inherited from FCFSupport::PrinterDevice
bool isOpenP
 Is open flag. More...
 
PageSize pageSize
 Document page size. More...
 

Detailed Description

PDF Printer device.

Author
Robert Heller <heller@deepsoft.com>

Constructor & Destructor Documentation

◆ PDFPrinterDevice()

FCFSupport::PDFPrinterDevice::PDFPrinterDevice ( const string  filename = "",
const string  title_ = "",
PageSize  pageSize = Letter,
char **  outmessage = NULL 
)

Constructor.

Create a PDF Printer device.

Parameters
filenameThe name of the file to print to.
titleThe document title.
pageSizeThe document page size.
outmessagePointer to get an error message buffer pointer.

◆ ~PDFPrinterDevice()

virtual FCFSupport::PDFPrinterDevice::~PDFPrinterDevice ( )
virtual

Destructor.

Member Function Documentation

◆ ClosePrinter()

virtual bool FCFSupport::PDFPrinterDevice::ClosePrinter ( char **  outmessage = NULL)
virtual

Close the printer.

Parameters
outmessagePointer to get an error message buffer pointer.

Reimplemented from FCFSupport::PrinterDevice.

◆ CreateNewPage()

bool FCFSupport::PDFPrinterDevice::CreateNewPage ( )
private

Create a new page.

◆ CreateNewStream()

bool FCFSupport::PDFPrinterDevice::CreateNewStream ( )
private

Create new stream.

◆ NewPage()

virtual bool FCFSupport::PDFPrinterDevice::NewPage ( const string  heading = "")
virtual

Generate a new page.

Parameters
headingThe new page heading string.

Reimplemented from FCFSupport::PrinterDevice.

◆ OpenPrinter()

virtual bool FCFSupport::PDFPrinterDevice::OpenPrinter ( const string  filename,
PageSize  pageSize = Letter,
char **  outmessage = NULL 
)
virtual

Open the printer file.

Parameters
filenameThe name of the file to print to.
pageSizeThe document page size.
outmessagePointer to get an error message buffer pointer.

Reimplemented from FCFSupport::PrinterDevice.

◆ Put()

virtual bool FCFSupport::PDFPrinterDevice::Put ( const string  text)
virtual

Put a string.

Parameters
textThe text string to print.

Reimplemented from FCFSupport::PrinterDevice.

◆ PutLine()

virtual bool FCFSupport::PDFPrinterDevice::PutLine ( const string  line = "")
virtual

Put a line of text.

Parameters
lineThe line of text.

Reimplemented from FCFSupport::PrinterDevice.

◆ SetTypeSlant()

virtual bool FCFSupport::PDFPrinterDevice::SetTypeSlant ( TypeSlant  slant)
virtual

Set the type slant.

Parameters
slantThe slant value to set.

Reimplemented from FCFSupport::PrinterDevice.

◆ SetTypeSpacing()

virtual bool FCFSupport::PDFPrinterDevice::SetTypeSpacing ( TypeSpacing  spacing)
virtual

Set the type spacing.

Parameters
spacingThe spacing value to set.

Reimplemented from FCFSupport::PrinterDevice.

◆ SetTypeWeight()

virtual bool FCFSupport::PDFPrinterDevice::SetTypeWeight ( TypeWeight  weight)
virtual

Set the type weight.

Parameters
weightThe weight value to set.

Reimplemented from FCFSupport::PrinterDevice.

◆ Tab()

virtual bool FCFSupport::PDFPrinterDevice::Tab ( int  column)
virtual

Move to the specified tab column.

Parameters
columnthe column to move to.

Reimplemented from FCFSupport::PrinterDevice.

Member Data Documentation

◆ crossReferenceTable

PDFFileStructures::CrossReferenceTable FCFSupport::PDFPrinterDevice::crossReferenceTable
private

PDF Cross reference table.

◆ currentColumn

int FCFSupport::PDFPrinterDevice::currentColumn
private

Current column.

◆ currentColumnFraction

double FCFSupport::PDFPrinterDevice::currentColumnFraction
private

Current column fraction.

◆ currentFontName

string FCFSupport::PDFPrinterDevice::currentFontName
private

Current font name.

◆ currentPage

PDFFileStructures::Page* FCFSupport::PDFPrinterDevice::currentPage
private

Current PDF Page.

◆ currentStream

PDFFileStructures::PDFStream* FCFSupport::PDFPrinterDevice::currentStream
private

Current PDF Stream.

◆ horizontalScaling

int FCFSupport::PDFPrinterDevice::horizontalScaling
private

Current horizontal scaling.

◆ info

PDFFileStructures::InformationDirectory* FCFSupport::PDFPrinterDevice::info
private

Information dictionary.

◆ lines

int FCFSupport::PDFPrinterDevice::lines
private

Number of lines.

◆ maxLines

int FCFSupport::PDFPrinterDevice::maxLines
private

Maximum number of lines.

◆ needPage

bool FCFSupport::PDFPrinterDevice::needPage
private

Need page flag.

◆ pageTreeRoot

PDFFileStructures::PageTree* FCFSupport::PDFPrinterDevice::pageTreeRoot
private

PDF Page Tree root.

◆ partline

bool FCFSupport::PDFPrinterDevice::partline
private

Partial line flag.

◆ printerStream

ofstream FCFSupport::PDFPrinterDevice::printerStream
private

Output stream.

◆ rootDictionary

PDFFileStructures::CatalogDictionary* FCFSupport::PDFPrinterDevice::rootDictionary
private

PDF Root catalog.

◆ title

string FCFSupport::PDFPrinterDevice::title
private

Title string.