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. 
Need More Info
Last Updated: 24 Apr 2024 10:12 by ADMIN
Created by: Vitalii
Comments: 1
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.
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.
Unplanned
Last Updated: 18 Apr 2024 15:38 by John

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.

 

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.
Unplanned
Last Updated: 17 Apr 2024 10:22 by Steve
Created by: Steve
Comments: 0
Category: SpreadProcessing
Type: Feature Request
1
Add support for image cropping (a:srcRect). 
In Development
Last Updated: 16 Apr 2024 11:12 by ADMIN
ArgumentNullException when importing documents containing comments with no DateTime.
In Development
Last Updated: 16 Apr 2024 11:02 by ADMIN
Unplanned
Last Updated: 15 Apr 2024 13:10 by Belma
Created by: Belma
Comments: 0
Category: WordsProcessing
Type: Bug Report
0
Outline color of some shapes is not respected.
In Development
Last Updated: 15 Apr 2024 12:43 by ADMIN
Created by: IGNACIO
Comments: 0
Category: WordsProcessing
Type: Feature Request
1
The AlternateContent element is used to store content which is not defined by the specification.
1 2 3 4 5 6