[Python] How to Freeze a Flourish Studio Bar Chart Race Every 0.01s for High-Quality PDF...

Discussão em 'Python' iniciado por Stack, Março 16, 2025.

  1. Stack

    Stack Membro Participativo

    I created the following Flourish Studio bar chart race as an example for this topic:
    https://flo.uri.sh/visualisation/19321054/embed

    Now, I want to capture a sequence of PDF prints from this bar chart race, recording all movements and frames using the browser’s Print to PDF feature.

    Why PDF Print?

    I plan to later convert these PDF prints into a high-quality 4K video. The reason I prefer PDF prints over screen recording is that:


    • When zooming into the PDF, there is no blurriness, and the quality remains sharp.


    • Traditional screen recording (even with upscaling) results in blurry and low-quality frames when zoomed in.

    Please do not suggest screen recording tools like OBS! They do not produce the high-quality frames I need.

    Methods I Have Tried (But Failed)
    I have attempted the following approaches, but they all have limitations in capturing and saving PDF print sequences efficiently:

    • Puppeteer (Node.js & Python)
    • Puppeteer with multiple browser contexts
    • Playwright (Python)
    • Built-in console commands (Chrome & Firefox)
    • Selenium WebDriver

    All of these methods have a limitation: they can only capture one print every ~5 seconds, which is too slow.
    I also tested MSS and DxCam, but they only record the screen, not the direct PDF print output from the browser. Screen recording is not as sharp as a PDF print.

    My Current Idea
    Since all other methods failed, I am looking for a way to freeze the bar chart race every 0.01 seconds and take a PDF print from each frozen frame.

    My question:
    Is there any tool, extension, script, or plugin that can freeze the Flourish Studio bar chart race every 0.01 seconds so that I can print each frame to a PDF?

    Important Notes:


    • The built-in pause button of Flourish does not help, because when I pause, the bars automatically rearrange or shift, making it impossible to capture all frames accurately.


    • My PC is low-end and does not have a good GPU or capture card, so I cannot use high-performance screen recording tools.

    My last hope is finding a tool that can:


    • Freeze the Flourish Studio animation every 0.01s


    • Allow me to print each frozen frame as a PDF

    Does anyone know of a solution? Thanks in advance!

    Continue reading...

Compartilhe esta Página