!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache. PHP/5.3.29 

uname -a: Linux tardis23.nocplanet.net 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024
x86_64
 

 

Safe-mode: OFF (not secure)

/opt/alt/pdflib-lite/usr/share/doc/alt-pdflib-lite/examples/php/   drwxr-xr-x
Free 978.47 GB of 1859.98 GB (52.61%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     starter_image.php (5.74 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
# $Id: starter_image.php,v 1.1.2.1 2007/12/29 23:26:05 rjs Exp $
# Starter image:
# Load and place an image using various options for scaling and positioning
#
# Place the image it its original size.
# Place the image with scaling and orientation to the west.
# Fit the image into a box with clipping.
# Fit the image into a box with proportional resizing.
# Fit the image into a box entirely.
#
# Required software: PDFlib Lite/PDFlib/PDFlib+PDI/PPS 7
# Required data: image file


# This is where the data files are. Adjust as necessary.
$searchpath "../data";
$title "Starter Image";

# create a new PDFlib object
$p PDF_new();

$imagefile "lionel.jpg";
$bw 400;
$bh 200;
$x 20;
$y 580;
$yoffset 260;

    
PDF_set_parameter($p"SearchPath"$searchpath);

    
# This means we must check return values of load_font() etc.
    
PDF_set_parameter($p"errorpolicy""return");

    if (
PDF_begin_document($p"""") == 0) {
    die(
"Error: " .  PDF_get_errmsg($p));
    }

    
PDF_set_info($p"Creator""PDFlib Cookbook");
    
$buf $title .  '  $Revision: 1.1.2.1 $';
    
PDF_set_info($p"Title"$buf);

    
# For PDFlib Lite: change "unicode" to "winansi"
    
$font PDF_load_font($p"Helvetica""winansi""");
    if (
$font == 0) {
    die(
"Error: " .  PDF_get_errmsg($p));
    }

    
# Load the image
    
$image PDF_load_image($p"auto"$imagefile"");
    if (
$image == 0) {
    die(
"Error: " .  PDF_get_errmsg($p));
    }

    
# Start page 1
    
PDF_begin_page_ext($p00"width=a4.width height=a4.height");
    
PDF_setfont($p$font12);


    
# ------------------------------------
    # Place the image in its original size
    # ------------------------------------
    

    # Position the image in its original size with its lower left corner
    # at the reference point (20, 380)
    
    
PDF_fit_image($p$image20380"");

    
# Output some descriptive text
    
PDF_fit_textline($p,
    
"The image is placed with the lower left corner in its original " .
    
"size at reference point (20, 380):"20820"");
    
PDF_fit_textline($p"fit_image(image, 20, 380, \"\");"20800"");


    
# --------------------------------------------------------
    # Place the image with scaling and orientation to the west
    # --------------------------------------------------------
    

    # Position the image with its lower right corner at the reference
    # point (580, 20).
    # "scale=0.5" scales the image by 0.5.
    # "orientate=west" orientates the image to the west.
    
    
PDF_fit_image($p$image58020,
    
"scale=0.5 position={right bottom} orientate=west");

    
# Output some descriptive text
    
PDF_fit_textline($p,
    
"The image is placed with a scaling of 0.5 and an orientation to " .
    
"the west with the lower right corner"580320,
    
"position={right bottom}");
    
PDF_fit_textline($p,
    
" at reference point (580, 20): fit_image(image, 580, 20, " .
    
"\"scale=0.5 orientate=west position={right bottom}\");",
    
580300"position={right bottom}");

    
PDF_end_page_ext($p"");

    
# Start page 2
    
PDF_begin_page_ext($p00"width=a4.width height=a4.height");
    
PDF_setfont($p$font12);


    
# --------------------------------------
    # Fit the image into a box with clipping
    # --------------------------------------
    

    # The "boxsize" option defines a box with a given width and height and
    # its lower left corner located at the reference point.
    # "position={right top}" positions the image on the top right of the
    # box.
    # "fitmethod=clip" clips the image to fit it into the box.
    
    
$buf "boxsize={" $bw " " $bh 
        
"} position={right top} fitmethod=clip";
    
PDF_fit_image($p$image$x$y$buf);

    
# Output some descriptive text
    
PDF_fit_textline($p,
    
"fit_image(image, x, y, \"boxsize={400 200} position={right top} " .
    
"fitmethod=clip\");"20$y+$bh+10"");


    
# ---------------------------------------------------
    # Fit the image into a box with proportional resizing
    # ---------------------------------------------------
    

    # The "boxsize" option defines a box with a given width and height and
    # its lower left corner located at the reference point.
    # "position={center}" positions the image in the center of the
    # box.
    # "fitmethod=meet" resizes the image proportionally until its height
    # or width completely fits into the box.
    # The "showborder" option is used to illustrate the borders of the box.
    
    
$buf "boxsize={" $bw " " $bh 
        
"} position={center} fitmethod=meet showborder";
    
PDF_fit_image($p$image$x$y-=$yoffset$buf);

    
# Output some descriptive text
    
PDF_fit_textline($p,
    
"fit_image(image, x, y, \"boxsize={400 200} position={center} " .
    
"fitmethod=meet showborder\");"20$y+$bh+10"");


    
# ---------------------------------
    # Fit the image into a box entirely
    # ---------------------------------
    

    # The "boxsize" option defines a box with a given width and height and
    # its lower left corner located at the reference point.
    # By default, the image is positioned in the lower left corner of the
    # box.
    # "fitmethod=entire" resizes the image proportionally until its height
    # or width completely fits into the box.
    
    
$buf =  "boxsize={" $bw " " $bh "} fitmethod=entire";
    
PDF_fit_image($p$image$x$y-=$yoffset$buf);

    
# Output some descriptive text
    
PDF_fit_textline($p,
    
"fit_image(image, x, y, \"boxsize={400 200} fitmethod=entire\");",
    
20$y+$bh+10"");

    
PDF_end_page_ext($p"");

    
PDF_close_image($p$image);

    
PDF_end_document($p"");

$buf PDF_get_buffer($p);
$len strlen($buf);

header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=hello.pdf");
print 
$buf;

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0451 ]--