Unplanned
Last Updated: 10 Oct 2025 08:53 by Jan
Add support for /TR (Transfer Function) property of SMask.
Unplanned
Last Updated: 22 Sep 2025 07:45 by Dmitri
Unplanned
Last Updated: 15 Sep 2025 11:30 by Steinar
Unplanned
Last Updated: 15 Sep 2025 11:15 by Tim
Solid lines appear over dashed lines when generating PDF from SVG diagram.
Unplanned
Last Updated: 15 Sep 2025 11:09 by Tim
Creating a document from an SVG image with a CapPathRound (stroke-linecap="round") adds unexpected lines.
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();

Unplanned
Last Updated: 15 Aug 2025 12:29 by Thomas
The appearance of a form field button is lost after import-export.
Unplanned
Last Updated: 11 Aug 2025 08:35 by ADMIN

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.
Unplanned
Last Updated: 24 Jul 2025 11:55 by ADMIN
SMask.Matte is not applied correctly when exporting to an image.
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.'

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.  
Unplanned
Last Updated: 09 May 2025 10:23 by Vitalii
Created by: Vitalii
Comments: 0
Category: PdfProcessing
Type: Feature Request
10
A shading dictionary specifies details of a particular gradient fill, including the
type of shading to be used, the geometry of the area to be shaded, and the geometry of the gradient fill. Various shading types are available, depending on the value of the dictionary’s ShadingType entry:
  • Coons patch meshes (type 6) construct a shading from one or more color
    patches, each bounded by four cubic Bézier curves.
Unplanned
Last Updated: 05 May 2025 10:02 by Svitlana
Multiple graphic state objects are lost on import.
Unplanned
Last Updated: 02 May 2025 06:20 by Scott
When importing a document with a missing "endobj" operator, an exception is thrown: InvalidCastException: 'Unable to cast object of type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfInt' to type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.IndirectObject'.'
Unplanned
Last Updated: 09 Apr 2025 05:13 by Fabio Videira
When exporting the PDF content to plain text, the form fields and their values are not extracted. It would be nice to have an option to include the content in the form fields as well.
Unplanned
Last Updated: 02 Apr 2025 12:34 by Jian
Created by: Jian
Comments: 0
Category: PdfProcessing
Type: Feature Request
0

Introduce Sanitize Document functionality.

https://experienceleague.adobe.com/en/docs/document-cloud-learn/acrobat-learning/advanced-tasks/redact
https://helpx.adobe.com/acrobat/using/removing-sensitive-content-pdfs.html

Unplanned
Last Updated: 11 Mar 2025 09:50 by Jeanot
This is the code the for replicating the error: 
using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Streaming;
using Telerik.Windows.Documents.Fixed.Model.Editing;
using Telerik.Windows.Documents.Fixed.Model.InteractiveForms;
using Telerik.Windows.Documents.Fixed.Model;
using Telerik.Documents.Primitives;
using System.Diagnostics;
using System.Reflection.Metadata;
using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf;

namespace _1681158PdfInputFields
{
    internal class Program
    {
        static void Main(string[] args)
        {
           ExportExamplePdfForm();

        }

        public static void ExportExamplePdfForm()
        {
            RadFixedDocument fixedDoc = new RadFixedDocument();
            RadFixedPage fixedPage = fixedDoc.Pages.AddPage();
            FixedContentEditor editor = new FixedContentEditor(fixedPage);
            editor.Position.Translate(100, 100);
           
            
            TextBoxField textBox = new TextBoxField("textBox");
            fixedDoc.AcroForm.FormFields.Add(textBox);
            textBox.Value = "Sample text...";
            Size widgetDimensions = new Size(200, 30); 
            DrawNextWidgetWithDescription(editor, "TextBox", (e) => e.DrawWidget(textBox, widgetDimensions));

            string fileName = "output.pdf";
            File.Delete(fileName);
            // File.WriteAllBytes(fileName, new PdfFormatProvider().Export(fixedDoc, TimeSpan.FromSeconds(15)));


            string ResultFileName = "result.pdf";
            File.Delete(ResultFileName);
            using (PdfStreamWriter writer = new PdfStreamWriter(File.OpenWrite(ResultFileName)))
            {
                foreach (RadFixedPage page in fixedDoc.Pages)
                {
                    writer.WritePage(page);
                }
            }

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

            Console.WriteLine("Document created.");

             
        }

        private static void DrawNextWidgetWithDescription(FixedContentEditor editor, string description, Action<FixedContentEditor> drawWidgetWithEditor)
        {
            double padding = 20;
            drawWidgetWithEditor(editor);

            Size annotationSize = editor.Root.Annotations[editor.Root.Annotations.Count - 1].Rect.Size;
            double x = editor.Position.Matrix.OffsetX;
            double y = editor.Position.Matrix.OffsetY;

            Block block = new Block();
            block.TextProperties.FontSize = 20;
            block.VerticalAlignment = Telerik.Windows.Documents.Fixed.Model.Editing.Flow.VerticalAlignment.Center;
            block.InsertText(description);
            editor.Position.Translate(x + annotationSize.Width + padding, y);
            editor.DrawBlock(block, new Size(editor.Root.Size.Width, annotationSize.Height));

            editor.Position.Translate(x, y + annotationSize.Height + padding);
        }
    }
}
1 2 3 4 5 6