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
Hi,
Please download and try this fix:
Aspose.Cells
for .NET v7.3.1.5
At present, we can do the best results as shown in attachment.
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.
Hi,
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 modified my code like this,Is it true?
foreach (Worksheet sheet in workbook.Worksheets)
{
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);
}
}
Hi,
Hi,
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.
C#
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
workbook.Save(“c:\output.pdf”, pdfSaveOptions);
For more help, please see the following article for your reference.