GetCompatibleStandards

Description

Gets the list of supported standards that are compatible with the specified standards, or the standards used by PDF document(s).

Applies to

PDFDocExtractor object

Syntax

boolean GetCompatibleStandards(PDFStandard inStandard[], ref PDFStandard possibleStandard[])
boolean GetCompatibleStandards(string inputPdfFiles[], ref PDFStandard possibleStandard[])

Argument

Description

inStandard[]

The standards against which to get the list of compatible standards.

inputPdfFiles[] The PDF documents against which to get the list of compatible standards.
possibleStandard[] The list standards that are compatible with the specified standards or PDF document(s).

Return value

Boolean. Returns true if it succeeds. Otherwise, returns false.

The table below shows the compatibility 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 gets the compatible standards for the list of specified PDF files:

pdfdocument lpdf_doc
PDFdocextractor lpdf_extract

lpdf_extract = create PDFdocextractor
lpdf_doc = create PDFdocument

string ls_pdffile[]
int li_count,li_i
long ll_return
PDFstandard lpdf_standard[],lpdf_outPutPDFFileStandard[]

//Specifies the files in the relative path
ls_pdffile = {"import\standard_1a.pdf","import\standard_1b.pdf","import\standard_3a.pdf","import\standard_3b.pdf","import\standard_3u.pdf"}

li_count = upperbound(ls_pdffile)
lpdf_extract.getcompatiblestandards( ls_pdffile, lpdf_outPutPDFFileStandard)
if upperbound(lpdf_outPutPDFFileStandard) <=0 then
messagebox("tips","There are no compatible standards for the specified files")
end if
messagebox("tip","The number of compatible standards="+string(upperbound(lpdf_outPutPDFFileStandard)))
//Merge the PDF documents
for li_i = 1 to li_count step 1
lpdf_doc.importpdf( ls_pdffile[li_i])
next
ll_return = lpdf_doc.save("D:\save\getcompatiblestandards_real.pdf",lpdf_outPutPDFFileStandard[2])

This example gets the standards of a number of PDF files first, and then gets the compatible standards:

pdfdocument lpdf_doc
PDFdocextractor lpdf_extract

lpdf_extract = create PDFdocextractor
lpdf_doc = create PDFdocument

string ls_pdffile[]
int li_count,li_i,li_standardIndex
long ll_return
PDFstandard lpdf_standard[],lpdf_outPutPDFFileStandard[]

//Specifies the files in the relative path
ls_pdffile = {"import\standard_1a.pdf","import\standard_1b.pdf","import\standard_3a.pdf","import\standard_3b.pdf","import\standard_3u.pdf"}

li_count = upperbound(ls_pdffile)
li_standardIndex = 1
//Gets the standards of the specified PDF files
for li_i = 1 to li_count step 1
 lpdf_extract.open( ls_pdffile[li_i])
 lpdf_standard[li_standardIndex] = lpdf_extract.getstandard( )
 li_standardIndex++
 lpdf_extract.close( )
next
lpdf_extract.getcompatiblestandards( lpdf_standard, lpdf_outPutPDFFileStandard)
if upperbound(lpdf_outPutPDFFileStandard) <=0 then
 messagebox("tips","There are no compatible standards for the specified files")
end if
messagebox("tip","The number of compatible standards="+string(upperbound(lpdf_outPutPDFFileStandard)))
//Merges the PDF files
for li_i = 1 to li_count step 1
 lpdf_doc.importpdf( ls_pdffile[li_i])
next
li_count = upperbound(lpdf_outPutPDFFileStandard)
//Saves all the compatible standards
for li_i = 1 to li_count
 ll_return = lpdf_doc.save("D:\save\getcompatiblestandards"+string(li_i)+"_real.pdf",lpdf_outPutPDFFileStandard[li_i])
next

See also

GetStandard

IsStandardCompatible