After converting to pdf -file is corrupted

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,

Thanks for the template file.

I can notice some of the issu
es mentioned by you as per the screen shot (you attached) especially for the right-most shapes on the page. I simply opened the template file and converted to PDF file. I have logged a ticket with an id: CELLSNET-41062 for your issue. We will look into it soon.

Thank you.

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,


The generated documents (PDF files) should be same as per the print preview shown in MS Excel for its Excel file. If you find any issue, kindly attach some sample file(s) and the output PDF files by Aspose.Cells for .NET APIs, we will look into it and investigate further.

Also, please try this latest version/fix: Aspose.Cells for .NET v7.3.2.3

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.