We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF format different results

Hi,



I have attached one excel files from which two pdf files are generated. testName_1.pdf does not have images. Any idea about why I got testName_1.pdf? Do I miss anything? I used version 8.7.2.0.

Hi,

Thanks for your posting and using Aspose.Cells.

Please share your sample code with which you generated these Pdfs. Is your code same for both Pdfs or different? Is the machine or system environment same for both Pdfs? Let us know your feedback.

Hi,



I used basically the same codes as the following. If the code is placed in a web site then Menu_999999_20160407083903762.pdf is the resulting pdf file. If it is in a console application then Menu_999999_20160407085158594.pdf is the resulting pdf. Both came from MenuWithBackground_3Options_In.xlsx.



License license = new License();

license.SetLicense(@“C:\Users\p068244\Documents\Visual Studio 2015\Projects\Aspose\ImageIssue\ImageIssue\Aspose Cells.lic”);

Workbook workbook = null;

string excelFileName = string.Empty;

LoadOptions loadOptions = new LoadOptions(LoadFormat.Xlsx);



excelFileName = @“D:\inetpub\ficafeForms\ExcelTemplates\Menu\MenuWithBackground_3Options_In.xlsx”;

workbook = new Workbook(excelFileName, loadOptions);



workbook.CalculateFormula();

//RCTBusiness.GetExcelPdfResults(workbook, “Menu”, 999999);

DateTime now = DateTime.Now;

string dateTime = now.Year.ToString() + now.Month.ToString().PadLeft(2, ‘0’) + now.Day.ToString().PadLeft(2, ‘0’) + now.Hour.ToString().PadLeft(2, ‘0’) + now.Minute.ToString().PadLeft(2, ‘0’) + now.Second.ToString().PadLeft(2, ‘0’) + now.Millisecond.ToString().PadLeft(3, ‘0’);

string fileName = “Menu” + “999999” + dateTime;

workbook.Save(@“D:\inetpub\ficafeForms\ExcelTemplates\Menu” + fileName + “.xlsx”, SaveFormat.Xlsx);

workbook.Save(@“D:\inetpub\ficafeForms\ExcelTemplates\Menu” + fileName + “.pdf”, SaveFormat.Pdf);



Console.WriteLine(“All is done!”);

Console.ReadLine();

Hi,


Thank you for sharing the code snippet.

We have evaluated the presented scenario while using the latest version of Aspose.Cells for .NET 8.7.2.1 in a Web Application, however, we are not able to notice the said problem on our side. Moreover, the PDF file generated in a Web Application is identical to the PDF generated in a Console Application. Please download this archive containing a sample Web project along with the assembly of Aspose.Cells for .NET 8.7.2.1 and PDF files generated against both of your provided spreadsheets. Please give the project a try on your end to see if you can still replicate the said issue.

Hi,

Can you send me the zip file? I have a hard time getting it downloaded. Or where can I get version 8.7.2.1 for Aspose.Cells for testing?

Thanks,

Hi again,


I have uploaded the sample web application (in an archive) here after removing the resultant PDF files as they were making the archive size more than 43MB. By the way, latest version of Aspose.Cells for .NET is 8.7.2.2 at the moment. I have checked the scenario with this release as well, and was not able to observe any problem with the resultant PDF. Could you please try the case on your side and feed us back with your results?

Hi,

After using the most recent version 8.7.2.2 and I still could not get the image background in pdf file.

Any advice?

Hi,


I am sorry to know that you are still experiencing the problem. Could you please share your sample application along with its all dependencies and resultant PDF generated on your side? Please also provide your environment details as follow.

  • Operating system version & architecture
  • Target .NET Framework version