SetJBIG2PMSThreshold Method (GdPicturePDF)
In This Topic
Changes the threshold of JBIG2 encoder pattern matching and substitution (PMS). The value can be set in range form 0 to 1. Any number lower than 1 may lead to lossy compression. Default value is 0.75.
Syntax
'Declaration
Public Sub SetJBIG2PMSThreshold( _
ByVal As Single _
)
public void SetJBIG2PMSThreshold(
float
)
public procedure SetJBIG2PMSThreshold(
: Single
);
public function SetJBIG2PMSThreshold(
: float
);
public: void SetJBIG2PMSThreshold(
float
)
public:
void SetJBIG2PMSThreshold(
float
)
Parameters
- Threshold
- Specifies new threshold value between 0 and 1.
Example
How to set the JBIG2 PMS threshold correctly.
Dim gdpicturePDF As New GdPicturePDF()
'Firstly, create or load the PDF document.
If gdpicturePDF.LoadFromFile("test.pdf", False) = GdPictureStatus.OK Then
'Set the required parameter.
gdpicturePDF.SetJBIG2PMSThreshold(1)
'Process your document here, for example, add a bitonal image.
Else
MessageBox.Show("The file can't be loaded.", "Example: SetJBIG2PMSThreshold")
End If
gdpicturePDF.Dispose()
GdPicturePDF gdpicturePDF = new GdPicturePDF();
//Firstly, create or load the PDF document.
if (gdpicturePDF.LoadFromFile("test.pdf", false) == GdPictureStatus.OK)
{
//Set the required parameter.
gdpicturePDF.SetJBIG2PMSThreshold(1);
//Process your document here, for example, add a bitonal image.
}
else
MessageBox.Show("The file can't be loaded.", "Example: SetJBIG2PMSThreshold");
gdpicturePDF.Dispose();
Example
How to set the JBIG2 PMS threshold correctly.
Dim gdpicturePDF As New GdPicturePDF()
'Firstly, create or load the PDF document.
If gdpicturePDF.LoadFromFile("test.pdf", False) = GdPictureStatus.OK Then
'Set the required parameter.
gdpicturePDF.SetJBIG2PMSThreshold(1)
'Process your document here, for example, add a bitonal image.
Else
MessageBox.Show("The file can't be loaded.", "Example: SetJBIG2PMSThreshold")
End If
gdpicturePDF.Dispose()
GdPicturePDF gdpicturePDF = new GdPicturePDF();
//Firstly, create or load the PDF document.
if (gdpicturePDF.LoadFromFile("test.pdf", false) == GdPictureStatus.OK)
{
//Set the required parameter.
gdpicturePDF.SetJBIG2PMSThreshold(1);
//Process your document here, for example, add a bitonal image.
}
else
MessageBox.Show("The file can't be loaded.", "Example: SetJBIG2PMSThreshold");
gdpicturePDF.Dispose();
See Also