setClassDirectory( $class_directory ); $obj->default_font = TTi18n::getPDFDefaultFont(); return $obj; } else { Debug::text('Class File does not exist!', __FILE__, __LINE__, __METHOD__, 10); } return FALSE; } function addForm( $obj ) { if ( is_object( $obj ) ) { $this->objs[] = $obj; return TRUE; } return FALSE; } function Output( $type ) { $type = strtolower($type); //Initialize PDF object so all subclasses can access it. //Loop through all objects and combine the output from each into a single document. if ( $type == 'pdf' ) { $pdf = new TTPDF( 'P', 'mm', array( 207, 268 ) ); //US Letter size (215.9mm x 279.4mm) reduced by 4% (8.9mm x 11.4mm) and rounded to nearest mm. This should avoid the 96%/97% resize issue with 1" margins. $pdf->setMargins(0, 0, 0, 0); //Margins seem to only affect TCPDF, not actually how things are printed. $pdf->SetAutoPageBreak(FALSE); //$pdf->setFontSubsetting(FALSE); foreach( (array)$this->objs as $obj ) { $obj->setPDFObject( $pdf ); $obj->Output( $type ); } return $pdf->Output('', 'S'); } } } ?>