I am doing some document processing and want to use Telerik to display and edit. I need access to the paraId and textId elements of the docx "document" XML. I have explored the object model in the debugger and do not see these attributes. Are they available in the imported model?
Thanks.
The contents of an uploaded .docx file is being cut-off when converted to .pdf file.
Code snippet:
var fileFormatProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
using (MemoryStream inputFileStream = new MemoryStream())
{
this.fileSystemService.GetFile(documentInfo, inputFileStream);
if (fileFormatProvider != null)
{
var document = fileFormatProvider.Import(inputFileStream);
using (MemoryStream output = new MemoryStream())
{
var pdfProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();
pdfProvider.Export(document, output);
var newFile = new DocumentInfo()
{
NameWithPath = outputFileName,
DocumentLocation = documentInfo.DocumentLocation
};
this.fileSystemService.SaveFile(newFile, output);
}
}
Can someone confirm if this a Telerik side issue, or am I missing a setting or config?
Thanks!
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)firstly loading the document i have use
// Load the PDF document
var provider = new PdfFormatProvider();
var loadedDocument = provider.Import(inDocByte,null);
and after some functinality to export the document i have used below
Telerik.Documents.ImageUtils.ImagePropertiesResolver defaultImagePropertiesResolver = new Telerik.Documents.ImageUtils.ImagePropertiesResolver();
Telerik.Windows.Documents.Extensibility.FixedExtensibilityManager.ImagePropertiesResolver = defaultImagePropertiesResolver;
provider.Export(document, memoryStream, null);
outDocPdf = memoryStream.ToArray();
what was the problem can you tell me the solution for that exception
Unable to cast object of type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfLiteralString' to type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfName'. |