MMOframework
Pourquoi l'IA Playground Bibliothèques Développeurs Agence
FR EN
Créer un projet en direct
Index

SafeFPDF

MMO\pdf · 1 symbole · générée le 30 Nov 2026

class

SafeFPDF

SafeFPDF.php:16

FPDF, reading only what Resources allows: an image (Image()) of an allowed folder or address, a font (AddFont(), a php file FPDF includes) of FPDF's font folder or an allowed one. What SimplePdf draws with; an application making its PDF with FPDF itself uses this class rather than \FPDF.

class MMO\pdf\SafeFPDF extends FPDF
Espace de noms
MMO\pdf
Étend
FPDF
$pdf = new \MMO\pdf\SafeFPDF(); $pdf->AddPage(); $pdf->Image($userUrl, 10, 10); // an eInvalid (403): an address that is not in Resources' `remote`

Index

AddFont($family, $style, $file, $dir)FPDF's, once the font's definition is checked: FPDF includes it, a php file
Image($file, $x, $y, $w, $h, $type, $link)FPDF's, once $file is checked (FPDF types none of its parameters: neither can this override)

Méthodes2

AddFont($family, $style, $file, $dir)

SafeFPDF.php:43

FPDF's, once the font's definition is checked: FPDF includes it, a php file

function AddFont($family, $style = '', $file = '', $dir = ''): void
$family
$style = ''
$file = ''the definition's name, in $dir (no /)
$dir = ''FPDF's font folder by default
retournevoid
lève(403) if the font's definition is neither in FPDF's font folder nor in an allowed one

Image($file, $x, $y, $w, $h, $type, $link)

SafeFPDF.php:28

FPDF's, once $file is checked (FPDF types none of its parameters: neither can this override)

function Image($file, $x = null, $y = null, $w = 0, $h = 0, $type = '', $link = ''): void
$filea local file, or an address Resources allows
$x = null
$y = null
$w = 0
$h = 0
$type = ''png, jpg, gif: the extension of $file by default
$link = ''
retournevoid
lève(403) if $file is neither in an allowed folder nor an allowed address
Membres hérités (146)
ConstantesDéclaré parDescription
VERSIONFPDF
PropriétésDéclaré parDescription
AliasNbPagesFPDF
AutoPageBreakFPDF
bMarginFPDF
bufferFPDF
cmapsFPDF
cMarginFPDF
ColorFlagFPDF
compressFPDF
CoreFontsFPDF
CreationDateFPDF
CurOrientationFPDF
CurPageSizeFPDF
CurrentFontFPDF
CurRotationFPDF
DefOrientationFPDF
DefPageSizeFPDF
DrawColorFPDF
encodingsFPDF
FillColorFPDF
FontFamilyFPDF
FontFilesFPDF
fontpathFPDF
fontsFPDF
FontSizeFPDF
FontSizePtFPDF
FontStyleFPDF
hFPDF
hPtFPDF
iconvFPDF
imagesFPDF
InFooterFPDF
InHeaderFPDF
kFPDF
lasthFPDF
LayoutModeFPDF
LineWidthFPDF
linksFPDF
lMarginFPDF
metadataFPDF
nFPDF
offsetsFPDF
pageFPDF
PageBreakTriggerFPDF
PageInfoFPDF
PageLinksFPDF
pagesFPDF
PDFVersionFPDF
rMarginFPDF
stateFPDF
StdPageSizesFPDF
TextColorFPDF
tMarginFPDF
underlineFPDF
wFPDF
WithAlphaFPDF
wPtFPDF
wsFPDF
xFPDF
yFPDF
ZoomModeFPDF
MéthodesDéclaré parDescription
AcceptPageBreak()FPDF
AddLink()FPDF
AddPage($orientation, $size, $rotation)FPDF
AliasNbPages($alias)FPDF
Cell($w, $h, $txt, $border, $ln, $align, $fill, $link)FPDF
Close()FPDF
Error($msg)FPDF
Footer()FPDF
GetPageHeight()FPDF
GetPageWidth()FPDF
GetStringWidth($s)FPDF
GetX()FPDF
GetY()FPDF
Header()FPDF
Line($x1, $y1, $x2, $y2)FPDF
Link($x, $y, $w, $h, $link)FPDF
Ln($h)FPDF
MultiCell($w, $h, $txt, $border, $align, $fill)FPDF
Output($dest, $name, $isUTF8)FPDF
PageNo()FPDF
Rect($x, $y, $w, $h, $style)FPDF
SetAuthor($author, $isUTF8)FPDF
SetAutoPageBreak($auto, $margin)FPDF
SetCompression($compress)FPDF
SetCreator($creator, $isUTF8)FPDF
SetDisplayMode($zoom, $layout)FPDF
SetDrawColor($r, $g, $b)FPDF
SetFillColor($r, $g, $b)FPDF
SetFont($family, $style, $size)FPDF
SetFontSize($size)FPDF
SetKeywords($keywords, $isUTF8)FPDF
SetLeftMargin($margin)FPDF
SetLineWidth($width)FPDF
SetLink($link, $y, $page)FPDF
SetMargins($left, $top, $right)FPDF
SetRightMargin($margin)FPDF
SetSubject($subject, $isUTF8)FPDF
SetTextColor($r, $g, $b)FPDF
SetTitle($title, $isUTF8)FPDF
SetTopMargin($margin)FPDF
SetX($x)FPDF
SetXY($x, $y)FPDF
SetY($y, $resetX)FPDF
Text($x, $y, $txt)FPDF
Write($h, $txt, $link)FPDF
_beginpage($orientation, $size, $rotation)FPDF
_checkoutput()FPDF
_dounderline($x, $y, $txt)FPDF
_enddoc()FPDF
_endpage()FPDF
_escape($s)FPDF
_getoffset()FPDF
_getpagesize($size)FPDF
_httpencode($param, $value, $isUTF8)FPDF
_isascii($s)FPDF
_loadfont($path)FPDF
_newobj($n)FPDF
_out($s)FPDF
_parsegif($file)FPDF
_parsejpg($file)FPDF
_parsepng($file)FPDF
_parsepngstream($f, $file)FPDF
_put($s)FPDF
_putcatalog()FPDF
_putfonts()FPDF
_putheader()FPDF
_putimage($info)FPDF
_putimages()FPDF
_putinfo()FPDF
_putlinks($n)FPDF
_putpage($n)FPDF
_putpages()FPDF
_putresourcedict()FPDF
_putresources()FPDF
_putstream($data)FPDF
_putstreamobject($data)FPDF
_puttrailer()FPDF
_putxobjectdict()FPDF
_readint($f)FPDF
_readstream($f, $n)FPDF
_textstring($s)FPDF
_tounicodecmap($uv)FPDF
_UTF8encode($s)FPDF
_UTF8toUTF16($s)FPDF
__construct($orientation, $unit, $size)FPDF