IsStandardCompatible

Description

Checks whether the standard used by the current PDF document is compatible with the specified standard.

Applies to

PDFDocExtractor object

Syntax

boolean IsStandardCompatible(PDFStandard standard)

Argument

Description

standard

The PDFStandard is the enumerated data type indicating the level of PDF/A conformance. Values are:

  • PDF_None! (Default)

  • PDFA_1a!

  • PDFA_1b!

  • PDFA_3a!

  • PDFA_3b!

  • PDFA_3u!

  • PDF_Unknown! (It is unsupported to specify PDF_Unknown! as the argument value here because PDF_Unknown! is regarded as not compatible with any standard).


Return value

Boolean. Returns true if the standard used by the current PDF document is compatible with the specified standard. Otherwise, returns false. Note that if the standard of a document is PDF_Unknown!, the standard is not compatible with any supported standard.

The follow table shows the compatibilities between the supported PDF/A standards:

PDF/A standard compatibility PDFA_1a! PDFA_1b! PDFA_3a! PDFA_3b! PDFA_3u!
PDFA_1a! Yes No No No No
PDFA_1b! Yes Yes No No No
PDFA_3a! Yes No Yes No No
PDFA_3b! Yes Yes Yes Yes Yes
PDFA_3u! Yes No Yes No Yes

Examples

This example checks the standard of the "standard_1b.pdf" document is compatible with pdfa_3u!:

PDFdocument lpdf_doc
PDFdocextractor lpdf_extract

lpdf_extract = create PDFdocextractor
lpdf_doc = create PDFdocument

long ll_return
boolean lb_standard
PDFstandard lpdf_standard,lpdf_getstandard

lpdf_extract.open( "import\standard_1b.pdf")
//Gets the standard of the document
lpdf_getstandard = lpdf_extract.getstandard( )

lpdf_standard =  pdfa_3u!

//Checks whether the standard of the document is compatible with pdfa_3u!
lb_standard = lpdf_extract.isstandardcompatible( lpdf_standard)
lpdf_extract.close( )
if lb_standard then
 lpdf_doc.importpdf( "import\standard_1b.pdf")
 ll_return = lpdf_doc.save("D:\save\getstandards_real.pdf",lpdf_standard)
 messagebox("tips","standard compliant and success")
else
 messagebox("tips","Not Compatible with Specified Standards")
end if

See also

GetStandard

GetCompatibleStandards