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

Free Support Forum - aspose.com

Problems with Excel to PDF conversion

Hello,

I have a following problems with conversion Excel file to PDF file.

I have long Excel file (about 1000 rows).
When I use GET call:

http://api.aspose.com/v1.1/cells/long_file.xlsx?format=pfd&folder=Temp

output PDF file is empty (not really empty, I can select and copy a text but the text in PDF is invisible).
For shorter excel files it works fine.
I have attached example input and output files.

Word wrapping in PDF file generated from Excel file doesn’t work.


Edit:

Word wrapping in PDF doesn’t work only when excel file is generated from template
first step - POST with XML data to:

http://api.aspose.com/v1.1/cells/{outputFile}?templatefile={templateName}&folder={folder}
second step - GET

http://api.aspose.com/v1.1/cells/{outputFile}?format=pdf&folder={folder}

In this case word wrapping in PDF file doesn’t work

Paging in PDF file generated from Excel file doesn’t work.
This issue is similar to:

Best Regards,
Lukasz

Hi,

Thanks for providing us template files.

  1. I observed the issue as you mentioned by using your template file. The rendered PDF file is empty for the Excel file. Here is my sample code using your template file which I uploaded to my default Cloud storage.
    e.g
    Sample code:
//build URI for Workbook conversion to other formats
string strURI = “http://api.aspose.com/v1.1/cells/long_file.xlsx?format=PDF”;

//sign URI
string signedURI = Sign(strURI);

//get response stream
Stream responseStream = ProcessCommand(signedURI, “GET”);

using (Stream fileStream = System.IO.File.OpenWrite(“e:\test2
out1.pdf”))

{ CopyStream(responseStream, fileStream); }
responseStream.Close();

I have logged a ticket with an id “SAASCELLS-84” for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

  1. Please provide sample file and paste sample code here, we will evaluate your issue soon. If we found the issue, we will log a ticket for it into our database so it would fixed soon.

  2. Your logged issue “SAASCELLS-82” is fixed but fix will be available after we will deploy change to production server. Once it is done, you will notified in your thread.

Thank you.

Hello,

thank you for your reply.

2) Please provide sample file and paste
sample code here, we will evaluate your issue soon. If we found the
issue, we will log a ticket for it into our database so it would fixed
soon.

I’ve attached:
- xlsx template file
- input xml data
- result PDF file.

Sample code:

var xmlData = File.ReadAllText(@“d:\import.xml”);

var file = GenerateAndGetExcelFileBasedOnTemplate(“Templates”,“template.xlsx”, xmlData, “pdf”);

File.WriteAllBytes(@“d:\result.pdf”, file);

Implementation of GenerateAndGetExcelFileBasedOnTemplate method is in attached file implementation.txt

In this case columns “Project Name” and “TLevel1” in generated pdf should be wrapped.

Best Regards
Lukasz

Hi,


Thanks for the sample files.

Could you also try to save as an XLSX file based on the xml data and template XLSX file and provide us here for further evaluation on our end, we will check it soon.

Thank you.

Hi,

3) Your logged issue “SAASCELLS-82” is fixed
but fix will be available after we will deploy change to production
server. Once it is done, you will notified in your thread.

Did you deploy this fix to production server? I noticed that paging still doesn’t work correctly.

Lukasz

Hi,


Well, the issue “SAASCELLS-82” should be fixed. We already deployed the fix on the live server.
We check your sample codes for the issue. Well, you provide only a part of code. Could you provide a complete sample example or console application (runnable) so that we could run and evaluate your issue more precisely.

Thank you.