We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Excel to PDF

Thread ID:

Created:

Updated:

Platform:

Replies:

88813 Aug 12,2009 03:59 PM UTC Aug 14,2009 04:18 AM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: XlsIO
Ketal Sheth
Asked On August 12, 2009 03:59 PM UTC

Hi,
I wanted to know if there is any way to convert Excel to PDF file.
I have 7.2.0.37 Version. If not then whats the best way to achieve it.

Thanks!

Vijesh Narayanan [Syncfusion]
Replied On August 13, 2009 07:25 AM UTC

Hi Ketal,

Thank you for using Essential XlsIO.

It is not directly possible to convert a Excel file to PDF, but a work around will be to first convert Excel file to image and then adding the image to pdf file.

Please follow the link below to find the sample application to convert Excel to PDF.

http://files.syncfusion.com//samples/XlsIO.Windows/F88813/F88813.zip

Please note that you are required to have Essential PDF installed on your system to run this application.


Please let me know if you have any further questions.

Regards,
Vijesh



Ketal Sheth
Replied On August 13, 2009 08:47 PM UTC

Thanks for the reply. I was also thinking that way. But the issue I am running in to is that the size of image converted in pdf is not correct.

Instead of using RectangleF can we use anything else so that the image quality will be good in pdf file.

g.DrawImage(img, New RectangleF(10, 20, 500, 300))

Is there a way to set the dimensions in such a way that the size of pdf text and images may be somewhat close to the original excel file.

Thanks!

Vijesh Narayanan [Syncfusion]
Replied On August 14, 2009 04:18 AM UTC

Hi Ketal,

You can try including the following code snippet into the application I sent.


doc.PageSettings.Margins.All = 0;
g.DrawImage(image, new RectangleF(10, 10,
page.Size.Width ,page.Size.Height));



You can also follow the link below to find PDF sample on Image insertion.

http://samples.syncfusion.com/ASPNET/7.3.0.20/web/Pdf.Web/samples/3.5/Graphics/InsertingImages/CS/default.aspx


Please try this and let me know if that helped.


Regards,
Vijesh

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;