Unplanned
Last Updated: 05 Sep 2025 08:52 by Alvin

The TextProperties.FontSize property specifies the font size for text fragments. The property is of type double. The measurement unit used for font size in RadPdfProcessing is Device Independent Pixels (DIPs). You can convert it to points or other units using the Unit class.

However, when using the TextProperties with widgets the font conversion is not correct. Let's consider the case that we build a PDF document with a TextBoxField occupying a specific rectangle. According to the set text value, we should calculate the appropriate font size so the whole content can fit in the widget's rectangle.

        /// <summary>
        /// Creates a TextBoxField with calculated font size for the given rectangle
        /// </summary>
        private static TextBoxField CreateTextBoxWithCalculatedFont(string name, string text, Rect rect, double fontSize, FontBase font)
        {
            TextBoxField field = new TextBoxField(name);
       
            field.TextProperties.FontSize = Unit.DipToPoint(fontSize);
            field.TextProperties.Font = font;
            field.Value = text;

            var widget = field.Widgets.AddWidget();
            widget.Rect = rect;
            widget.Border.Width = 0;
            widget.TextProperties.FontSize = Unit.DipToPoint(fontSize); 
            widget.TextProperties.Font = font;

            return field;
        }

        /// <summary>
        /// Calculates the optimal font size for text to fit within a specific rectangle
        /// </summary>
        public static double CalculateFontSizeForRectangle(string text, Rect rect, FontBase font)
        {
            double fontSize = 0;
            Size measuredSize = new Size(0, 0);
            Size availableSize = rect.Size;
            while (measuredSize.Width<availableSize.Width && measuredSize.Height< availableSize.Height)
            {
                fontSize++;
                Block block = new Block();
                block.TextProperties.FontSize = fontSize;
                block.TextProperties.Font = font;
                block.InsertText(text);
                measuredSize = block.Measure();
            }

            return fontSize-1;
        }

            // Example: Wide textbox with calculated font size
            string wideText = "This is a wide textbox that demonstrates horizontal fitting of text content.";
            Rect wideRect = new Rect(200, 500, 400, 30);
            double wideFontSize = CalculateFontSizeForRectangle(wideText, wideRect, font);

            TextBoxField wideTextBoxField = CreateTextBoxWithCalculatedFont("WideTextBox", wideText, wideRect, wideFontSize, font);
            document.AcroForm.FormFields.Add(wideTextBoxField);
            var wideWidget = wideTextBoxField.Widgets.First();
            page.Annotations.Add(wideWidget);
            wideWidget.RecalculateContent();

Completed
Last Updated: 10 Oct 2025 06:11 by ADMIN
Release 2025.3.1007 (2025 Q3)
ArgumentException is thrown when exporting a document with a Unicode character in the Document Info
Completed
Last Updated: 10 Oct 2025 06:11 by ADMIN
Release 2025.3.1007 (2025 Q3)

Error message: 

Unable to cast object of type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfInt' to type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.MarkedContents.StructAttributeObject'.

Completed
Last Updated: 10 Oct 2025 06:11 by ADMIN
Release 2025.3.1007 (2025 Q3)

PDF content:

Exported text content:


Completed
Last Updated: 12 Nov 2025 11:41 by ADMIN
Release 2025.4.1104 (2025 Q4)
The appearance of a form field button is lost after import-export.
Completed
Last Updated: 10 Oct 2025 06:11 by ADMIN
Release 2025.3.1007 (2025 Q3)

When you register a font in an ASP.Core project and in a static constructor, the generated PDF document will have this font only the first time you load the web page. Refreshing the page will generate the PDF document but the fonts will be lost.

Note: This worked in the previous version  2025.2.701.

 

In Development
Last Updated: 14 Aug 2025 14:11 by Dan
Manually set form field values are not preserved when opened in Adobe Acrobat.
Completed
Last Updated: 12 Nov 2025 11:41 by ADMIN
Release 2025.4.1104 (2025 Q4)

When importing a document with an invalid creation or modification date, an exception is thrown:

  • FormatException: 'The input string '' was not in a correct format.'
  • ArgumentOutOfRangeException: 'Year, Month, and Day parameters describe an unrepresentable DateTime.'
Unplanned
Last Updated: 04 Aug 2025 10:04 by Graham
Created by: Graham
Comments: 0
Category: PdfProcessing
Type: Feature Request
0
Implement GetColor method for IndexedColorSpaceObject.
Completed
Last Updated: 15 Aug 2025 13:49 by ADMIN
Release 2025.3.806 (2025 Q3)
When applying MultipleSubstFormat1, an exception is thrown: "NullReferenceException: 'Object reference not set to an instance of an object.'"
Completed
Last Updated: 12 Nov 2025 11:41 by ADMIN
Release 2025.4.1104 (2025 Q4)
SMask.Matte is not applied correctly when exporting to an image.
Completed
Last Updated: 15 Aug 2025 13:49 by ADMIN
Release 2025.3.806 (2025 Q3)

The issue is not reproducible in Q1 2025 (2025.1.205).

In Q2 2025 we introduced the MarkedContent in a RadFixedDocument.

Completed
Last Updated: 15 Aug 2025 13:49 by ADMIN
Release 2025.3.806 (2025 Q3)

Currently the DocumentInfo property is for export purposes only and meta information about documents is stripped when importing.

According to the PDF specification (ISO 32000), the document info dictionary (often called "metadata" or "Info" dictionary) can include the following standard fields:

Title: The document’s title.
Author: The name of the person who created the document.
Subject: The subject of the document.
Keywords: Keywords associated with the document.
Creator: The application that created the original document.
Producer: The application that converted the document to PDF.
CreationDate: The date and time the document was created.
ModDate: The date and time the document was last modified.
Trapped: Indicates whether the document has been trapped (a printing term).

These fields are stored in the PDF’s Info dictionary and are used by PDF viewers for display, search, and indexing.

 
Completed
Last Updated: 15 Aug 2025 13:49 by ADMIN
Release 2025.3.806 (2025 Q3)

It would be great if the SkiaImageExportSettings offer a DocumentUnhandledException event allowing the developer to handle specific errors when exporting to image formats.

This would be an essential improvement in the existing Exception handling mechanism and would enable exporting PDF documents to images even though some parts of the image may not be completely supported: https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/features/handling-document-exceptions 

Unplanned
Last Updated: 09 Jul 2025 06:52 by Vitalii

When exporting a PDF page to an image with the SkiaImageFormatProvider the following error occurs: 

System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'

Completed
Last Updated: 15 Aug 2025 13:49 by ADMIN
Release 2025.3.806 (2025 Q3)
Handle documents with mismatched font Subtype and FontFile type when exporting PDF to image with SkiaImageFormatProvider.
Unplanned
Last Updated: 20 Jun 2025 08:33 by Michael
Created by: Michael
Comments: 0
Category: PdfProcessing
Type: Bug Report
0
Import-export changes the color of the shading object.
Unplanned
Last Updated: 03 Jun 2025 10:23 by Rey
Add support for "AcroSendMail:SendMail" named action.
Unplanned
Last Updated: 03 Jun 2025 05:57 by Eli
Such a document can be considered as invalid. However, it would be good to provide functionality to handle it.  
Completed
Last Updated: 15 Aug 2025 13:49 by ADMIN
Release 2025.3.806 (2025 Q3)
ADMIN
Created by: Martin
Comments: 0
Category: PdfProcessing
Type: Feature Request
0
Part 3 of the standard, published on October 15, 2012, differs from PDF/A-2 in only one regard: it allows embedding of arbitrary file formats (such as XML, CSV, CAD, word-processing documents, spreadsheet documents, and others) into PDF/A conforming documents.