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: 27 May 2024 10:29 by ADMIN
Release 2024 Q1
Created by: Joe
Comments: 4
Category: PdfProcessing
Type: Feature Request
7

ZUGFeRD (acronym for Zentraler User Guide des Forums elektronische Rechnung Deutschland) is a specification for the electronic invoice format of the same name.

The feature depends on the following features:

Completed
Last Updated: 23 May 2024 06:34 by ADMIN
Release 2024.2.426 (2024 Q2)
In scenarios with negative font and/or negative horizontal scaling the text is not rendered correctly.
Duplicated
Last Updated: 21 May 2024 13:54 by ADMIN
Created by: Petr
Comments: 2
Category: PdfProcessing
Type: Feature Request
0

Hi Telerik,

Could you add abbility to contact TSA (timestamp) server and sign PDF document with certificate (which is currently supported) and signed timestamp?

Thank you

Unplanned
Last Updated: 20 May 2024 07:23 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.
Completed
Last Updated: 17 May 2024 14:37 by ADMIN
Release 2024.2.426 (2024 Q2)

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 });
   }

Unplanned
Last Updated: 17 May 2024 13:59 by Axel
Example: 
16 0 obj
<</AP<</N<</Off null/On 188 0 R>>/D<</Off 189 0 R/On 190 0 R>>>>/AS/Off/F 4/FT/Btn/H/T/P 19 0 R/Rect[ 40.3 690.45 56.15 706.7999]/Subtype/Widget/T(Einraeumung:Grabnutzungsrechts)/Type/Annot>>
endobj

 
Completed
Last Updated: 15 May 2024 14:22 by ADMIN
Release 2024.2.426 (2024 Q2)

Currently, a NullReferenceException is thrown because of the incorrect structure. 

As a workaround, the exception can be handled using the Handling Exceptions mechanism.

Update:
When importing documents with invalid structure of path construction operators an InvalidGraphicOperandsCountException is thrown which could be handled using the Handling Exceptions mechanism.

PdfFormatProvider provider = new PdfFormatProvider();
provider.ImportSettings.DocumentUnhandledException += this.ImportSettings_DocumentUnhandledException;

private void ImportSettings_DocumentUnhandledException(object sender, DocumentUnhandledExceptionEventArgs e)
{
    if (e.Exception is InvalidGraphicOperandsCountException)
    {
        e.Handled = true;
    }
}

Declined
Last Updated: 15 May 2024 07:13 by ADMIN
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.
Completed
Last Updated: 15 May 2024 06:30 by ADMIN
Release 2024.2.426 (2024 Q2)
A dictionary with an invalid entry cannot be imported correctly and breaks the import process. 
Completed
Last Updated: 15 May 2024 06:30 by ADMIN
Release 2024.2.426 (2024 Q2)

I have the following form:

From the screen shot above you can see that the line above 75 is perfectly ok i.e. it doesn't go and intersect with the lines of the 72

but when i perform the following code


            var InputFileWithInteractiveForms = "C:\\Users\\Abhishek.Shrestha\\Downloads\\Template\\form-ub04.pdf";
            var finaldPDFName = "C:\\Users\\Abhishek.Shrestha\\Downloads\\TestABCPDF\\output2322.pdf";
            List<byte[]> filledupForms = new List<byte[]>();
            PdfFormatProvider provider = new PdfFormatProvider();
                
                RadFixedDocument document = provider.Import(File.ReadAllBytes(InputFileWithInteractiveForms));

                var formfields = document.AcroForm.FormFields;

                var formFieldsCopy = new List<FormField>(document.AcroForm.FormFields);

                // Iterate over the copied form fields and replace the dot character in their names for solving merging issue
                foreach (var field in formFieldsCopy)
                {
                    field.Name = field.Name.Replace(".", "");
                }
                
               //added this as the values were being hidden by editable fields
                document.AcroForm.ViewersShouldRecalculateWidgetAppearances = true;

                filledupForms.Add(provider.Export(document));
                File.WriteAllBytes(finaldPDFName, provider.Export(document));

I get the following output:


               
Completed
Last Updated: 15 May 2024 06:30 by ADMIN
Release 2024.2.426 (2024 Q2)

According to the PDF specification:
A clipping path operator (W or W*) may appear after the last path construction operator and before the path-painting operator that terminates a path object.

Invalid:

W                          % clipping path operator
0 0 m                     % start of the path construction
596 0 l
596 842 l
0 842 l
h                            % end of the path construction
n                            % path-painting operator
Valid:
0 0 m
596 0 l
596 842 l
0 842 l
h
W
n

Currently (in the invalid cases), the path construction is skipped on import.

Completed
Last Updated: 15 May 2024 06:29 by ADMIN
Release 2024.2.426 (2024 Q2)
Import-export causes missing characters with a specific document.
Completed
Last Updated: 15 May 2024 06:29 by ADMIN
Release 2024.2.426 (2024 Q2)
InvalidOperationException is thrown when exporting font that is available but not used.

The stack trace is as follows:
   at System.Linq.Enumerable.Max(IEnumerable`1 source)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.Cid.CidSet.CopyPropertiesFrom(IPdfExportContext context, FontBase font)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.CidFontDescriptor.CalculateCidSet(IPdfExportContext context, CidFontBase font)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.CidFontDescriptor.<>c__DisplayClass34.<CopyPropertiesFrom>b__30()
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Utilities.PdfObjectsExtensions.ToPrimitive[P,T](PdfProperty`1 pdfProperty, Func`2 convertToPrimitive, Func`1 getDefaultValue)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.CidFontDescriptor.CopyPropertiesFrom(IPdfExportContext context, FontBase font)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.CidFontObject.CopyPropertiesFromOverride(IPdfExportContext context, FontBase font)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.CidFontObject.CopyPropertiesFrom(IPdfExportContext context, FontBase font)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.Type0FontObject.CopyPropertiesFromOverride(IPdfExportContext context, FontBase font)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export.PdfExporter.WriteFontsFromContext(PdfWriter writer, IPdfExportContext context)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export.PdfExporter.Export(IRadFixedDocumentExportContext context, Stream output)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.ExportOverride(RadFixedDocument document, Stream output)
   at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Export(T document, Stream output)
Completed
Last Updated: 15 May 2024 06:29 by ADMIN
Release 2024.2.426 (2024 Q2)
Completed
Last Updated: 15 May 2024 06:29 by ADMIN
Release 2024.2.426 (2024 Q2)
When parsing a CFF Type1 font a NullReferenceException is thrown.
Completed
Last Updated: 15 May 2024 06:29 by ADMIN
Release 2024.2.426 (2024 Q2)

A page with a negative value rotation is exported as a blank image.

Workaround: Use only the Enum Rotation values (Rotate0, Rotate90, Rotate180, Rotate270).

Completed
Last Updated: 15 May 2024 06:28 by ADMIN
Release 2024.2.426 (2024 Q2)
ADMIN
Created by: Deyan
Comments: 4
Category: PdfProcessing
Type: Feature Request
14
Currently, when registering *.otf font file with FontsRepository.RegisterFont method an exception is thrown during the font creation. 

WORKAROUND:  The font file may be converted to TTF format (*.ttf) which is successfully registered. This conversion may be achieved with FontForge by opening the font file and then choosing File -> Generate Fonts -> TrueType -> Generate. More information on FontForge program may be found here: https://fontforge.github.io/en-US/
Completed
Last Updated: 15 May 2024 06:28 by ADMIN
Release 2024.2.426 (2024 Q2)
When merging documents with exactly the same font but different character widths, some characters are rendered with the wrong width.