This is a migrated thread and some comments may be shown as answers.

RadContentEditor.AddImage() makes page blank sometimes

3 Answers 103 Views
PdfProcessing
This is a migrated thread and some comments may be shown as answers.
Dominik
Top achievements
Rank 1
Veteran
Iron
Dominik asked on 28 Sep 2020, 09:02 PM

Hello,

I'm trying few options to draw images to RadFixedDocument, by using FixedContentEditor.DrawImage(), RadFixedPage.Content.AddImage(),  by stream, and by image source, in some documents generated PDF is blank, after image added... page has 716x956, position is 333x547, image to be drawed has 150x40px, page margin 50 from all sides.

 

 

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 29 Sep 2020, 02:12 PM

Hi Dominik,

I tried to reproduce the described behavior and at my end, everything works as expected. There could be something specific in the setup or in the imported images (it could be a not supported file format). 

I am attaching you the sample project I used in order to investigate this behavior. Please, feel free to modify it in a way closer to your scenario.

Could I ask you about the version of the Telerik Document Processing assemblies you are referencing and about the framework you are targeting in your project?

Looking forward to hearing from you.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Dominik
Top achievements
Rank 1
Veteran
Iron
answered on 10 Oct 2020, 04:16 PM

Sorry for late...  Im using 2019 R1. And I found a problem, when i rewriting a file generated sometimes it not works, but when im fixed my logic to delete document before save new generated pdf it works again :)..

0
Martin
Telerik team
answered on 12 Oct 2020, 05:46 AM

Hello Dominik,

Thank you for the provided additional information.

I am happy you have a working application now.

Indeed, the rewriting an existing document from time to time leads to a broken PDF file. To make sure this behavior doesn't happen, it is a good practice to delete the previous version of the file before saving the new one.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
PdfProcessing
Asked by
Dominik
Top achievements
Rank 1
Veteran
Iron
Answers by
Martin
Telerik team
Dominik
Top achievements
Rank 1
Veteran
Iron
Share this question
or