ePages 6.13.3 - DE_EPAGES/Core/API/PdfConverter.pm

Package DE_EPAGES::Core::API::PdfConverter

This package implements the PDF converter.

@EXPORT_OK
ConvertXhtml2Pdf
IsValidXhtml

Functions

ConvertXhtml2Pdf
IsValidXhtml

ConvertXhtml2Pdf

Converts a html document to a pdf document. Returns a binary pdf document.

Syntax
$PDF = ConvertXhtml2Pdf($HtmlCode);
Input
$Html (string)
html document
Return
$Pdf (binary)
pdf document

IsValidXhtml

Checks if sring is a valid xhtml document. The reference is not the W3C specification, but the java class org.xhtmlrenderer.pdf.ITextRenderer, which is more permissive. $hFlags = { 'isSnippet' => 1 };

Syntax
$isValidXhtml = IsValidXhtml($HtmlCode,$hFlags);
Input
$Html (String)
html document
$hFlags (ref.hash)
isSnippet - set this true if input is no real html document
(missing <html>, <body>..)
Return
$IsValid (boolean)
Flag showing the documents validity