Rasterizer 2017

Convert PDF to Multi.page TIFF

<?php
// Copyright (c) 2019 ActivePDF, Inc.
// ActivePDF Rasterizer 2017
// Example generated 09/16/19 
?>

<?php
// Get current path
$strPath = dirname(__FILE__) . "\\";

// Instantiate Object
$oRAS = new COM("APRasterizer.Object");

// Open PDF
$oRAS->OpenFile($strPath . "doc.pdf");

// Output Type
// 1 = Stream
// 2 = File
$oRAS->OutputFormat = 2;

// Set the file path for the created TIFF
$oRAS->OutputFileName = $strPath . "doc.tiff";

// Set whether to include PDF annotations in the conversion
$oRAS->IncludeAnnotations = true;

// Set the pages to convert
$oRAS->AddPageRange(1, 2);
$oRAS->AddPageRange(4, 4);

// Create the TIFF
$oRAS->CreateMultipageTIFF();

// Finished with PDF, close file
$oRAS->CloseFile();

// Release Object
$oRAS = null;

// Process Complete
echo "Done!";
?>

Copyright © 2019 ActivePDF, Inc