Example #1
0
// Special setup
$text .= add_text('Requires overtime', 'needs_overtime');
// Furniture
$text .= add_text('Requires furniture', 'needs_furniture');
// Special access
$text .= add_text('Requires special access', 'needs_special_access');
// Cleaning
$text .= add_text('Requires cleaning', 'needs_cleaning');
// Staff setup
$text .= add_text('Requires staff setup', 'needs_staff_setup');
// Equipment
$text .= add_text('Requires equipment', 'needs_equipment');
// Equipment provider
$text .= add_text('equipment provider');
// Account number
$text .= add_text('account number');
// # Sale items
// $text .= title('Sale Items');
// # items for sale?
// $text .= add_text('will there be items for sale', 'for_sale');
// # description of items
// $text .= add_text('items for sale');
// # who supplies items
// $text .= add_text('item supplier');
//
// # Cornell identity
// $text .= title('Use of Cornell Identity');
// # using identity?
// $text .= add_text('using Cornell identity', 'use_logo');
// # description
// $text .= add_text('description', 'logo_use_description');
Example #2
0
<?php

/**
 * Created by PhpStorm.
 * User: gujc
 * Date: 15-12-17
 * Time: 上午9:57
 */
define('DS', DIRECTORY_SEPARATOR);
$baseUri = dirname(__FILE__) . DS . 'images' . DS;
$combined = new Imagick();
for ($i = 1; $i < 3; $i++) {
    $im = new Imagick($baseUri . '00' . $i . '.jpg');
    $im->resizeImage(595, 842, imagick::FILTER_LANCZOS, 1, true);
    add_text($im, 'hello world', 100, 200, 0, array("font" => "SimHei", "font_size" => "30", "fill_color" => "black", "back_color" => "none"));
    $mask = new Imagick($baseUri . 'mask.png');
    $overlay = new Imagick($baseUri . 'overlay.png');
    add_mask($im, $mask);
    add_overlay($im, $overlay);
    $mask->destroy();
    $overlay->destroy();
    $combined->addImage($im);
    $im->destroy();
}
#$combined->resetIterator();
#$combined = $combined->appendImages(true);
#$combined->setPage(595,842,0,0);
$combined->setImageFormat('pdf');
#$fp = fopen('/home/gujc/Downloads/test.pdf','wb');
#$combined->writeImagesFile($fp);
$combined->writeImages($baseUri . 'test.pdf', true);
Example #3
0
function characterData($parser, $data)
{
    global $text;
    global $lang;
    add_text($data);
}