GroupDocs.Parser provides the functionality to export data to JSON or XML files. JsonExporter or XmlExporter classes are used for this. Also extensions methods from Extensions class can be used to simplify the code.
The following example shows how to extract barcodes from a document and export them to the JSON file:
// Create an instance of Parser classusing(Parserparser=newParser(Constants.SamplePdfWithBarcodes)){// Check if the document supports barcodes extractionif(!parser.Features.Barcodes){Console.WriteLine("Document doesn't support barcodes extraction.");return;}// Create the options which are used for barcodes extractionBarcodeOptionsoptions=newBarcodeOptions(QualityMode.Low,QualityMode.Low,"QR");// Extract barcodes from the documentIEnumerable<PageBarcodeArea>barcodes=parser.GetBarcodes(options);// Export data to "data.json" filebarcodes.ExportAsJson("data.json");}
More resources
GitHub examples
You may easily run the code above and see the feature in action in our GitHub examples:
Along with full featured .NET library we provide simple, but powerful free Apps.
You are welcome to parse documents and extract data from PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX, Emails and more with our free online Free Online Document Parser App.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.