Hi Our customer has an excel file,When we convert it to pdf ,pdf file is corrupted.I attached original file and pdf screen shot for you.Could you please check it
The issues you have found earlier (filed as CELLSNET-41062) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
I tried.Our document seems as true now,I want to ask a question.Our customers have more than 500.000 document file.Ther format's doesn't like eachother.I have to use print area method but it has some problems.
I modificate my code like this,Is it true?
foreach (Worksheet sheet in workbook.Worksheets)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
maxCol = sheet.Cells.MaxColumn;
maxRow = sheet.Cells.MaxRow;
if (sheet.Cells.MaxDataColumn-1 > sheet.Cells.MaxColumn) maxCol = sheet.Cells.MaxDataColumn-1;
if (sheet.Cells.MaxDataRow-1 > sheet.Cells.MaxRow) maxRow = sheet.Cells.MaxDataRow-1;
if (sheet.Cells.MaxDisplayRange.ColumnCount - 1 > maxCol) maxCol = sheet.Cells.MaxDisplayRange.ColumnCount - 1;
if (sheet.Cells.MaxDisplayRange.RowCount - 1 > maxRow) maxRow = sheet.Cells.MaxDisplayRange.RowCount - 1;
if (maxCol > 0 && maxRow > 0)
Aspose.Cells.PageSetup pageSetup = sheet.PageSetup;
pageSetup.PrintArea = "A1:" + CellsHelper.CellIndexToName(maxRow, maxCol);
Thanks for using Aspose.Cells for .NET.
If you want to get rid of Print Preview of Ms-Excel as mentioned by Amjad, then you can also print your entire worksheet as a single page.
Please check the following sample code. It will print each worksheet as a single page in output pdf.
Workbook workbook = new Workbook(“c:\source.xlsx”);
//Save each worksheet into a single pdf page
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.OnePagePerSheet = true;
//Save the pdf file
For more help, please see the following article for your reference.