Dim gdpicturePDF As New GdPicturePDF()
Dim status As GdPictureStatus = gdpicturePDF.LoadFromFile("your_test_pdfa.pdf", False)
If status = GdPictureStatus.OK Then
Dim oConformance As PdfConformance = gdpicturePDF.GetPDFAConformance()
status = gdpicturePDF.GetStat()
If status = GdPictureStatus.OK Then
MessageBox.Show("This PDF conforms to " + oConformance.ToString() + " standard.", "Example: GetPDFAConformance")
Else
MessageBox.Show("The GetPDFAConformance() method has failed with the status: " + status.ToString(), "Example: GetPDFAConformance")
End If
Else
MessageBox.Show("The file can't be loaded.", "Example: GetPDFAConformance")
End If
If gdpicturePDF.CloseDocument() <> GdPictureStatus.OK Then
Return
End If
If gdpicturePDF.NewPDF(PdfConformance.PDF_A_1b) = GdPictureStatus.OK Then
Dim oConformance As PdfConformance = gdpicturePDF.GetPDFAConformance()
status = gdpicturePDF.GetStat()
If status = GdPictureStatus.OK Then
MessageBox.Show("This PDF conforms to " + oConformance.ToString() + " standard.", "Example: GetPDFAConformance") 'Should be PDF_A_1b.
Else
MessageBox.Show("The GetPDFAConformance() method has failed with the status: " + status.ToString(), "Example: GetPDFAConformance")
End If
Else
MessageBox.Show("The new file can't be created.", "Example: GetPDFAConformance")
End If
gdpicturePDF.Dispose()
GdPicturePDF gdpicturePDF = new GdPicturePDF();
GdPictureStatus status = gdpicturePDF.LoadFromFile("your_test_pdfa.pdf", false);
if (status == GdPictureStatus.OK)
{
PdfConformance oConformance = gdpicturePDF.GetPDFAConformance();
status = gdpicturePDF.GetStat();
if (status == GdPictureStatus.OK)
MessageBox.Show("This PDF conforms to " + oConformance.ToString() + " standard.", "Example: GetPDFAConformance");
else
MessageBox.Show("The GetPDFAConformance() method has failed with the status: " + status.ToString(), "Example: GetPDFAConformance");
}
else
{
MessageBox.Show("The file can't be loaded.", "Example: GetPDFAConformance");
}
if (gdpicturePDF.CloseDocument() != GdPictureStatus.OK)
return;
if (gdpicturePDF.NewPDF(PdfConformance.PDF_A_1b) == GdPictureStatus.OK)
{
PdfConformance oConformance = gdpicturePDF.GetPDFAConformance();
status = gdpicturePDF.GetStat();
if (status == GdPictureStatus.OK)
MessageBox.Show("This PDF conforms to " + oConformance.ToString() + " standard.", "Example: GetPDFAConformance"); //Should be PDF_A_1b.
else
MessageBox.Show("The GetPDFAConformance() method has failed with the status: " + status.ToString(), "Example: GetPDFAConformance");
}
else
{
MessageBox.Show("The new file can't be created.", "Example: GetPDFAConformance");
}
gdpicturePDF.Dispose();