Charts Do Not Honor Page Setup Black and White


#1

Hello,

When creating a PDF file from a workbook with multiple sheets with data, images and charts, and setting PageSetup.BlackAndWhite to true, the charts are not being converted to black and white; they are still color.

Thinking they may need to have their own PageSetup settings, I also tried looping through all the charts on each sheet and set the charts’s PageSetup.BlackAndWhite to true.

foreach (Aspose.Cells.Worksheet wSheet in wBook.Worksheets)
{
    if (!wSheet.IsVisible) continue;
    wSheet.PageSetup.BlackAndWhite  = PrintBW;

    // check for charts in each sheet, and chart sheets
    if ( wSheet.Charts.Count > 0)
    {
        foreach (Aspose.Cells.Charts.Chart sheetChart in wSheet.Charts)
        {
            sheetChart.PageSetup.BlackAndWhite = PrintBW;
        }
    }
}

wBook.Save(OUTPUT_DIR + OUTPUT_NAME, pdfSaveOptions);

I am using Aspose.Cells .NET 18.4.3 (updated DLL from another issue).

This is my sample XLS file: Images and Charts Styles.zip (1.5 MB)

Thanks,

Sheri


#3

@sheri_steeves

Thanks for using Aspose APIs.

We were able to observe this issue as per your description by executing your sample code. Please check the output Excel and Aspose.Cells generated Pdfs for a reference.

Download Link:
Excel and Cells Pdf.zip (2.7 MB)

We have logged this issue in our database for investigation and for a fix. Once, the issue is resolved or we have some other news for you, we will update you asap.

This issue has been logged as

  • CELLSNET-46093 - Charts do not honor Page Setup Black and White

#4

@sheri_steeves

Thanks for using Aspose APIs.

This feature is not supported now. We will implement it before September 2018.


#5

I’ve just retested this today against the 19.1 ibraries from NuGet and the issue still exists. The embedded charts are still in color in the resulting PDF. Is there a new setting that I need to apply or is this still an open issue?


#6

@sheri_steeves,

I have checked the status of this ticket, which is still open. This issue is not resolved yet and we will write back here once any feedback is ready to share.


#7

@sheri_steeves,

The feature is still not supported. Supporting chart’s black and white is too complex. We will look into the issue soon and support simple charts first.


#8

@sheri_steeves,

Please try our latest version/fix: Aspose.Cells for .NET v19.3.2 (attached)

Your issue should be fixed in it.

Let us know your feedback.
Aspose.Cells19.3.2 For .Net2.Zip (4.8 MB)
Aspose.Cells19.3.2 For .Net2_AuthenticodeSigned.Zip (4.8 MB)
Aspose.Cells19.3.2 For .Net4.0.Zip (4.9 MB)


#9

The issues you have found earlier (filed as CELLSNET-46093) have been fixed in Aspose.Cells for .NET v19.4. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi


#10

Hi,

I am having the same issue and have tried .Net 19.4.0 and .Net 19.5.0.

Attached are my input file, output file and code to generate.

Please let me know if this is still an issue or I am misunderstanding something.

colortest.zip (5.3 MB)

Thanks,
Charles


#11

@ccuster68,
I have reopened the issue and will write back here once any feedback is ready to share.


#12

@ccuster68,
Please try our latest version/fix: Aspose.Cells for .NET v19.5.1 (attached)

Your issue (logged earlier as “CELLSNET-46093”) should be fixed in it.

Let us know your feedback.

Aspose.Cells19.5.1 For .Net2_AuthenticodeSigned.Zip (4.9 MB)
Aspose.Cells19.5.1 For .Net4.0.Zip (4.9 MB)


#13

Hi @ahsaniqbalsidiqui

I do not have permissions to get this update. I am logged into system and try to get file and get the following:
image.png (6.5 KB)


Gridlines print over embedded objects
#14

@ccuster68,
You may please try to download files from the following links and share the feedback.



split this topic #15

A post was merged into an existing topic: Gridlines print over embedded objects