☝️Small business or a startup? See if you qualify for our special offer.
+

Print with chromium browser

Answered
Julien PULEO asked on September 2, 2025

I would like to format the pivot to be printed with a Chromium-type browser.

The same thing like print() method but without the print dialog, directly in the page (because the browser should print the page).

How can i do this ?

Thanks.

7 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster September 3, 2025

Hello, Julien!

Thank you for reaching out to us.

If we understand correctly, you want to use Flexmonster print() functionality without the actual print dialog shown. If so, we recommend using a headless browser approach to export the pivot to HTML or PDF without seeing any pop-up windows, for example, as described in the following guide: https://www.flexmonster.com/doc/export-report/#export-without-browser.

Hope you will find our answer helpful.
Feel free to ask if there are any further questions.

Kind regards,
Solomiia

Public
Julien PULEO September 3, 2025

Hi,

Thanks for your answer but it's not that I want.

I can't use print méthod.

The service with chromius browser print the page automatically like the print menu in the classic browser.

So, I can format the pivot before to see all lines and columns (remove all navigation bar inside pivotTable), the pivot must be visible in its entirety.

King regards

 

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster September 5, 2025

Hello, Julien!

Thank you for your swift response.

Kindly note that Flexmonster implements the virtual grid feature and loads data incrementally as you scroll. If we understand correctly, you want to print all the data from Flexmonster, including what’s currently out of view, when printing the entire webpage. In that case, please note that Flexmonster does not render all the data automatically for a full-page print.

Before advising you further, we would like to ask for more details about the case. For example, is the print of the page configured programmatically? Are you using a third-party tool to print the page? Please provide us with this and any details that may be helpful in understanding the case better.

Looking forward to hearing from you.

Kind regards,
Solomiia

Public
Julien PULEO September 5, 2025

Hello Solomiia,

I'll explain the context a little more so you can understand the need.

We have a service that allows you to subscribe to reports in order to export them and automatically send them by email.

For this, we use CefSharp.OffScreen, which is a CEF transposition using chromiumembeddedframework (v138.0.17).

The problem is that the current printout doesn't display the entire pivot; it only displays what we see on the page, i.e., the first few lines with the scrollbars.

When using this service, we have a client-side flag that allows me to apply formatting to the pivot before printing.

The goal would be to have the same rendering as the print() function.

King regards,

Julien

 

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster September 8, 2025

Hello, Julien!

Thank you for your detailed response. It helped our team to understand the case better.

For the described case, we can suggest two possible approaches to modify Flexmonster using the mentioned flag that allows applying changes to the pivot before printing:

  1. Update the dimensions of the pivot to stretch the grid, so all the data fits in the grid and there are no scrolls. This would require calculating the necessary width and height of the pivot based on the number of data rows.

  2. Use our built-in export to HTML under the hood, which will generate the HTML with all the data visible for printing. Then, swap the interactive grid with the printed one when the HTML page is prepared for printing.
    We believe this approach is more suitable for your use case, and have prepared the JSFiddle sample showing how to swap pivot to printing version on a trigger(button click): https://jsfiddle.net/flexmonster/eb02k8qu/.

Please let us know if the suggested approach with exporting the pivot to HTML works for your case.

Looking forward to hearing from you.

Kind regards,
Solomiia

Public
Julien PULEO September 11, 2025

Hello Solomiia,

Thanks for your solution.

I tried the built-in export to HTML and it seems to work but I would like to print all data, so I call expandAllData() method before the export and the result is imcomplete, the result show detail data but only the row count and column count of original Pivot (whithout Expanded data).

I think it's a prb on export, the number of row and column is not recalculate.

Can you check this issue ?

King regards

Julien

 

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster September 12, 2025

Hello, Julien!

Thank you for getting back to us.

Kindly note that expandAllData() can take some time, so we need to be sure it's completed before starting to print the data. We recommend using aftergriddraw event to check when the pivot is re-rendered with all the nodes expanded.

Please check out the updated JSFiddle: https://jsfiddle.net/flexmonster/x13ezck0/.
In the example, we updated the swapToHTML() method with aftergriddraw event handling and added report variable to store the state of the pivot before expandAllData().

Hope you will find our answer helpful.

Kind regards,
Solomiia

Please login or Register to Submit Answer