Table of Contents

Class SyntaxAnalyzerResult

Namespace
Syncfusion.Pdf.Parsing
Assembly
Syncfusion.Pdf.Portable.dll

Represernts the PDF document syntax analyzer result.

public class SyntaxAnalyzerResult : AnalyzerResult
Inheritance
SyntaxAnalyzerResult
Implements
Inherited Members

Examples

string filePath = "Input.pdf";   
//load the document
PdfDocumentAnalyzer analyzer = new PdfDocumentAnalyzer(filePath);
//Analyze the syntax issues.
SyntaxAnalyzerResult analyzerResult =  analyzer.AnalyzeSyntax();        
 if(analyzerResult.IsCorrupted)
 {
 throw new Exception("The document is corrupt");
 }
 analyzer.Close();

Properties

Errors

Gets the Syntax errors.

public List<PdfException> Errors { get; }

Property Value

List<PdfException>

IsCorrupted

Gets whether the document is corrupted or not.

public bool IsCorrupted { get; }

Property Value

bool

Examples

string filePath = "Input.pdf";   
//load the document
PdfDocumentAnalyzer analyzer = new PdfDocumentAnalyzer(filePath);
//Analyze the synyax issue
SyntaxAnalyzerResult analyzerResult = analyzer.AnalyzeSyntax();          
 if(analyzerResult.IsCorrupted)
 {
   throw new Exception("The document is corrupt");
 }
 analyzer.Close();