Can someone help me figure out what is wrong here? I'm getting ad horribly vague Null exception.
var docxProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
var pdfProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();
RadFlowDocument document = new RadFlowDocument();
byte[] docBytes = File.ReadAllBytes(path);
document = docxProvider.Import(docBytes); ERROR HERE
var resultBytes = pdfProvider.Export(document);
File.WriteAllBytes(resultPath, resultBytes);
The document i'm trying to load contains tables and images within the tables (jpeg barcodes)
I have verified that pretty much every other tool i use can read the file without issue.
The goal is ultimately to export the file as a PDF.
Error details:
{"Object reference not set to an instance of an object."}
at Telerik.Windows.Documents.Flow.FormatProviders.Docx.Model.Elements.Document.ParagraphPropertiesElement.OnAfterRead(IDocxImportContext context)I created a test docx with the following text in a justified format:
"This is a brand-new document with justified text. Putting extra text into the paragraph in order to highlight the specific justified format text. This is simply test text in order to demonstrate the issue that I am having when I attempt to use the Telerik rad document find all."
I then upload the document into Session and save the file binary by converting the File.InputStream to Base64Stream.
I then create a find text of "This is simply test text".
The resulting IReadOnlyCollection<FindResult> of editor.FindAll(txtFind, false, true); contains one result with three runs.
"highlight the specific justified format text. This is simply"
"test"
"text in order to demonstrate the issue that I am having when I attempt to use the Telerik rad document find all.
I had assumed that setting match whole word would return a better result, but it does not.
I think I do not understand the concept of "runs". There is no other formatting other than justification.
I expected either the sentence that the text resides in to return OR the entire paragraph. Not three incomplete sentences, one just including one word.
Please try wps application to open docx file that generated by telerik document processing. www.wps.cn
header and footer are not displayed .
file was generated by ASP.NET Core WordsProcessing Key Features Demo | Telerik UI for ASP.NET Core
Hi,
I'm working on document word processing. My task is quite simple, basically I need to take a DOCX template, manipulate it by replacing some fields, with values taken from other parts, and adding some TableRow on it and, finally, I need to export it into PDF format.
This works but unfortunaley the PDF I see is not equal to the docx template from where I start, so do you know some workaround that may help me to fix this issue.
Thank you for your attention.