Breadcrumbs

MnFPDF

FPDF is a library that allows the creation of PDF documents. 

This library is a port of the FPDF PHP class (http://www.fpdf.org/). 


FPDF contains numerous functions for the design of documents.

  • Select the unit of measurement, adjust the page layout (portrait and landscape) and page spacing.

  • Automated header and footer generation

  • Automatic page change

  • Automatic line break and text alignment

  • Embedding PNG format images

  • RGB coloring for texts, lines and fillings

  • hyperlinks

  • Support of different character sets

Syntax

  Func_FbMnFPDF.bmp

C++
FUNCTION_BLOCK MnFPDF
VAR_INPUT
    FileName : STRING;
    itf_callback : MnFPDF_ITF;
    Buffer : DWORD;
    dwBufferSize : DWORD;
END_VAR
VAR_OUTPUT
    sError : STRING;
END_VAR


Parameters

Parameter 

Description

FileName 

file name

itf_callback 

Interface for callback functions. 

Buffer 

Buffer for data Intermediate storage of the individual pages (approx. 2x number of characters x number of pages) 

dwBufferSize 

Size of the transferred buffer. 

sError 

Output of error messages 



Example

C++
VAR
 pdf : MnFPDF;
 bCreatePDF: BOOL;
END_VAR

IF bCreatePDF THEN

 pdf.Init('P', 'mm', 'A4');
 pdf.AddPage('');
 pdf.SetFont('Arial','B',16);
 pdf.Cell(40,10,'Hello World!', '', 0, '', 0, '');
 pdf.Output('\test.pdf', 'F');

 bCreatePDF := FALSE;
END_IF


Requirements



Remarks

Not all functions are ported.