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

Free Support Forum - aspose.cloud

Aspose.cloud Excel to pdf conversion issue

HI,

I am again facing issue with converting excel to pdf.

Converted excel to pdf using api. CERTI1660640091.pdf (56.1 KB)

Converted excel to pdf using https://products.aspose.app/cells/viewer/ CERTI.pdf (51.6 KB)

You will see difference in both the pdf. We want output like generated from https://products.aspose.app/cells/viewer/

We are facing this issue from last 12 August 2022. Before that it was working fine.

I am using CERTI.zip (21.5 KB) this excel to convert in pdf format.

@dev12scube,
We have found the cause of the problem and logged a ticket CELLSCLOUD-11868 in our issue tracking system for further investigation and resolution. We will notify you as soon as it is resolved.

By the way, did you update the font for excel file?

@wangtao,

Any update on above query ?

@dev12scube,
We have a solution, and it has been tested on QA Server. We plan to release Aspose Cells Cloud 22.8 this week. Please wait a day or two.

@wangtao,
Thanks for your support.

@dev12scube,
We have released Aspose Cells Cloud 22.8. Please try it.

@wangtao,

I have tested it. Issue is not resolved yet.
Please check generated pdf. CERTI (2).pdf (51.6 KB)

@dev12scube,
We have checked your provided Excel file.
Page setup set print area of the sheet on Your Excel file. So only convert a print area of the sheet when you convert excel to pdf.
image.png (42.4 KB)

@wangtao,

I am uploading same excel in your portal https://products.aspose.app/cells/viewer/ , I am getting expected output.

Before few days ago we are getting expected output using same excel using Aspose Cells Cloud. But from last week we are facing same issue.

Can you explain steps for excel to pdf conversion in detail ?

@dev12scube,
Convert Excel to pdf according to the effect of Excel printing.

@dev12scube,
I removed the print area’s value and converted it tothe pdf file (53.0 KB) .
Please check the file which meets your requirements.

@wangtao,

I also expecting print area’s output.

But issue is CERTI1660640091.pdf (56.1 KB) in this file. There is not padding in bottom. You can check next CERTI.pdf for identifing issue.

CERTI.pdf (51.6 KB) This is generated from your portal and also we were generating same output from aspose cell cloud library using php. This pdf file is our expected output.

@dev12scube,
Now, we can reproduce the issue. Please try set OnePagePerSheet of pdfsaveoption is true.

e.g. 1

$extended_parameters = array (
“OnePagePerSheet” => “true”
);
$result = $this->instance->postExport($files , ‘workbook’,‘pdf’,$extended_parameters );

e.g. 2

    $extended_parameters = array (
        "OnePagePerSheet" => "true"
    );
    $result = $this->instance->cellsWorkbookPutConvertWorkBook($path ,$format, $password,  $outPath,null,$extended_parameters);

@wangtao,

Its working for workbook but not for worksheet.

Below is my code :

$extended_parameters = array (
“OnePagePerSheet” => “true”
);

$result = $this->cells->postExport($files, ‘worksheet’,‘pdf’,$extended_parameters ); // Not working

$result = $this->cells->postExport($files, ‘workbook’,‘pdf’,$extended_parameters ); // Working

@dev12scube,

We found the issue and will fix it ASAP.

@dev12scube,
We have updated the fixed version(22.8.1) for Aspose Cells Cloud.
Please try it.

@wangtao,

I have checked, Its not working.

When I am using workbook its working. But for worksheet its not working.

@dev12scube,
Please check my exported file (51.5 KB).
.
Does it meet your requirement?

We are enclosing the test code.

$book1 = “CELLSCLOUD-11868.xlsx”;

    $files = array (

        $book1 =>  CellsApiTestBase::getfullfilename($book1)

    );

    $extended_parameters = array (

        "OnePagePerSheet" => "true"

    );

    $result = $this->instance->postExport($files , 'worksheet','pdf',$extended_parameters );

    // print( $result['files'][0]['file_content']);

    $this->assertNotNull($result);

   

    $bin = base64_decode($result['files'][0]['file_content'], true);

    file_put_contents('file.pdf', $bin);

@wangtao,

Not meeting. Can you please compare attached two pdfs below :

Your output TestCELLSCLOUD11870_CELLSCLOUD-11868_xlsx_worksheet_0.pdf (51.5 KB)

Our expected output is CERTI.pdf (51.6 KB)

@dev12scube,

We update parameters and export the new result.pdf (51.5 KB)
. Please check it.

Please refer to the new parameter code:

$extended_parameters = array (

        "OnePagePerSheet" => "false"

    );

    $result = $this->instance->postExport($files , 'worksheet','pdf','true',$extended_parameters );