HaruDoc::resetError

(PECL haru >= 0.0.1) Reset error state of the document handle bool HaruDoc::resetError ( void ) Once an error code is set, most of the operations, including I/O processing functions cannot be performed. In case if you want to continue after the cause of the error has been fixed, you have to invoke this function in order to reset the document error state. Returns: Always succeeds and returns TRU

HaruDoc::readFromStream

(PECL haru >= 0.0.1) Read data from the temporary stream string HaruDoc::readFromStream ( int $bytes ) Read data from the temporary stream. Parameters: bytes The bytes parameter specifies how many bytes to read, though the stream may contain less bytes than requested. Returns: Returns data from the temporary stream. Exc

HaruDoc::output

(PECL haru >= 0.0.1) Write the document data to the output buffer bool HaruDoc::output ( void ) Writes the document data into standard output. Returns: Returns TRUE on success. Exception: Throws a HaruException on error. See also: HaruDoc::save() -

HaruDoc::loadType1

(PECL haru >= 0.0.1) Load Type1 font string HaruDoc::loadType1 ( string $afmfile [, string $pfmfile ] ) Loads Type1 font from the given file and registers it in the PDF document. Parameters: afmfile Path to an AFM file. pfmfile Path to a PFA/PFB file, optional. If it's not set only the glyph data of the font is embedded into the PDF

HaruDoc::loadTTF

(PECL haru >= 0.0.1) Load TTF font file string HaruDoc::loadTTF ( string $fontfile [, bool $embed = false ] ) Loads the given TTF file and (optionally) embed its data into the document. Parameters: fontfile The TTF file to load. embed When set to TRUE, the glyph data of the font is embedded into the PDF file, otherwise only the matr

HaruDoc::loadTTC

(PECL haru >= 0.0.1) Load the font with the specified index from TTC file string HaruDoc::loadTTC ( string $fontfile, int $index [, bool $embed = false ] ) Loads the TrueType font with the specified index from a TrueType collection file. Parameters: fontfile The TrueType collection file. index The index of the font in the collection

HaruDoc::loadRaw

(PECL haru >= 0.0.1) Load a RAW image object HaruDoc::loadRaw ( string $filename, int $width, int $height, int $color_space ) Loads a RAW image. Parameters: filename The name of a RAW image file. width The width of the image. height The height of the image. color_space

HaruDoc::loadPNG

(PECL haru >= 0.0.1) Load PNG image and return HaruImage instance object HaruDoc::loadPNG ( string $filename [, bool $deferred = false ] ) Loads a PNG image. Libharu might be built without libpng support, in this case each call to this function would result in exception. Parameters: filename The name of a PNG image file. deferred

HaruDoc::loadJPEG

(PECL haru >= 0.0.1) Load a JPEG image object HaruDoc::loadJPEG ( string $filename ) Loads the specified JPEG image. Parameters: filename A valid JPEG image file. Returns: Returns a new HaruImage instance. Exception: Throws a HaruException on error. See also:

HaruDoc::insertPage

(PECL haru >= 0.0.1) Insert new page just before the specified page object HaruDoc::insertPage ( object $page ) Creates a new page and inserts just before the specified page. Parameters: page A valid HaruPage instance. Returns: Returns a new HaruPage instance. Exception: Throws a HaruException on error.