The WarningLevel property is used to read any warnings generated when opening a document. The warnings are related to features not supported by the PDF Creator.
Public ReadOnly Property WarningLevel() As Integer
public int WarningLevel [get]
Flag |
Value (Hex) |
Value (Dec) |
Description |
---|---|---|---|
PDF_WRN_SEVERE |
0x80000000 |
-2147483648 |
Indicates a severe condition that should not be ignored. This flag is combined with one of the following flags. |
PDF_WRN_LZW |
0x00000001 |
1 |
PDF document contains LZW compression (Obsolete as of version 2). |
PDF_WRN_CANNOT_EXTRACT_FONT |
0x00000002 |
2 |
Document contains a font that was not extracted properly. |
PDF_WRN_CANNOT_EXTRACT_IMAGE |
0x00000004 |
4 |
Document contains an image that was not extracted properly. |
PDF_WRN_UNSUPPORTED_COLORSPACE |
0x00000008 |
8 |
Unsupported color-space, will result in some color distortion. |
PDF_WRN_SIGNATURE_NOT_RECOGNIZED |
0x00000010 |
16 |
Document contains a digital signature that the PDF Creator could not recognize. |
PDF_WRN_SIGNATURE_NOT_VALID |
0x00000020 |
32 |
Document contains a digital signature that the PDF Creator could not validate. |
PDF_WRN_CANNOT_READ_PDFCREATOR_CONTENT |
0x00000400 |
1024 |
PDF file contains Amyuni custom design information that was ignored during load. |
PDF_WRN_ERROR_READING_DOCUMENT |
0x00000800 |
2048 |
General error while loading document, check the error log for more details. |
PDF_WRN_NEW_XREF_FORMAT |
0x00001000 |
4096 |
PDF file uses the compressed XRef file format which is not compatible with versions earlier than 4 and with some external tools such as search engines. |
PDF_WRN_CANNOT_FIND_FONT_CMAP |
0x00002000 |
8192 |
PDF file contains a font that required an external character map. |
PDF_WRN_FILE_NOT_FOUND |
0x00004000 |
16384 |
Filename passed as parameter to Open or OpenEx is not found. |
PDF_WRN_XFA_NOT_SUPPORTED |
0x00008000 |
32768 |
File contains XFA forms, some elements might be missing when rendering the file. |
PDF_WRN_PDFCONTENT_OPERAND_OPERATOR_MISMATCH |
0x00040000 |
262144 |
Encountered operator with wrong number of arguments in page stream. |
PDF_WRN_INVALID_DATA_BEFORE_HEADER (* added in version 5.5.1.5) |
0x00080000 |
524288 |
Invalid data encountered and ignored before the %PDF tag. |
(*) NOTE: Converting from HEX DWORD, unsigned and 32-bit unit of data
Member of Amyuni.PDFCreator.IacDocument.
Private Sub Sample()
' Constants for Activation codes
Const strLicenseTo As String = "Amyuni PDF Creator .NET Evaluation"
Const strActivationCode As String = "07EFCDAB0100010025C3B7B351579FF94C49112EAF7368612744C7237C2F6A215A53E83A9ECCFFE54C52063CB05338BDE555773D7B1B"
' Initialize library
' This should be done once
acPDFCreatorLib.Initialize()
' set license key This is needed only with licensed version
acPDFCreatorLib.SetLicenseKey(strLicenseTo, strActivationCode)
' Create new stream object
Dim fileRead As System.IO.Stream = System.IO.File.OpenRead("C:\temp\PDFDocument.pdf")
' Create a new PDF document
Dim doc As New Amyuni.PDFCreator.IacDocument()
' Open stream
Dim Password As String = ""
doc.Open(fileRead, Password)
' Show warning level
MsgBox(Hex(doc.WarningLevel))
' Close the stream
fileRead.Close()
' terminate library to free resources
acPDFCreatorLib.Terminate()
' destroy objects
doc.Dispose()
End Sub
public void WarningLevel()
{
// Constants for Activation codes
const string strLicenseTo = "Amyuni PDF Creator .NET Evaluation";
const string strActivationCode = "07EFCDAB0100010025C3B7B351579FF94C49112EAF7368612744C7237C2F6A215A53E83A9ECCFFE54C52063CB05338BDE555773D7B1B";
// Initialize library
// This should be done once
acPDFCreatorLib.Initialize();
// set license key This is needed only with licensed version
acPDFCreatorLib.SetLicenseKey(strLicenseTo, strActivationCode);
// Create new stream object
System.IO.FileStream fileRead = new System.IO.FileStream("C:\\temp\\PDFDocument.pdf",
System.IO.FileMode.Open,
System.IO.FileAccess.Read,
System.IO.FileShare.Read);
// Create a new PDF document
Amyuni.PDFCreator.IacDocument doc = new Amyuni.PDFCreator.IacDocument();
// Open stream
String password = "";
doc.Open(fileRead, password);
// Show warning level
MessageBox.Show(doc.WarningLevel.ToString());
// Close the stream
fileRead.Close();
// terminate library to free resources
acPDFCreatorLib.Terminate();
// destroy objects
doc.Dispose();
}