op.document.exportToImages

From PDF XChange PDF SDK
Jump to: navigation, search
(Automatic page editing by robot)
 
Line 6: Line 6:
  
 
== Overview ==
 
== Overview ==
The operation overview...
+
The operation allows to export document pages to the image files with given DPI, zoom factor and specified format.
  
 
== Parameters ==
 
== Parameters ==
Line 26: Line 26:
 
| Dictionary with options of the operation.
 
| Dictionary with options of the operation.
 
|}
 
|}
 +
 +
== Sample ==
 +
<pre class="brush:c#">//C#
 +
private void ExportToImages(PDFXEdit.IPXV_Document Doc, PDFXEdit.PXV_Inst Inst)
 +
{
 +
int nID = Inst.Str2ID("op.document.exportToImages", false);
 +
PDFXEdit.IOperation Op = Inst.CreateOp(nID);
 +
PDFXEdit.ICabNode input = Op.Params.Root["Input"];
 +
input.Add().v = Doc;
 +
PDFXEdit.ICabNode options = Op.Params.Root["Options"];
 +
options["PagesRange.Type"].v = "Exact";
 +
options["PagesRange.Text"].v = "1-3";
 +
options["DestFolder"].v = "D:\\TestFolder\\"; //Output folder
 +
options["ExportMode"].v = "AllToMutliPage";
 +
options["Zoom"].v = 150;
 +
//Saving as tiff
 +
PDFXEdit.ICabNode fmtParams = options["FormatParams"];
 +
//Compression type
 +
fmtParams["COMP"].v = 5; //LZW compression
 +
//X DPI
 +
fmtParams["DPIX"].v = 150;
 +
//Y DPI
 +
fmtParams["DPIY"].v = 150;
 +
//Image format
 +
fmtParams["FMT"].v = 1414088262; //TIFF
 +
//Image type
 +
fmtParams["ITYP"].v = 16; //24 TrueColor
 +
//Use Predictor
 +
fmtParams["PRED"].v = 1; //Yes
 +
//Thumbnail
 +
fmtParams["ITYP"].v = 0; //No
 +
 +
Op.Do();
 +
}
 +
</pre>

Revision as of 00:49, 22 February 2016


Overview

The operation allows to export document pages to the image files with given DPI, zoom factor and specified format.

Parameters

Name Type Description
Input Array Array of IUnknown-based objects.
Output Array Array of IUnknown-based objects.
Options Dictionary Dictionary with options of the operation.

Sample

//C#
private void ExportToImages(PDFXEdit.IPXV_Document Doc, PDFXEdit.PXV_Inst Inst)
{
	int nID = Inst.Str2ID("op.document.exportToImages", false);
	PDFXEdit.IOperation Op = Inst.CreateOp(nID);
	PDFXEdit.ICabNode input = Op.Params.Root["Input"];
	input.Add().v = Doc;
	PDFXEdit.ICabNode options = Op.Params.Root["Options"];
	options["PagesRange.Type"].v = "Exact";
	options["PagesRange.Text"].v = "1-3";
	options["DestFolder"].v = "D:\\TestFolder\\"; //Output folder
	options["ExportMode"].v = "AllToMutliPage";
	options["Zoom"].v = 150;
	//Saving as tiff
	PDFXEdit.ICabNode fmtParams = options["FormatParams"];
	//Compression type
	fmtParams["COMP"].v = 5; //LZW compression
	//X DPI
	fmtParams["DPIX"].v = 150;
	//Y DPI
	fmtParams["DPIY"].v = 150;
	//Image format
	fmtParams["FMT"].v = 1414088262; //TIFF
	//Image type
	fmtParams["ITYP"].v = 16; //24 TrueColor
	//Use Predictor
	fmtParams["PRED"].v = 1; //Yes
	//Thumbnail
	fmtParams["ITYP"].v = 0; //No

	Op.Do();
}