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.

Declined
Last Updated: 04 Jun 2024 09:37 by ADMIN

I am using .net 7. I originally hit it with Telerik.UI.for.Wpf.70.Xaml.2023.3.1114. I updated to Telerik.UI.for.Wpf.70.Xaml.2024.1.423 to see if it was fixed but it still appears to happen.

I have attached a sample program which shows the behavior. Original.xlsm was created in Excel and has an image embedded in cell A1. Call ImportWorkbook with the path to the original file. Then export that workbook (unchanged) to the destination file.

Workbook workbook = ImportWorkbook( originalFileName );
ExportWorkbook( workbook, destinationFileName );
        private Workbook ImportWorkbook( string  fileName )
        {
            Telerik.Windows.Documents.Spreadsheet.Model.Workbook workbook;
            IWorkbookFormatProvider formatProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsm.XlsmFormatProvider();

            using( Stream input = new FileStream( fileName, FileMode.Open ) )
            {
                workbook = formatProvider.Import( input );
            }
            
            return workbook;
        }

        private void ExportWorkbook( Workbook workbook, string fileName )
        {
            Telerik.Windows.Documents.Spreadsheet.FormatProviders.IWorkbookFormatProvider formatProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsm.XlsmFormatProvider();

            using( Stream output = new FileStream( fileName, FileMode.Create ) )
            {
                formatProvider.Export( workbook, output );
            }
        }
The exported file is missing the image.
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.
Declined
Last Updated: 03 Apr 2024 15:43 by ADMIN

Steps to reproduce:

1.Create a zip archive for a txt file with password protection

2. Try updating the protected file and insert a new text line for example.


As a result,  an error occurs: System.ObjectDisposedException: 'Cannot access a closed Stream.'

 
Imports System.IO
Imports System.Text
Imports Telerik.Windows.Zip

Module Module1

    Sub Main()
        Dim sZipFilePath As String = "..\..\test.zip"
        File.Delete(sZipFilePath)

        CreateArchive(sZipFilePath)

        Dim decryptionSettings As DecryptionSettings = EncryptionSettings.CreateDecryptionSettings()
        AddHandler decryptionSettings.PasswordRequired, AddressOf DecryptionSettings_PasswordRequired
        Dim compressionSettings As CompressionSettings = Nothing
        Dim encoding As Encoding = Nothing
        Using oFS As FileStream = File.Open(sZipFilePath, FileMode.OpenOrCreate)


            Using oArchive As ZipArchive = ZipArchive.Update(oFS, encoding, compressionSettings, decryptionSettings)
                For Each entry As ZipArchiveEntry In oArchive.Entries
                    Using entryStream As Stream = entry.Open()
                        Dim reader As New StreamReader(entryStream)
                        Dim content As String = reader.ReadToEnd()

                        entryStream.Seek(0, SeekOrigin.End)
                        Dim writer As New StreamWriter(entryStream)
                        writer.WriteLine("Updated line.")
                        writer.Flush()
                    End Using
                Next
            End Using
        End Using
    End Sub

    Private Sub CreateArchive(sZipFilePath As String)
        Using stream As Stream = File.Open(sZipFilePath, FileMode.Create)
            Dim encryptionSettings As PasswordEncryptionSettings = encryptionSettings.CreatePkzipPasswordEncryptionSettings()
            encryptionSettings.Password = "MyPassword"
            Dim compressionSettings As CompressionSettings = Nothing
            Dim encoding As Encoding = Nothing

            Using archive As ZipArchive = ZipArchive.Create(stream, encoding, compressionSettings, encryptionSettings)

                Using entry As ZipArchiveEntry = archive.CreateEntry("text.txt")
                    Dim writer As StreamWriter = New StreamWriter(entry.Open())
                    writer.WriteLine("Hello world!")
                    writer.Flush()
                End Using
            End Using
        End Using
    End Sub

    Private Sub DecryptionSettings_PasswordRequired(ByVal sender As Object, ByVal e As PasswordRequiredEventArgs)
        e.Password = "MyPassword"
    End Sub

End Module
Declined
Last Updated: 26 Jan 2024 12:10 by ADMIN

In WorksheetPageSetup, you can only get the PageSize, but not set it. The only way is through setting a PaperType.

 

This is because in Telerik.Windows.Documents.Spreadsheet.Model.Printing.SheetPageSetupBase, the only way to set the pageSize property is by setting a PaperType, then it uses PaperTypeConverter.ToSize(PaperType) to convert it to the pageSize. I cannot see any other way to set this to a custom size set by the user.

 

Please allow custom page sizing by adding a setter for the PageSize if possible. Thank you!

 


WorksheetPageSetup pageSetup = worksheet.WorksheetPageSetup;
Size pageSize = new Size(50, 80)
pageSetup.PageSize = pageSize; // produces cs0200
pageSetup.PageSize.Width = pageSize.Width; // produces cs1612
pageSetup.PageSize.Height = pageSize.Height; // produces cs1612

Declined
Last Updated: 15 Nov 2023 12:58 by ADMIN
Created by: Gary
Comments: 3
Category: PdfProcessing
Type: Bug Report
0
When flattening a document with esignature the signature gets removed. Digital signatures remain, but esignatures do not.
Declined
Last Updated: 15 Nov 2023 12:57 by ADMIN
 I am getting a null exception when trying to import an document. The specified error is Value cannot be null. (Parameter 'action').
Declined
Last Updated: 20 Sep 2023 12:14 by ADMIN

Hello, I had many problems with version 2023.1.117, latest stable 2023.2.606 is unusable also due to issue with scanned documents etc, so I tried 2020.2.703-hotfix, but I am getting other set of issues.

Unfortunately I cannot share the documents, since they are confidential.

With some documents I am getting this error:
Unable to cast object of type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfName' to type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Objects.FormXObject'.

 

Loading Code:

            PdfFormatProvider pdfFormatProvider = new();

            RadFixedDocument document = pdfFormatProvider.Import(bytes);

 

And stack trace:

   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Converters.AppearanceConverter.ConvertFromDictionary(PostScriptReader reader, IPdfImportContext context, PdfDictionary dictionary)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Converters.AppearanceConverter.Convert(Type type, PostScriptReader reader, IPdfImportContext context, IPdfPrimitive value)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Converters.AppearanceConverter.ConvertFromIndirectReference(Type type, PostScriptReader reader, IPdfImportContext context, IndirectReference indirectReference)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Converters.AppearanceConverter.Convert(Type type, PostScriptReader reader, IPdfImportContext context, IPdfPrimitive value)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Converters.AppearancesConverter.TryImportAppearance(String key, PostScriptReader reader, IPdfImportContext context, PdfDictionary appearancesDictionary, Appearance& appearance)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Converters.AppearancesConverter.ConvertFromDictionary(Type type, PostScriptReader reader, IPdfImportContext context, PdfDictionary dictionary)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Converters.Converter.Convert(Type type, PostScriptReader reader, IPdfImportContext context, IPdfPrimitive value)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Data.PdfPropertyBase`1.PrepareValue(PostScriptReader reader, IPdfImportContext context, IPdfPrimitive value)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Data.LoadOnDemandPropertyBase`1.GetValueFromSource(Boolean shouldDecrypt)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Data.LoadOnDemandPropertyBase`1.GetValue(Boolean shouldDecrypt)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Annotations.AnnotationObject.get_Appearances()
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Annotations.AnnotationObject.ToAnnotation(PostScriptReader reader, IRadFixedDocumentImportContext context, Double pageHeightInDip)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.Page.<>c__DisplayClass21_0.<CopyPageAnnotationsTo>b__0()
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.ExceptionHandling.ExecutionHandler.TryHandleExecution[E](Action operation)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.Page.CopyPageAnnotationsTo(IRadFixedDocumentImportContext context, RadFixedPage fixedPage)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.DocumentCatalog.<>c__DisplayClass59_2.<CopyAllPageProperties>b__2()
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.ExceptionHandling.ExecutionHandler.TryHandleExecution[E](Action operation)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.DocumentCatalog.CopyAllPageProperties(PostScriptReader reader, IRadFixedDocumentImportContext context, List`1 contextPages, IList`1 pages)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.DocumentCatalog.CopyPagePropertiesTo(PostScriptReader reader, IRadFixedDocumentImportContext context)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.DocumentStructure.DocumentCatalog.CopyPropertiesTo(PostScriptReader reader, IRadFixedDocumentImportContext context)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.RadFixedDocumentImportContext.BeginImportOverride()
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.BaseImportContext.BeginImport(Stream pdfFileStream)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import.PdfImporter.Import(Stream input, IPdfImportContext context)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.<>c__DisplayClass18_0.<ImportOverride>b__0()
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.ExceptionHandling.ExecutionHandler.TryHandleExecution[E](Action operation)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.ImportOverride(Stream input)
   at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Import(Stream input)
   at Telerik.Windows.Documents.Common.FormatProviders.BinaryFormatProviderBase`1.Import(Byte[] input)
   at Client.Wpf.Common.UserControls.PdfViewer.LoadBytesToPdfViewer(Byte[] bytes) in C:\Users\tomas.filip\source\repos\FiFi\Client.Wpf\Common\UserControls\PdfViewer.xaml.cs:line 65
   at System.Reactive.AnonymousSafeObserver`1.OnNext(T value)
   at System.Reactive.ObserveOnObserverNew`1.DrainStep(ConcurrentQueue`1 q)
   at System.Reactive.ObserveOnObserverNew`1.DrainShortRunning(IScheduler recursiveScheduler)
   at System.Reactive.Concurrency.DispatcherScheduler.<>c__DisplayClass12_0`1.<Schedule>b__0()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)


Declined
Last Updated: 08 Jul 2023 11:07 by ADMIN
Created by: Ted
Comments: 1
Category: PdfProcessing
Type: Bug Report
0

I'm trying to use the PdfFormatProvider to import a pdf. I've tried to import multiple different pdfs with the code below, but they all throw an exception with "System.InvalidOperationException: 'Import not supported.'" and no other info. Is this a bug or am I not calling the correct method to import a pdf?

var providerPDF = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();
providerPDF.Import(File.ReadAllBytes(@"D:\TestDocs\TestImage.pdf"));

Declined
Last Updated: 07 Jun 2023 11:05 by ADMIN
Created by: Thomas
Comments: 1
Category: Telerik Document Processing
Type: Bug Report
0

Hello,

I'm using Telerik Documents Processing 2023.1.410

With WordsProcessing, if I add a table in a footer it will automatically add a space after the table

Here an example, my table is the same size as my image in background and I removed all margin of the section:

Here the code:


Footer footer = section.Footers.Add(HeaderFooterType.Default)
section.PageMargins = new Padding(0,96,96,0);
section.FooterBottomMargin = 0;

Table table = footer.Blocks.AddTable();
TableRow row = table.Rows.AddTableRow();
TableCell cell = row.Cells.AddTableCell();
Paragraph paragraph = cell.Blocks.AddParagraph();
paragraph.Inlines.AddRun("Something");

 

I didn't any properties to manage spaces around a Table like in Paragraph.

It can be reproduced without the image

Work around:

If I add a new paragraph at the end and remove all spaces of this paragraph then it works

Here the code added:


paragraph = footer.Blocks.AddParagraph();
paragraph.Spacing.SpacingAfter = 0;
paragraph.Spacing.SpacingBefore = 0;
paragraph.Spacing.LineSpacing = 0;

 

Regards,
Hervouet Thomas

Declined
Last Updated: 29 May 2023 10:51 by ADMIN
The Footer's size is sometimes not respected.
Declined
Last Updated: 25 May 2023 14:48 by ADMIN

Hi 

is there possible Telerik RadSpreadProcessing able to print repeat column on every printed page?

 

 

Declined
Last Updated: 10 May 2023 15:06 by ADMIN
Created by: Chris
Comments: 1
Category: Telerik Document Processing
Type: Bug Report
0

When importing an XLSX that has "Date" number-formatted cells, and those cells have the 5-digit representation of th edate, XslxFormatProvider.Import(bytes) will throw a KeyNotFoundException. The exception message is "The given key '58' was not present in the dictionary" for the particular case we're looking at.

Unfortunately, we cannot provide the file itself, as it has PHI in it. And, when we open it in Excel and resave it, Excel will automatically convert the 5-digit representation to a normal date. This new file will import just fine. However, we're trying to cut out that intermediate step.

Pertinent portion of the stack trace:
   at System.ThrowHelper.ThrowKeyNotFoundException[T](T key)

   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.Contexts.XlsxWorksheetImportContext.ImportDirectFormattingInRange(XlsxWorkbookImportContext workbookContext, FormattingRecord directFormatting, PropertyBagBase propertyBag, Int64 start, Int64 end)
   at Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.Contexts.XlsxWorksheetImportContext.EndImport(XlsxWorkbookImportContext workbookContext)
   at Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.Contexts.XlsxWorkbookImportContext.EndImport()
   at Telerik.Windows.Documents.FormatProviders.OpenXml.OpenXmlImporter`1.Import(Stream input, IOpenXmlImportContext context)
   at Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider.ImportOverride(Stream input)
   at Telerik.Windows.Documents.Spreadsheet.FormatProviders.WorkbookFormatProviderBase.Import(Stream input)
   at Telerik.Windows.Documents.Spreadsheet.FormatProviders.BinaryWorkbookFormatProviderBase.Import(Byte[] input)
   at .....

 

 

Declined
Last Updated: 13 Apr 2023 08:28 by ADMIN
Created by: Rohit
Comments: 1
Category: WordsProcessing
Type: Feature Request
1
Is there any option to set line-height for text in RadFlowDocument Editor?
Declined
Last Updated: 13 Mar 2023 14:04 by ADMIN
Export should take into account JavaScript and produce PDF similar to the original page.
Declined
Last Updated: 27 Jan 2023 11:11 by ADMIN
Created by: Vladimír
Comments: 1
Category: WordsProcessing
Type: Feature Request
1

When exporting RadFlowDocument that contains TOC field, resultant PDF document should contain link point to the page shown in TOC.


note this is different from already existing request as this request is to link to the page, which is possible in telerik PDF export as demonstrated here and not to the bookmark.

Declined
Last Updated: 22 Sep 2022 08:59 by ADMIN
Created by: Babu
Comments: 4
Category: Telerik Document Processing
Type: Bug Report
1

1. Line Height is not converted properly.  for example, if we set the line height is 1.5 in angular UI editor, in PDF is not shown properly,

2. Table alignment is not proper -  After resizing the in the angular editor, the same alignment is not converted in PDF. I think colgroup and cols custom tags are not considering while converting the PDF.

Declined
Last Updated: 24 May 2022 14:37 by ADMIN
According to the Pdf Specification, the ExtGState property is optional but in this specific scenario the property is not omitted but just the object implementation.

This case can be handled using the Handling Exceptions mechanism.
Declined
Last Updated: 21 Mar 2022 12:59 by ADMIN
                        

public string AppendPdfList(string[] append)
{
           PdfFormatProvider provider = new PdfFormatProvider();
            RadFixedDocument targetDocument = new RadFixedDocument();
            provider.ImportSettings.DocumentUnhandledException += (o, args) => { args.Handled = true; };

            // Iterate through the files you would like to merge 
            foreach (string documentName in append)
            {
               RadFixedDocument sourceDocument = provider.Import(File.ReadAllBytes(documentName));
               targetDocument.Merge(sourceDocument);
            }
            TelerikPdfHelper.ClearDuplicatedFonts(targetDocument);

            OutputFilename = Path.GetTempFileName();
           File.WriteAllBytes(OutputFilename, provider.Export(targetDocument));
            return OutputFilename;
}

 

Results in System.NotImplementedException: 'The method or operation is not implemented.

1 2 3 4