Completed
Last Updated: 13 Nov 2024 08:50 by ADMIN
Release 2024.4.1106 (Q4 2024)

SkiaImageFormatProvider: Add support for Text, TextMarkup, Line, and Stamp annotations.

Currently, these annotations are omitted on image export.

Completed
Last Updated: 13 Nov 2024 09:19 by ADMIN
Release 2024.4.1106 (Q4 2024)
When writing a RadFixedPage with image content using the PdfPageStreamWriter`s WriteContent method an exception is thrown: NullReferenceException: 'Object reference not set to an instance of an object.'
Completed
Last Updated: 13 Nov 2024 08:50 by ADMIN
Release 2024.4.1106 (Q4 2024)
Completed
Last Updated: 07 Aug 2024 15:19 by ADMIN
Release 2024.3.806 (2024 Q3)

When Cyrillic culture is set an InvalidCastException is thrown.

Workaround: use English culture during the import process

            System.Globalization.CultureInfo currentCulture = System.Threading.Thread.CurrentThread.CurrentCulture;
            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-EN");
            PdfFormatProvider provider = new PdfFormatProvider();
            RadFixedDocument document;
            using (Stream stream = File.OpenRead("popup_dedetizacao_ok.pdf"))
            {
                document = provider.Import(stream);
            }
            System.Threading.Thread.CurrentThread.CurrentCulture = currentCulture;
        

For the RadPdfViewer control you can use a similar approach: 

            System.Globalization.CultureInfo currentCulture = System.Threading.Thread.CurrentThread.CurrentCulture;
            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-EN");
            PdfFormatProvider provider = new PdfFormatProvider();
            RadFixedDocument document;
            using (Stream stream = File.OpenRead("popup_dedetizacao_ok.pdf"))
            {
                document = provider.Import(stream);
            }
            System.Threading.Thread.CurrentThread.CurrentCulture = currentCulture;

            RadForm form = new RadForm();
            RadPdfViewer radPdfViewer1 = new RadPdfViewer();
            form.Controls.Add(radPdfViewer1);
            radPdfViewer1.LoadElementTree();
            radPdfViewer1.Dock = System.Windows.Forms.DockStyle.Fill;
            radPdfViewer1.Document = document;
             
            form.ShowDialog();

 

Unplanned
Last Updated: 06 Aug 2024 08:09 by Peg
The expected behavior is to iterate all the pages in a PDF document, export each page's content to an image and combine all the images in a common multipage TIFF image.
Completed
Last Updated: 13 Nov 2024 08:50 by ADMIN
Release 2024.4.1106 (Q4 2024)
When writing image content with the PdfPageStreamWriter an exception is thrown (NullReferenceException: 'Object reference not set to an instance of an object.') because the ExecutionHandler is not set to the export context.
Unplanned
Last Updated: 30 Jul 2024 14:14 by Mathew

This is the code for inserting the image: 

        static void Main(string[] args)
        {
            FixedExtensibilityManager.ImagePropertiesResolver = new ImagePropertiesResolver();

            //Telerik.Windows.Documents.Extensibility.JpegImageConverterBase defaultJpegImageConverter = new Telerik.Documents.ImageUtils.JpegImageConverter();
            //Telerik.Windows.Documents.Extensibility.FixedExtensibilityManager.JpegImageConverter = defaultJpegImageConverter;

            //Output("fyb-64.png", "output-working.pdf");
             Output("fyb.png", "output-broken.pdf");
        }
        private static void Output(string resourceName, string outputFileName)
        {
            var document = new RadFixedDocument();
            using (var editor = new RadFixedDocumentEditor(document))
            {
                Stream image = new FileStream(resourceName, FileMode.Open);

                var table = new Table
                {
                    LayoutType = TableLayoutType.FixedWidth,
                    Margin = new Thickness(10, 0, 0, 0),
                };

                var row = table.Rows.AddTableRow();
                var cell = row.Cells.AddTableCell();
                var block = cell.Blocks.AddBlock();
                block.InsertImage(image);
                editor.InsertTable(table);

                var pdfData = ExportToPdf(document);
                File.Delete(outputFileName);
                File.WriteAllBytes(outputFileName, pdfData);

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

        private static byte[] ExportToPdf(RadFixedDocument document)
        {
            byte[] pdfData;

            using (var ms = new MemoryStream())
            {
                var pdfFormatProvider = new PdfFormatProvider();
                pdfFormatProvider.Export(document, ms);
                pdfData = ms.ToArray();
            }

            return pdfData;
        }

Workaround: Instead of setting the ImagePropertiesResolver, set the JpegImageConverter: 

            Telerik.Windows.Documents.Extensibility.JpegImageConverterBase defaultJpegImageConverter = new Telerik.Documents.ImageUtils.JpegImageConverter();
            Telerik.Windows.Documents.Extensibility.FixedExtensibilityManager.JpegImageConverter = defaultJpegImageConverter;

Unplanned
Last Updated: 30 Jul 2024 06:22 by Rodney

Search for specific text in a PDF document  and you will notice that if the document is landscape, the SearchResult.GetWordBoundingRect method may return incorrect results. If the document is Portrait, the exact results are highlighted with the code snippet below: 

            PdfFormatProvider provider = new PdfFormatProvider();
            RadFixedDocument document = provider.Import(File.ReadAllBytes("Landscape.pdf"));

                TextSearch searchText = new TextSearch(document);
                TextSearchOptions searchOptions = new TextSearchOptions { UseRegularExpression=false, CaseSensitive=false, WholeWordsOnly = true };
                IEnumerable<SearchResult> matchResults = searchText.FindAll("sed", searchOptions);
                foreach (SearchResult resultItem in matchResults)
                {
                    Rect rect = resultItem.GetWordBoundingRect();

                   
                    RadFixedPage page = resultItem.GetResultPage();
                    FixedContentEditor editor = new FixedContentEditor(page);
                 
                    editor.GraphicProperties.FillColor = new RgbColor(125, 255, 0, 0);
                    editor.DrawRectangle(rect);
                }
            
            string outputFilePath = "result.pdf";
            File.Delete(outputFilePath);
            File.WriteAllBytes(outputFilePath, provider.Export(document));
            Process.Start(new ProcessStartInfo() { FileName = outputFilePath, UseShellExecute = true });

Landscape: wrong rectangles are highlighted

Portrait: correct rectangles are highlighted:

 

Unplanned
Last Updated: 19 Jul 2024 10:42 by Lucas

NullReferenceException is thrown when Find API is used on a newly created document.

Workaround: Export - Import the document before using the Find API

PdfFormatProvider pdfFormatProvider = new PdfFormatProvider();
byte[] exportedDocument = pdfFormatProvider.Export(document);
document = pdfFormatProvider.Import(exportedDocument);

 

Unplanned
Last Updated: 18 Jul 2024 08:46 by Joe

Encoding table headers are preserved when creating subsets.

Unplanned
Last Updated: 09 Jul 2024 14:30 by ADMIN
In version 1 there are three profiles that have different levels of detail in their structure: Basic (B), Comfort (C) and Extended (X): https://mind-forms.de/e-rechnung/welches-zugferd-profil-kann-ich-verwenden/ 
Unplanned
Last Updated: 24 Jun 2024 08:45 by Graham
Created by: Graham
Comments: 0
Category: PdfProcessing
Type: Bug Report
0

As a result of the below missing operator, some of the glyphs can't be extracted from the CFFFontTable and the characters are not displayed in the PdfViewer:

The end user result is missing letter from the PDF content.

Completed
Last Updated: 02 Aug 2024 11:09 by ADMIN
Release 2024.3.802 (2024 Q3)
Handle documents with mismatched font Subtype and FontFile type.
Completed
Last Updated: 13 Nov 2024 08:51 by ADMIN
Release 2024.4.1106 (Q4 2024)

Handle import of documents with wrong type of action key.

Once this is completed use the Exceptions Handling mechanism to handle this scenario. For instance:

private void ImportSettings_DocumentUnhandledException(object sender, DocumentUnhandledExceptionEventArgs e)
{
    if (e.Exception is InvalidActionException)
    {
        

 

Declined
Last Updated: 19 Jun 2024 07:57 by ADMIN
Created by: Arquimedes
Comments: 5
Category: PdfProcessing
Type: Bug Report
0

When an import of the attached PDF file is executed, the result is a file with vertically rotated images, as well as enlarged and distorted. This is part of the code executed in the final application. Do you have any idea why this is happening? Is there any suggested solution?

As a result of the imported file, other processes are executed, such as creating bookmarks and page numbering, but the result is incorrect when presenting the rotated images.

Please find attached a code snippet and the input and generated output file.

Thank you.

 

        private static void TestPDF()
        {
            RadFixedDocument document;
            Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider providerPdf = new();


            using (Stream stream = System.IO.File.OpenRead("C:\\TMP\\Ejemplo1-Input.pdf"))
            {
                document = providerPdf.Import(stream);
                byte[] output = providerPdf.Export(document);

                System.IO.File.WriteAllBytes("C:\\TMP\\Ejemplo1-Output.pdf", output);
            }
        }
Declined
Last Updated: 05 Jun 2024 15:15 by ADMIN

SkiaImageFormatProvider: Rectangle behind text overlaps the text of previous line.

RESOLVED: The issue is dismissed. The actual reason for the results is missing FontsProvider implementation. In order for accurate calculations and measurements the fonts used in the document need to be resolved correctly.

Unplanned
Last Updated: 04 Jun 2024 10:34 by Kishan
Improve performance of Block.Measure for large chunks of text.
Unplanned
Last Updated: 03 Jun 2024 13:05 by Lorrie
Currently, the SkiaImageFormatProvider considers the RadFixedPage.Size when creating the image. If the RadFixedPage.CropBox is specified, the developer can control what rectangle of the page to be displayed/printed. However, it is not considered when exporting to an image. Improving the SkiaImageFormatProvider to respect the CropBox as well will give the opportunity to crop just a certain region of the PDF page and save it as an image.
Completed
Last Updated: 02 Aug 2024 11:09 by ADMIN
Release 2024.3.802 (2024 Q3)
Broken page content when exporting a document and inversing a non-invertible concat matrix.
Completed
Last Updated: 02 Aug 2024 11:09 by ADMIN
Release 2024.3.802 (2024 Q3)

Error message:

System.InvalidCastException: 'Unable to cast object of type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfHexString' to type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfLiteralString'.'