In Development
Last Updated: 26 Apr 2024 17:11 by ADMIN
Embedding a TrueType font collection using the FontsRepository.RegisterFont method leads to glyphs with empty outlines collection. The missing outlines are caused due to an empty glyf and loca tables of the TrueType font file.
In Development
Last Updated: 26 Apr 2024 17:07 by ADMIN
A dictionary with an invalid entry cannot be imported correctly and breaks the import process. 
Unplanned
Last Updated: 26 Apr 2024 14:16 by Xiao

This is the code snippet that reproduces the error:

            RadFlowDocument flowDocument = new RadFlowDocument();
            RadFlowDocumentEditor editor = new RadFlowDocumentEditor(flowDocument);
            Bookmark bookmark = new Bookmark(flowDocument, "Name");
            editor.InsertInline(bookmark.BookmarkRangeStart);

            Table table = editor.InsertTable(1, 2);
            TableCell cell1 = table.Rows[0].Cells[0];
            Paragraph cell_paragraph1 = cell1.Blocks.AddParagraph();
            editor.MoveToParagraphStart(cell_paragraph1);
            editor.InsertText("cell content 01");

            TableCell cell2 = table.Rows[0].Cells[1];
            Paragraph cell_paragraph2 = cell2.Blocks.AddParagraph();
            editor.MoveToParagraphStart(cell_paragraph2);
            editor.InsertText("cell content 02");

            editor.MoveToTableEnd(table);
            editor.InsertInline(bookmark.BookmarkRangeEnd); 

            RadFlowDocument newFlowDocument = new RadFlowDocument();
            RadFlowDocumentEditor editor02 = new RadFlowDocumentEditor(newFlowDocument);
            editor.InsertDocument(flowDocument);

Workaround: Insert one bookmark before the table and another one after the table: 

            RadFlowDocument flowDocument = new RadFlowDocument();
            RadFlowDocumentEditor editor = new RadFlowDocumentEditor(flowDocument);
            //Bookmark bookmark = new Bookmark(flowDocument, "Name");
            //editor.InsertInline(bookmark.BookmarkRangeStart);

            editor.InsertBookmark("before");

            Table table = editor.InsertTable(1, 2);
            TableCell cell1 = table.Rows[0].Cells[0];
            Paragraph cell_paragraph1 = cell1.Blocks.AddParagraph();
            editor.MoveToParagraphStart(cell_paragraph1);
            editor.InsertText("cell content 01");

            TableCell cell2 = table.Rows[0].Cells[1];
            Paragraph cell_paragraph2 = cell2.Blocks.AddParagraph();
            editor.MoveToParagraphStart(cell_paragraph2);
            editor.InsertText("cell content 02");

            editor.MoveToTableEnd(table);

            editor.InsertBookmark("after");

            //editor.InsertInline(bookmark.BookmarkRangeEnd); 

            RadFlowDocument newFlowDocument = new RadFlowDocument();
            RadFlowDocumentEditor editor02 = new RadFlowDocumentEditor(newFlowDocument);
            editor.InsertDocument(flowDocument);

 

 

Duplicated
Last Updated: 26 Apr 2024 12:52 by ADMIN
ADMIN
Created by: Deyan
Comments: 0
Category: SpreadProcessing
Type: Feature Request
1
This would allow repeating header rows on every printed page. More information related to this functionality may be found on the following link:

https://support.office.com/en-us/article/Print-rows-with-column-headers-on-top-of-every-page-d3550133-f6a1-4c72-ad70-5309a2e8fe8c
Unplanned
Last Updated: 26 Apr 2024 08:37 by ADMIN

When calling a PDF export in a high-concurrency environment the internal state can get corrupted because it uses a non-thread safe collection internally.

Sample code:

void WriteToPdf(RadFlowDocument document, Stream outputStream) {

   PdfFormatProvider pdfWriter = new() {};

   pdfWriter.Export(document, outputStream);
}

When calling it like this:

Parallel.ForEachAsync(listOfDocuments, (document, _) => {
   WriteToPdf(document, Stream.Null);
});

An exception may occur:

System.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
   at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
   at Telerik.Windows.Documents.Fixed.Model.Fonts.FontsRepository.TryCreateFont(FontFamily fontFamily, FontStyle fontStyle, FontWeight fontWeight, FontBase& font)
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Utils.Extensions.CopyPropertiesFrom(CharacterProperties fixedProperties, PdfExportContext context, CharacterProperties properties)
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.CreateListLevel(ListLevel flowLevel)
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.CreateList(List flowList)
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportDocument(RadFlowDocument document, RadFixedDocumentEditor editor)
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportInternal()
   at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Export(T document, Stream output)
   at xxxxx.Application.Common.PdfGeneration.PdfWriter.WriteToPdf(RadFlowDocument document, Stream outputStream) 

The state is then corrupted forever, until the application is restarted.

Realistic scenario where this is also reproduced: Web application that generates PDFs and is called concurrently.

 

Need More Info
Last Updated: 26 Apr 2024 08:37 by Vitalii
Created by: Vitalii
Comments: 2
Category: PdfProcessing
Type: Bug Report
1
Hi.

I'm currently working with the large PDFs. I'm able to process PDFs up to 2.1 GB easily without any error using Telerik Document Processing. However, if I take a larger PDF (e.g. 2.8 GB), PdfFormatProvider.Import throws an IOException with the next message: "The parameter is incorrect. : {path}".
I'm using FileStream to provide a sample for the Import method.

I've checked it with the different samples, all have the same behavior. So, I guess, it will work for any PDF larger than 2.1 GB.
Unplanned
Last Updated: 25 Apr 2024 03:00 by David
After successful importing of DOCX with ordered list of TOC, try exporting it to PDF format. 
Unplanned
Last Updated: 24 Apr 2024 12:37 by Jean-Pierre
PdfFormatProvider: NetStandard: Converting multiple XLSX copies to PDF with separate SpreadFixedTextMeasurers generates a different first document. 
In Development
Last Updated: 24 Apr 2024 09:24 by ADMIN
Sometimes when an XLSX file has a combo chart, you can get an error on import "The axes are incorrectly paired.". This happens when a combo chart has secondary axes and the file has likely been produced by an application other than Excel.
Unplanned
Last Updated: 24 Apr 2024 08:05 by Sudhakar

Incorrectly resolved fill between local formatting and cell style.

A fill (fillId) of a cell style (cellStyleXfs) is respected instead of the fill (fillId) of the local formatting (cellXfs).

Unplanned
Last Updated: 19 Apr 2024 08:44 by Noe
Created by: Noe
Comments: 0
Category: SpreadProcessing
Type: Feature Request
1
Add support for R1C1 formula style.
In Development
Last Updated: 18 Apr 2024 12:13 by ADMIN
When merging documents with exactly the same font but different character widths, some characters are rendered with the wrong width.

In Development
Last Updated: 18 Apr 2024 12:11 by ADMIN

This is the code used for merging:

        private  void MergeDifferentDocumentsPagesWithFixed()
        {
            string[] documentsToMerge =
            {
                "14301-STOCK_Proforma.pdf",
                "14302-STOCK_Proforma.pdf",
                "14303-STOCK_Proforma.pdf",
                "14304-STOCK_Proforma.pdf",
                "14305-STOCK_Proforma.pdf",
                "14330-STOCK_Proforma.pdf"
            };
            RadFixedDocument doc = new RadFixedDocument();
            PdfFormatProvider provider = new PdfFormatProvider();
            foreach (string current_item in documentsToMerge)
            {
                string path = @"..\..\Samples\" + current_item;
                RadFixedDocument docToMerge;
                if (!File.Exists(path))
                {
                    continue;
                }
                using (Stream stream = File.OpenRead(path))
                {
                    docToMerge = provider.Import(stream);
                }
                doc.Merge(docToMerge);
            }


            string outputFilePath = @"..\..\mergedFixed.pdf";
            File.Delete(outputFilePath);

            using (Stream output = File.OpenWrite(outputFilePath))
            {
                provider.Export(doc, output);
            }
            Process.Start(new ProcessStartInfo() { FileName = outputFilePath, UseShellExecute = true });


        }

Workaround:  

   private void MergeDifferentDocumentsPages(string resultFileName)
   {
       string[] documentsToMerge =
       {
           "14301-STOCK_Proforma.pdf",
           "14302-STOCK_Proforma.pdf",
           "14303-STOCK_Proforma.pdf",
           "14304-STOCK_Proforma.pdf",
           "14305-STOCK_Proforma.pdf",
           "14330-STOCK_Proforma.pdf"
       };

       File.Delete(resultFileName);
       using (PdfStreamWriter fileWriter = new PdfStreamWriter(File.OpenWrite(resultFileName)))
       {
           foreach (string documentName in documentsToMerge)
           {
               string path = @"..\..\Samples\" + documentName;
               using (PdfFileSource fileToMerge = new PdfFileSource(File.OpenRead(path)))
               {
                   foreach (PdfPageSource pageToMerge in fileToMerge.Pages)
                   {
                       fileWriter.WritePage(pageToMerge);
                   }
               }
           }
       }


      
       Process.Start(new ProcessStartInfo() { FileName = resultFileName, UseShellExecute = true });
   }

Duplicated
Last Updated: 18 Apr 2024 06:22 by ADMIN
Created by: Martin
Comments: 0
Category: PdfProcessing
Type: Feature Request
2
An implementation of JPXDecoder should be created to allow the decompression of data encoded using the wavelet-based JPEG2000 standard.

Guidelines of how to provide a custom implementation of the JPXDecode filter can be found in the Customize Rendering section of the documentation and a sample implementation can be found in the SDK examples.
Unplanned
Last Updated: 18 Apr 2024 05:36 by Sujith

This is the code snippet for reproducing the error message: 

        static void Main(string[] args)
        {
            string filePath = "Lorem ipsum dolor sit amet.pdf";
            //load a random document
            PdfFormatProvider provider = new PdfFormatProvider();
            RadFixedDocument originalDocument;
            using (Stream stream = File.OpenRead(filePath))
            {
                originalDocument = provider.Import(stream);
            }
            //draw something on the first page
            FixedContentEditor editor = new FixedContentEditor(originalDocument.Pages[0]);
            editor.GraphicProperties.IsFilled = true;
            editor.GraphicProperties.FillColor = RgbColors.Black;
            Telerik.Documents.Primitives.Rect Rect = new Telerik.Documents.Primitives.Rect(10, 10, 200, 100);
            editor.DrawRectangle(Rect);

            //export the pages as images and build a brand new document from the images
            SkiaImageFormatProvider imageProvider = new SkiaImageFormatProvider();
            imageProvider.ExportSettings.ImageFormat = SkiaImageFormat.Jpeg;
            imageProvider.ExportSettings.ScaleFactor = 0.8;
            imageProvider.ExportSettings.Quality = 80;


            RadFixedDocument doc = new RadFixedDocument();
            foreach (RadFixedPage page in originalDocument.Pages)
            {
                byte[] resultImage = imageProvider.Export(page);
                RadFixedPage pdfpage = doc.Pages.AddPage();
                editor = new FixedContentEditor(pdfpage);
                Stream imageStream = new MemoryStream(resultImage);
                editor.DrawImage(imageStream);
            }

            //export the pdf built from the images
            PdfFormatProvider pdfFormatProvider = new PdfFormatProvider();
            string outputPdf = @"output.pdf";
            File.Delete(outputPdf);
            using (Stream output = File.OpenWrite(outputPdf))
            {
                pdfFormatProvider.Export(doc, output);
            }
            Process.Start(new ProcessStartInfo() { FileName = outputPdf, UseShellExecute = true });
        }

Workaround:

        static void Main(string[] args)
        {
            string filePath = "Lorem ipsum dolor sit amet.pdf";
            //load a random document
            PdfFormatProvider provider = new PdfFormatProvider();
            RadFixedDocument originalDocument;
            using (Stream stream = File.OpenRead(filePath))
            {
                originalDocument = provider.Import(stream);
            }
            //draw something on the first page
            FixedContentEditor editor = new FixedContentEditor(originalDocument.Pages[0]);
            editor.GraphicProperties.IsFilled = true;
            editor.GraphicProperties.FillColor = RgbColors.Black;
            Telerik.Documents.Primitives.Rect Rect = new Telerik.Documents.Primitives.Rect(10, 10, 200, 100);
            editor.DrawRectangle(Rect);

            using (Stream output = File.OpenWrite(filePath))
            {
                provider.Export(originalDocument, output);
            }

            using (Stream stream = File.OpenRead(filePath))
            {
                originalDocument = provider.Import(stream);
            }
            //export the pages as images and build a brand new document from the images
            SkiaImageFormatProvider imageProvider = new SkiaImageFormatProvider();
            imageProvider.ExportSettings.ImageFormat = SkiaImageFormat.Jpeg;
            imageProvider.ExportSettings.ScaleFactor = 0.8;
            imageProvider.ExportSettings.Quality = 80;


            RadFixedDocument doc = new RadFixedDocument();
            foreach (RadFixedPage page in originalDocument.Pages)
            {
                byte[] resultImage = imageProvider.Export(page);
                RadFixedPage pdfpage = doc.Pages.AddPage();
                editor = new FixedContentEditor(pdfpage);
                Stream imageStream = new MemoryStream(resultImage);
                editor.DrawImage(imageStream);
            }

            //export the pdf built from the images
            PdfFormatProvider pdfFormatProvider = new PdfFormatProvider();
            string outputPdf = @"output.pdf";
            File.Delete(outputPdf);
            using (Stream output = File.OpenWrite(outputPdf))
            {
                pdfFormatProvider.Export(doc, output);
            }
            Process.Start(new ProcessStartInfo() { FileName = outputPdf, UseShellExecute = true });
        }

Unplanned
Last Updated: 17 Apr 2024 12:39 by Nathan
Created by: Nathan
Comments: 0
Category: WordsProcessing
Type: Bug Report
1
PdfFormatProvider: TOC entries are blue.
Unplanned
Last Updated: 17 Apr 2024 12:31 by Nathan
TOC list numbering and page numbering are missing.
Unplanned
Last Updated: 17 Apr 2024 12:18 by Nathan
PdfFormatProvider: TOC page numbering is in Roman instead of Arabic numerals.
Unplanned
Last Updated: 17 Apr 2024 11:56 by Nathan
Calculate TOC page numbering based on page number fields.
Unplanned
Last Updated: 17 Apr 2024 10:24 by Joshua
Created by: Joshua
Comments: 0
Category: SpreadProcessing
Type: Feature Request
1
Make the CsvParser public.
1 2 3 4 5 6