Rasterizer 2017

AddPageRange

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

<!-- Example uses the .NET DLL which requires -->
<!-- Coldfusion 8 or above -->

<CFSCRIPT>
// Get current path
strPath = ExpandPath(".") & "\";


// Instantiate Object
oRAS = CreateObject(".NET", "APRasterizerNET.Rasterizer", "C:\Program Files\ActivePDF\Rasterizer\DotNetComponent\4.5\APRasterizerNET.dll");

// Open PDF
oRAS.OpenFile(strPath & "doc.pdf");

// Output Type
enumOutputFormatType = CreateObject(".NET", "APRasterizerNET.OutputFormatType", "C:\Program Files\ActivePDF\Rasterizer\DotNetComponent\4.5\APRasterizerNET.dll");
oRAS.Set_OutputFormat(enumOutputFormatType.OutFile);

// Set the file path for the created TIFF
oRAS.Set_OutputFileName(strPath & "doc.tiff");

// Set whether to include PDF annotations in the conversion
oRAS.Set_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 = 0;

// Process Complete
WriteOutput("Done!");
</CFSCRIPT>

Copyright © 2019 ActivePDF, Inc