Convert excel file To PDF

Dear team.,

I have convert xls to pdf. I need help from your side. How to hide values in converted PDF. I need only chart. Please find the input and expected output.

Input:
HTCPChart_out.zip (8.3 KB)

Expected Output:
Expected_Output.zip (27.1 KB)
Note: Expected output in PDF format.

@Vadivel_S_S

Thanks for using Aspose APIs.

Please use Chart.ToPdf() method for your needs. Please see the following sample code and its output chart Pdf for your reference.

Download Link:
Output Pdf.zip (24.2 KB)

C#

Workbook wb = new Workbook("HTCPChart_out.xls");

Worksheet ws = wb.Worksheets[0];

Chart ch = ws.Charts[0];
ch.ToPdf("output.pdf");

Hi shakeel,

Thanks for given solution.

Regards.,
S S Vadivel

@Vadivel_S_S

Thanks for your feedback and using Aspose APIs.

It is good to know that your issue is resolved with the given method. Let us know if you encounter any other issue, we will be glad to look into it and help you further.