IPXC_Document::GetEncodersForStreamType Method

From Tracker Software PDF SDK
Jump to: navigation, search
Line 28: Line 28:
 
== Return Value ==
 
== Return Value ==
 
Returns S_OK if operation was successful or error code in other cases.
 
Returns S_OK if operation was successful or error code in other cases.
 +
 +
<pre class="brush:c#">//C#
 +
string str = "";
 +
PDFXEdit.IPXS_EncodeFiltersArray arrDef = pdfCtl.Doc.CoreDoc.GetEncodersForStreamType("Image.TrueColor");
 +
for (uint i = 0; i< arrDef.Count; i++)
 +
{
 +
uint atomId = arrDef.FilterName[i];
 +
str += pxsInst.AtomToStr(atomId) + "\n";
 +
}
 +
MessageBox.Show(str);
 +
</pre>
  
 
== See Also ==
 
== See Also ==
[[PXV:IPXC_Document|IPXC_Document]]
+
[[PXV:IPXC_Document|IPXC_Document]], [[PXV:IPXC_Document_SetEncodersForStreamType|IPXC_Document::SetEncodersForStreamType]], [[PXV:IPXS_EncodeFiltersArray|IPXS_EncodeFiltersArray]]

Revision as of 23:04, 23 June 2016


Gets encoders for current document.

Syntax

HRESULT GetEncodersForStreamType([in]           LPWSTR                     sType,
                                 [out, retval]  IPXS_EncodeFiltersArray**  pFilters);

Parameters

sType
[in] Value of LPWSTR.
Default encoders for stream type:
  • "Image.TrueColor"
  • "Image.Gray"
  • "Image.Indexed"
  • "Image.Monochrome"
  • "General"
  • "Fonts"
  • "Page.Content"
  • "Attachments"
pFilters
[out, retval] Pointer to IPXS_EncodeFiltersArray containing the encode filters array.

Return Value

Returns S_OK if operation was successful or error code in other cases.

//C#
string str = "";
PDFXEdit.IPXS_EncodeFiltersArray arrDef = pdfCtl.Doc.CoreDoc.GetEncodersForStreamType("Image.TrueColor");
for (uint i = 0; i< arrDef.Count; i++)
{
	uint atomId = arrDef.FilterName[i];
	str += pxsInst.AtomToStr(atomId) + "\n";
}
MessageBox.Show(str);

See Also

IPXC_Document, IPXC_Document::SetEncodersForStreamType, IPXS_EncodeFiltersArray