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

Free Support Forum - aspose.com

Content is stretched in PDF

Hello,

We are currently evaluating the Aspose.Cells .NET module. Even in our simplest tests the content of our Excel documents gets stretched when saved to PDF. This means that the ratios of all images and texts are changed by about 10% (wider than original document).

The code we used:

Workbook workbook = new Workbook(“Input.xlsx”);
Worksheet worksheet = workbook.Worksheets[0];
worksheet.PageSetup.Orientation = PageOrientationType.Portrait;
workbook.Save(“Output.pdf”);

We attached a basic example to this post (both Excel input and PDF output documents).

Thanks for help/support.

Hi,


Thanks for the template files.

We have tested your scenario by converting your template Excel file to PDF, it works fine. For your information, Aspose.Cells renders the Excel file based on what is shown in print preview (in MS Excel) for the sheets which it should. Please do save the Excel file as PDF in MS Excel manually using its built-in renderer and you will get similar results as per the output by Aspose.Cells.

If you still think there is difference b/w output PDF file by Aspose.Cells and PDF file saved by MS Excel, kindly give us some screen shots comparing the contents and highlight in red circles, we will check it soon.

Thank you.

Hello,

thank you for your reply. We attached both PDF documents and a picture in which the two documents are compared. You can see clearly that the content of the document converted by Aspose.Cells is pressed together and it is not the same as the expected output as the document converted by Excel.

Thank you for your help.

Hi,


Please find attached the PDF generated by MS Excel manually from your source input file, I could not spot any significant difference comparing it to the output generated by Aspose.Cells. The file is similar to the output file by Aspose.Cells.

Thank you.

Hello,

Thank you for your reply.
We attached a more detailed version of the comparison of the two documents. I hope our problem becomes more clear now. The page size of both documents is the same but the content is pressed together. The content may be similar but we need it to be accurately the same.

Thank you for your support.

Hi,


It looks my output PDF file (by MS Excel) is different than yours. The output PDF (by MS Excel 2007) is same as output PDF by Aspose.Cells. I use MS Excel 2007 to save your template “input.xlsx” file as PDF format manually (which I attached in my previous reply) in MS Excel manually, could you check it. Which MS Excel version you used to generate yours PDF file?

Thank you.

Hello,

We use MS Excel 2013.

We attached a picture that could help make our problem more clear. You see three different documents on the picture, number one is the excel document (in MS Excel 2013), number 2 is the Pdf document converted by MS Excel 2013 and number 3 is the pdf document coverted by Aspose.Cells. You can see no difference between number 1 and 2 but number 3 is pressed together. The shape should at least be a circle and not an oval. Could you offer us a suggestion on how to fix this scaling problem?

Thanks for your help.

Hi,


Do you use the same file “Input.xlsx” file as an input (which you attached in the first post in the thread: https://forum.aspose.com/t/75454 )
to generate yours “Test Titelbild.pdf” file you attached in MS Excel 2013 manually and compared it with the output generated by Aspose.Cells. It looks the file might be different or got changed before rendering. We request you to kindly use the input file here to produce two versions of PDF in MS Excel 2007/2010 and 2013 manually by simply saving it as PDF format in it, zip the files and attach the archive here, we will further analyze it soon.

Thank you.

Hello,

yes we always used the same “Input.xlsx” file and we didn’t change anything at all before rendering it to PDF. We also used the same “Input.xlsx” file to render it with Aspose.Cells but the Output is different from the one rendered by MS Excel 2013. We can’t use MS Excel 2007/2010 to render a PDF File because we don’t have this version.
We attached the Files we use to this message.

Thank you.

Hi,


Thanks for providing further details.

We will conduct a test i.e., convert PDF file from your source “Input.xlsx” file in MS Excel 2013 manually if we get a different PDF file from what is rendered by MS Excel 2007/2010 or log an investigation ticket to evaluate your issue on our end. We will get back to you soon.

Thank you.

Hello,

do you have any further information for us about our problem?

Thank you.

Hi Gilles,


Thank for writing back.

We have already logged an investigative ticket (CELLSNET-42870) in our bug tracking system, and have requested the core development team to share their opinion on the presented scenario. Please spare us little more time for thorough investigation. As soon as we receive more updates in this regard, we will post here for your kind reference.