예제 #1
0
파일: PlotAsPDF.php 프로젝트: kanbang/Colt
}
//Uncomment to see the legend and map image urls
//var_dump($filelocation);
//var_dump($legendfilelocation);
//die;
// Draw Map
$pdf->Image($filelocation, $margin[2], $margin[0], $printSize->width, $printSize->height, "PNG", "", "", false, $printDpi, "", false, false, 1, false, false, false);
// Draw legend if specified
if ($showLegend) {
    $pdf->Image($legendfilelocation, $margin[2], $margin[0], $legendWidth, $printSize->height, "PNG", "", "", false, $printDpi, "", false, false, 1, false, false, false);
}
// Draw coordiates if specified
$mExt = NULL;
if ($showCoordinates) {
    // Draw Extent coordinates
    $mExt = DrawExtentCS();
}
// Close and output PDF document
if (strlen($title) == 0) {
    $pdf->Output('Map.pdf', 'I');
} else {
    $pdf->Output($title . '.pdf', 'I');
}
?>

<?php 
class Metrics
{
    public $x;
    public $y;
    public $w;
예제 #2
0
파일: PlotAsPDF.php 프로젝트: kanbang/Colt
$pdf->setPrintFooter(false);
// Set default font size
$pdf->SetFont($font, "", 16, "", true);
// Add a page
$pdf->AddPage();
// Draw legend if specified
if ($showLegend) {
    $pdf->Image($legendfilelocation, $margin[2], $margin[0], $legendWidth, $printSize->height, "PNG", "", "", false, $printDpi, "", false, false, 1, false, false, false);
}
// Draw Map first, so if the margin is not enough for the Text, the Text will be displayed about the image
$pdf->Image($filelocation, $margin[2] + $legendWidth, $margin[0], $printSize->width, $printSize->height, "PNG", "", "", false, $printDpi, "", false, false, 1, false, false, false);
// Draw Title
DrawTitle();
if ($showCoordinates) {
    // Draw Extent coordinates
    DrawExtentCS();
}
if ($showScaleBar) {
    // Draw Scale
    DrawScale();
}
// Draw declaration
DrawDeclaration();
// Close and output PDF document
$pdf->Output($title . '.pdf', 'I');
?>

<?php 
class Size
{
    public $width;