Convert to PDF from Excel is not respecting page breaks


#1

We are using the cloud cells api at http://api.aspose.com/v1.1/cells/


The attached xltx file (.zip extension added) was uploaded and the attached PDF file was produced. Note that the PDF does not have a page break as expected.

This was working as expected yesterday.

#2

Hi,


Thanks for your posting and using Aspose.Cells for Cloud.

We were able to observe this issue and logged it in our database for a fix.

This issue has been logged as

  • CELLSCLOUD-10031 - Convert to PDF from Excel is not respecting Page Breaks


#3

Hello, Shakeel,


Could we get an update on when this will be fixed. It is affecting a large number of our customers.

Thanks

#4

Hi,


Thanks for using Aspose.Cells for Cloud.

The issue should be fixed now. Please try again because we have already deployed it. The reason of the issues is that save options converter is invalid.

Here is the sample code to test this issue.

C#
<span style=“color: rgb(128, 0, 128); background-color: rgb(255, 255, 255); font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”>public void TestCellsCloudSDK_CustomerCase_10031()
{
//CELLSCLOUD-10031.xltx
Services.Document doc = _services.Document;
using (HttpWebResponse response = doc.Delete(“CELLSCLOUD-10031.xltx.pdf”, null))
{
Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
}
Services.Workbook book = new Services.Workbook(this._services, “CELLSCLOUD-10031.xltx”, null);
DTO.Saving.PdfSaveOptions options = new DTO.Saving.PdfSaveOptions();
options.CalculateFormula = true;
options.CheckFontCompatibility = false;
options.Compliance = “None”;
options.OnePagePerSheet = false;
options.SaveFormat = “pdf”;
using (HttpWebResponse response = book.SaveAs(“CELLSCLOUD-10031.xltx.pdf”, null, ObjectConvertJson(options)))
{
Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
}
doc.Download(“CELLSCLOUD-10031.xltx.pdf”, null, @“D:\Projects\Aspose\Aspose.Cells\Aspose.Cells for Test\Aspose.Cells.Test.Platform\TestData\Out\CELLSCLOUD-10031-json.pdf”);
using (HttpWebResponse response = doc.Delete(“CELLSCLOUD-10031.xltx.pdf”, null))
{
Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
}
string xml = “pdftruefalseNonefalse”;
using (HttpWebResponse response = book.SaveAs("CELLSCLOUD-10031.xltx.pdf", null, xml, "application/xml"))
{
    Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
}
doc.Download("CELLSCLOUD-10031.xltx.pdf", null, @"D:\Projects\Aspose\Aspose.Cells\Aspose.Cells for Test\Aspose.Cells.Test.Platform\TestData\Out\CELLSCLOUD-10031-xml.pdf");

}


#5

Hi,


Thanks for using Aspose.Cells.

Here is the simplified test case (code). I have also attached the output pdf generated by the code for your reference. If you open the output pdf, it looks OK. Let us know your feedback.

Please note, I have also attached the Sample C# Project that converts excel to pdf. It uploads the Sample.xlsx in cloud storage and converts it to Pdf in cloud and then downloads the Output.pdf from cloud storage.

C#
string strURI = “http://api.aspose.com/v1.1/cells/sample.xltx/saveAs?newfilename=output.pdf”;

strURI = Sign(strURI, m_AppSID, m_AppKey);

string xmlBody = “pdftruefalseNonefalse”;

string respStr = “”;

//Call Process Command with Signed URI
using (Stream responseStream = ProcessCommand(strURI, “POST”, xmlBody, “XML”))
{
//Convert response stream to string (optional)
respStr = StreamToString(responseStream);
}