Excel file to pdf

I am converting an excel file to pdf using the aspose.cells.node library with nodejs. But the red-blue logo in excel turns red. What could be the problem?

@emrahsimsek

When converting an Excel file to PDF using the Aspose.Cells library, if you notice that colors, such as a red-blue logo, are not rendering correctly (e.g., the blue turns red), it could be due to several factors related to color management during the conversion process.

Here are a few suggestions to troubleshoot and potentially resolve the issue:

  1. Check Color Settings: Ensure that the color settings in your Excel file are correctly defined. Sometimes, colors may appear differently based on the color profile used in the Excel application.

  2. Update Aspose.Cells Library: Make sure you are using the latest version of the Aspose.Cells library. Updates often include bug fixes and improvements that could resolve rendering issues.

  3. Use PdfSaveOptions: When saving the workbook to PDF, consider using PdfSaveOptions to customize the output. This can help in managing how colors and other elements are rendered. For example, you can specify options like OnePagePerSheet to control the layout.

    Here is a basic example of how to use PdfSaveOptions in your Node.js application:

    const { Workbook, PdfSaveOptions } = require('aspose.cells');
    
    // Load the Excel file
    let workbook = new Workbook("path/to/your/excel/file.xlsx");
    
    // Create PdfSaveOptions
    let pdfSaveOptions = new PdfSaveOptions();
    pdfSaveOptions.setOnePagePerSheet(true); // Example option
    
    // Save the workbook to PDF
    workbook.save("path/to/output/file.pdf", pdfSaveOptions);
    
  4. Test with Different Files: Try converting different Excel files to see if the issue is specific to a particular file or a general problem with the conversion process.

  5. Contact Support: If the problem persists, consider reaching out to Aspose support with specific details about your issue, including the version of the library you are using and a sample file that reproduces the problem.

By following these steps, you should be able to identify the cause of the color rendering issue and find a suitable solution.

@emrahsimsek

Please provide us your template file to reproduce the issue so we can look into it and figure the issue out for you.

Thanks for your answer. Actually I don’t think there is a problem with the code or Excel. Because my local computer is working fine with Windows 11, but my project is on an Ubuntu server and it is not working properly. Fonts etc. were also problematic. I installed the missing fonts and it was fixed. But the color did not improve.
AĞAÇ İŞLEME TEZGAHI PERİYODİK MUAYENE RAPORU-676ed10300951ccb17222253.pdf (84.7 KB)

@emrahsimsek,

Thanks for the PDF document.

I checked your output PDF file by Aspose.Cells. I guess you are talking about the top-left logo which is rendered in red. I can notice the logo is in red in the output PDF. But, we require your template Excel file to evaluate your issue precisely on our end. So, kindly do the needful and provide us the source Excel file (please zip the file prior attaching) as well here. We will test the conversion using the Excel file in our environment and update you soon. By the way, please do confirm if you are using the same Excel file on Ubuntu server, which works fine on your local machine (Windows 11) as you mentioned?

AĞAÇ İŞLEME TEZGAHI PERİYODİK MUAYENE RAPORU-676ed10300951ccb17222253.zip (33.0 KB)

Yes, when I test this file locally and on the server, the same thing happens.

So do you provide this service as an API? We can probably do this with the best settings. It would be very convenient for users.

@emrahsimsek,

Thanks for the template Excel file.

I tested your scenario using the provided Excel template, and everything works fine on my end. Attached is the output PDF, which appears correct (the logo color is OK).
out1.pdf (94.2 KB)

However, I noticed some corrupted records in your Excel workbook. When I opened the file in MS Excel manually, it displayed error messages before loading the content. Could you confirm whether you are using the same Excel file (as you shared in your previous post in the thread) on the Ubuntu server? To ensure consistency, try placing a fresh copy of the Excel file in a new folder, specify the exact file path when initializing the workbook, and then re-save it as a PDF. This will help confirm that no other version of the Excel file is being used on the Linux server.

@emrahsimsek
The issue can be reproduced on Linux. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNODEJSCPP-36

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@emrahsimsek
The bug will be fixed in Aspose.Cells for Node.js via C++ v25.3.

thank you, I will check and let you know

@emrahsimsek,

You’re welcome! The next version, Aspose.Cells for Node.js via C++ v25.3, is scheduled to be released either this week or the next week. We’ll keep you updated as soon as it’s available.

@emrahsimsek
Aspose.Cells for Node.js via C++ v25.3 has been released. The bug has been fixed in this version.