Foxit PDF SDK
com.foxit.sdk.addon.compliance.PDFCompliance Class Reference
Inheritance diagram for com.foxit.sdk.addon.compliance.PDFCompliance:
com.foxit.sdk.common.Base

Public Member Functions

 PDFCompliance ()
 Constructor.

 
 PDFCompliance (PDFCompliance other)
 Constructor, with another PDF compliance object.
More...
 
ResultInformation convertPDFFile (String src_pdf_path, String saved_pdf_path, int convert_to_version, ProgressCallback progress_callback) throws com.foxit.sdk.PDFException
 Convert a PDF file to a specified PDF version.
More...
 
synchronized void delete ()
 Clean up related resources immediately. More...
 
boolean isEmpty ()
 Check whether current object is empty or not.
More...
 
ResultInformation verify (int verify_version, String src_pdf_path, int first_page_index, int last_page_index, ProgressCallback progress_callback) throws com.foxit.sdk.PDFException
 Verify a PDF file with specified PDF version.
More...
 

Detailed Description

This class can be used to convert the PDF version of a PDF file. Currently, support to convert to PDF 1.3/1.4/1.5/1.6/1.7. Please ensure ComplianceEngine has been initialized successfully.

See also
ComplianceEngine

Constructor & Destructor Documentation

◆ PDFCompliance()

com.foxit.sdk.addon.compliance.PDFCompliance.PDFCompliance ( PDFCompliance  other)

Constructor, with another PDF compliance object.

Parameters
[in]otherAnother PDF compliance object.

Member Function Documentation

◆ convertPDFFile()

ResultInformation com.foxit.sdk.addon.compliance.PDFCompliance.convertPDFFile ( String  src_pdf_path,
String  saved_pdf_path,
int  convert_to_version,
ProgressCallback  progress_callback 
) throws com.foxit.sdk.PDFException

Convert a PDF file to a specified PDF version.

Parameters
[in]src_pdf_pathA complete path of source PDF file to be converted. This should not be an empty string.
[in]saved_pdf_pathA complete path for saving the converted PDF file. This should not be an empty string.
[in]convert_to_versionAn integer that specifies the PDF version to convert to, for example value 14 means version "1.4", value 15 means "1.5", and etc. Currently, only support version values 13, 14, 15, 16, and 17. Specially, when version value is 13 (which means PDF 1.3):
  • if source PDF file contains transparency data, it will be converted to PDF 1.4 instead of PDF 1.3 (not support transparency). And user can check hit data in the returned ResultInformation object for more details.
  • if source PDF file does not contain any transparency data, it will be converted to PDF 1.3 as expected.

[in]progress_callbackProgress callback which is implemented by user and can be used to get progress data. This can be null.
Returns
A ResultInformation object.

◆ delete()

synchronized void com.foxit.sdk.addon.compliance.PDFCompliance.delete ( )

Clean up related resources immediately.

Returns
None.
Note
Once this function is called, current object cannot be used anymore.

Reimplemented from com.foxit.sdk.common.Base.

◆ isEmpty()

boolean com.foxit.sdk.addon.compliance.PDFCompliance.isEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ verify()

ResultInformation com.foxit.sdk.addon.compliance.PDFCompliance.verify ( int  verify_version,
String  src_pdf_path,
int  first_page_index,
int  last_page_index,
ProgressCallback  progress_callback 
) throws com.foxit.sdk.PDFException

Verify a PDF file with specified PDF version.

Parameters
[in]verify_versionPDF version to verify. An integer that specifies the PDF version to verify, for example value 14 means version "1.4", value 15 means "1.5", and etc. Currently, only support version values 13, 14, 15, 16, and 17. Specially, when version value is 13 (which means PDF 1.3). And user can check hit data in the returned ResultInformation object for more details.
[in]src_pdf_pathA complete path of source PDF file to be verified. This should not be an empty string.
[in]first_page_indexIndex of the first page to be verified, staring from 0.
[in]last_page_indexIndex of the last page to be verified. If this is -1, that means all the pages of the source PDF file will be verified and parameter first_page_index would be ignored.
[in]progress_callbackProgress callback which is implemented by user and can be used to get progress data. This can be null.
Returns
A ResultInformation object.