Excel-to-PDF: Document is full size in excel- but only takes up a small part of the PDF

Hi,

Please change your code for opening workbook to Workbook.Open(stringpath/stream, FileFormatType.Excel2007Xlsx )

1. Well, by default all the worksheets get converted to .pdf file,

2. Size of file is increased after converting it into pdf.

which size(of pdf, xls/xlsx or xml file) you are talking about. Could you create a sample test with template file to show the issue.

Thank you.

Hi,

Thanks for reply,

Now i am able to convert .xlsx to .pdf.

but all the sheet of excel file doesn't converted into pdf i m using below code please take a look.

Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook();

wb.Open(inFileName,Aspose.Cells.FileFormatType.Excel2007Xlsx);

Aspose.Cells.Workbook singleSheet = new Aspose.Cells.Workbook();

singleSheet.Worksheets[0].Copy(wb.Worksheets[0]);

MemoryStream stream = new MemoryStream();

singleSheet.Save(stream, Aspose.Cells.FileFormatType.AsposePdf);

Aspose.Pdf.Pdf myPdf = new Aspose.Pdf.Pdf();

myPdf.BindXML(stream, null);

myPdf.IsTruetypeFontMapCached = true;

myPdf.TruetypeFontMapPath = Path.GetTempPath();

myPdf.Save(outFileName);

** And i am talking of PDF file size, it's size is more than original excel file.

Thanks,

Neelesh

Hi,

Could you please post your template(.xlsx) file here so that we may check and figure out the issue soon.

Thank you.

Hi,

please find the attached template file.

Please remove .xls from file extension .xlsx is not able to attached.

thanks,

Neelesh

Hi,

Please zip your .xlsx file and re-attach it here.

Thank you.

Hi

please find attached zip file...

thanks,

Neelesh

Hi,

Thanks for the template .xlsx file.

We will check and get back to your soon.

Thank you.