Please notice that you need to set the image url with full absolute path(contains “http://”)
I know about setting the full image url, but that is only when the image is in the image folder of the project, where the full path can be gotten. But the thing is, in my Web page the image will be uploaded on to the page; it is not going to be from the
image folder. So the image url is unknown since the user will only upload it. In this case which url will be used please, or is there any other way to render image in PDF with full image path where image is uploaded from client/user side?
I thought that after uploading an image file to an image control and the image displays, then click on a button to convert to PDF, the image will be displayed in the PDF
Member
66 Points
175 Posts
Rendering Image in PDF conversion
Oct 28, 2020 09:53 AM|georgeakpan233|LINK
I have a code that converts web page to PDF. How can image be rendered in this code that converts web page content to PDF?
Member
40 Points
17 Posts
Re: Rendering Image in PDF conversion
Oct 29, 2020 09:23 AM|kyle0418|LINK
Did you want to print the image in exported pdf?
Here is a simple demo you can refer to.
Please notice that you need to set the image url with full absolute path(contains “http://”), like
Or,
Member
66 Points
175 Posts
Re: Rendering Image in PDF conversion
Oct 29, 2020 10:20 AM|georgeakpan233|LINK
Hi kyle0418,
I know about setting the full image url, but that is only when the image is in the image folder of the project, where the full path can be gotten. But the thing is, in my Web page the image will be uploaded on to the page; it is not going to be from the image folder. So the image url is unknown since the user will only upload it. In this case which url will be used please, or is there any other way to render image in PDF with full image path where image is uploaded from client/user side?
Contributor
5921 Points
2450 Posts
Re: Rendering Image in PDF conversion
Oct 29, 2020 06:04 PM|KathyW|LINK
"So the image url is unknown since the user will only upload it. "
Upload it to where?
Member
66 Points
175 Posts
Re: Rendering Image in PDF conversion
Oct 29, 2020 06:56 PM|georgeakpan233|LINK
Upload it to an image control, using fileupload button
Contributor
5921 Points
2450 Posts
Re: Rendering Image in PDF conversion
Oct 30, 2020 02:19 AM|KathyW|LINK
Fileupload - save it to a folder in your site, then display it. What are you doing now?
Member
66 Points
175 Posts
Re: Rendering Image in PDF conversion
Oct 30, 2020 04:21 AM|georgeakpan233|LINK
I thought that after uploading an image file to an image control and the image displays, then click on a button to convert to PDF, the image will be displayed in the PDF
Contributor
5921 Points
2450 Posts
Re: Rendering Image in PDF conversion
Oct 30, 2020 07:17 AM|KathyW|LINK
I don't know what you mean by "uploading a file to an image control".
Save the file to a folder on your site. Reference that file in the image control. You'll have a URL to use for the PDF.
If the image isn't supposed to hang around after the PDF is generated, delete it from your site folder after creating the PDF.
Member
66 Points
175 Posts
Re: Rendering Image in PDF conversion
Oct 30, 2020 09:21 AM|georgeakpan233|LINK
Understood. Thanks