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

kendo-pdf-export does not show image

2 Answers 160 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ziental
Top achievements
Rank 1
ziental asked on 07 May 2018, 05:10 PM

I'm creating an image that has an image that uses a variable to complete the src of the image, as shown below:

<kendo-pdf-export #pdfProfile paperSize="A4" margin="0.2cm" [scale]="0.5" [imageResolution]="72">
<img src="{{URL_Image + bull.image}}" class="img-fluid rounded" alt="" />

When I use this form, the image appears on the page, but in the creation of the PDF it is not shown.
When I switch to a still image, as shown below, it works.

<img src="https://c2.staticflickr.com/2/1574/25734996011_637430f5d8_c.jpg" class="img-fluid rounded" alt="" />

Do you have any configuration, or how to resolve this?

2 Answers, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 09 May 2018, 07:27 AM
Hi Zdzislaw,

I tried to reproduce the reported behavior but I could not. Check the following sample plunker:

https://plnkr.co/edit/l6IY8UpYJGfC1Rz25EZp?p=preview

@Component({
  selector: 'my-app',
  template: `
    <div class="example-config">
      <button kendo-button (click)="pdf.saveAs('invoice.pdf')">
        Save As PDF...
      </button>
    </div>
 
    <kendo-pdf-export #pdf paperSize="A4" margin="2cm">
      <img src="{{url + '.jpg'}}" class="img-fluid rounded" alt="" />
    </kendo-pdf-export>
  `,
  styleUrls: [ 'app/styles.css' ]
})
export class AppComponent {
}

Let me know in case I am missing something or provide some more details so that we are able to reproduce the issue. Thank you in advance.

Regards,
Svetlin
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Juuso
Top achievements
Rank 1
answered on 16 Apr 2020, 10:16 AM
Zdzislaw Ziental did you ever find out why your image didn't work? I have similar problem with kendo charts and some images. They are shown on web page but not on exported pdf. If I remove the paperSize attribute then pdf contains all elements.
Tags
General Discussions
Asked by
ziental
Top achievements
Rank 1
Answers by
Svet
Telerik team
Juuso
Top achievements
Rank 1
Share this question
or