Convert Excel to PDF problem

Hi,

We are having a problem with the converting Excel to PDF.
The excel file has 4 page print but the PDF output always has only one page print.
This was working a long time with no problem until yesterday.
It seems like you had some changes in your cloud service recently.
Please look at this as soon as possible.
This is causing a serious problem with us as all PDF output files become unusable for our customers.

p/s: my colleague already posted this problem with detailed information at https://forum.aspose.com/t/66383

Thanks,
Tuan

Hi,


Thanks for providing us details.

We are looking into your issue and will get back to you soon.

Thank you.

This problem is affecting to our live services so please fix it as soon as possible. Thank you.

Hi,

I observed the issue as you mentioned. By converting an Excel file (which contains more than 1 pages) via Aspose.Cells for Cloud APIs, we always get the PDF file with only one page (first page only) even though the Excel file is set to more than one printable pages. I used the template file (from the other thread) on the Cloud service with the following sample code:
e.g
Sample code:

APPKey.AppSID = “787xxxxxxxxxxxxxxxxxxxxxxxxxx”;
APPKey.AppKey = “3949xxxxxxxxxxxxxxxxxxxxxxx”;

string xml = @“
true
false
None
false
90
70
Pdf
”;

//build URI
string strURI = “http://api.aspose.com/v1.1/cells/excelfile1.xlsx/saveAs?newfilename=outexcelfile1.pdf&isAutoFitRows=true”;

//sign URI
string signedURI = Sign(strURI);
POST(signedURI, xml);
//build URI
strURI = “https://api.aspose.com/v1.1/storage/file/outexcelfile1.pdf”;

signedURI = Sign(strURI);

using (HttpWebResponse response = GET(signedURI))
{
using (var stream = File.Create(@“e:\test2\outFileExcel191.pdf”))

{ response.GetResponseStream().CopyTo(stream); }

}

…

I have attached both source and output files for your reference.

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

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

Thank you.

Thank you for your confirmation.
When do you expect that this issue is resolved ?
In the meantine, is there any solution or workaround to make the convert Excel to PDF work as it is before ?

Hi,


I am afraid, as the issue is just logged and is pending for analysis. Once the issue is analyzed, we will be in better position to update you regarding the fix or provide any eta if possible.

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

Also, in the mean time if we find any workaround, we will share it with you here.

Thank you.

Hi Tuan,

We pushed some changes yesterday but those were not related to Cells. This issue has the highest priority and our development team is in the process of investigating and fixing this issue. This will be fixed very soon. We will update you as soon as it is resolved.

Sorry for the inconvenience.

Best Regards,

Hi Tuan,

The issue has been fixed. Please check at your end and let us know if you still see any issue.

Best Regards,

It worked now. Thank you very much for your quick fix.

Hi,


Thanks for your feedback.

Good to know that your issue is sorted out now. Feel free to write back in case you have further comments or queries, we will be happy to assist you soon.

Thank you.

I still have this exact error.

I only get one page per sheet when converting from XLXS to PDF.

Tested 5 min ago.

Hi John Wagner,

Cokeisit:
I still have this exact error.

I only get one page per sheet when converting from XLXS to PDF.

Tested 5 min ago.

Please check if you have set OnePagePerSheet option set to true for PdfSaveOptions in your codes. If you still find the issue, kindly attach your template file here, we will check it soon.

Thank you.

If OnePagePerSheet is set to true I only get one page, the rest of the sheet is just discarded.

File attached.


Hi John Wagner,

Thanks for providing your source Excel file and using Aspose.Cells for Cloud.

I converted your Excel file into PDF using Aspose.Cells for Cloud with the following sample code after setting OnePagePerSheet true and false and it generated the correct PDFs. I have attached both PDFs for your reference.

Please check the red bold line inside the code.

Java

import java.io.InputStream;

import com.aspose.cloud.common.AsposeApp;

import com.aspose.cloud.common.Product;

import com.aspose.cloud.common.Utils;

import com.aspose.cloud.storage.Folder;

public class CloudTest {

public static void main(String[] args) throws Exception

{

Product.setBaseProductUri(“http:[//api.aspose.com/v1.1](https://api.aspose.com/v1.1)”);

AsposeApp.setAppSID(“xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”);

AsposeApp.setAppKey(“xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”);

String uploadFileName = “Diagram.xlsx”;

String pdfFileName = “OnePagePerSheet-False.pdf”;

UploadFile(uploadFileName);

SaveToPDF(uploadFileName, pdfFileName);

DownloadFile(pdfFileName);

System.out.println(“Tested”);

}

public static void DownloadFile(String fileName) throws Exception

{

Folder root = new Folder();

InputStream responseStream = root.GetFile(fileName);

Folder.SaveStreamToFile(fileName, responseStream);

}

public static void UploadFile(String fileName) throws Exception

{

Folder root = new Folder();

root.UploadFile(fileName, “”);

}

public static void SaveToPDF(String uploadFileName, String pdfFileName) throws Exception

{

String strURIPdf = “http:[//api.aspose.com/v1.1/cells/](https://api.aspose.com/v1.1/cells/)” + uploadFileName + “/saveAs?newfilename=” + pdfFileName

+ “&isAutoFitRows=True&isAutoFitColumns=False”;

String signedURISavePdf = Utils.Sign(strURIPdf);

// The builder of PDFSaveOptions

StringBuilder xml = new StringBuilder();

xml.append("\n “);

xml.append(”\n true");

xml.append("\n true");

xml.append("\n false");

xml.append("\n None");

**xml.append("\n false");**

xml.append("\n Pdf");

xml.append("\n ");

System.out.println("PDFSave options : " + xml.toString());

System.out.println("strURIPdf (raw URL) : " + strURIPdf);

System.out.println("signedURISavePdf : " + signedURISavePdf);

InputStream responseSave = Utils.ProcessCommand(

signedURISavePdf, “POST”, xml.toString(), “xml”);

// Save into PDF file directly on Aspose.Cloud

String strResponseSave = Utils.StreamToString(responseSave);

System.out.println("SaveToPDF Response: " + strResponseSave);

}

}