Declined
Last Updated: 19 Jun 2024 07:57 by ADMIN
Arquimedes
Created on: 07 Jun 2024 18:57
Category: PdfProcessing
Type: Bug Report
0
Images are rotated in error when importing a PDF file

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);
            }
        }
5 comments
ADMIN
Yoan
Posted on: 19 Jun 2024 07:57

Hi Arquimedes,

I am glad to hear the case has been resolved and you are satisfied with the provided assistance.

Please know that we remain at your disposal should you have any additional questions or feedback.

Regards,
Yoan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Arquimedes
Posted on: 18 Jun 2024 18:38
Hello Yoan, the provided example worked correctly and helped me to fix the main code.

Thank you very much.
ADMIN
Yoan
Posted on: 13 Jun 2024 11:43

Hello Arquimedes,

I am attaching for your disposal the .NET Standard console application (DPL version 2024.2.426) I am using on my end. It appears to be exporting the same document as the input one. Feel free to examine it, use it for your own purposes, and do not hesitate to correct me if I am doing something wrong.

As for your other question, I am not quite sure if I understand what you mean but if you are talking about merging multiple PDF documents then you can refer to the Merge PDF files while preserving their annotations example. It does not require you to import the file as a RadFixedDocument.

Let me know if you have any additional questions.

Regards,
Yoan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Arquimedes
Posted on: 13 Jun 2024 00:02

Hi Yoan,

I downloaded the latest trial version from the official Telerik website, and I’m getting the same incorrect result when importing a PDF document into a RadFixedDocument. Is it possible that there’s an issue with the current download version? I’m using version Telerik.UI.or.AspNet.Core.Trial 2024.2.514.


Is there an alternative method to import a PDF file for merging with a RadFixedDocument so that I can verify if it behaves differently?

Thank you very much.
ADMIN
Yoan
Posted on: 10 Jun 2024 08:08

Hi Arquimedes,

The behavior you are experiencing seems to be related to an issue that has already been resolved. If you update to any version of Document Processing newer or including R2 2023 you should be generating the expected results.

Please give this a try and let me know how it goes.

Regards,
Yoan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.