How to generate server-side PDFs containing charts (ECharts, ApacheChart) and tables in Node.js efficiently

I am currently generating PDFs server-side using Puppeteer, which contains dynamic data including charts (ECharts, ApacheChart) and tables. After generating the PDFs, I send them to Telegram. However, Puppeteer is resource-heavy and not the most efficient solution for this use case.

I would like to explore alternatives for generating these PDFs. My goal is to:

Use JSX or HTML to render dynamic data.
Create a PDF containing charts and tables.
Ensure the solution is lightweight and optimized for server-side processing.
What are some better approaches to generate PDFs server-side in Node.js, especially with charting libraries like ECharts and ApacheChart? Is there any lightweight library or tool that could replace Puppeteer?

Here is the sample code I am currently using with Puppeteer

const puppeteer = require('puppeteer');
const fs = require('fs');

async function generatePDF() {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();

  const chartHtml = `
    <html>
      <head>
        <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/echarts.min.js"></script>
      </head>
      <body>
        <div id="chart" style="width: 600px; height: 400px;"></div>
        <script>
          const chart = echarts.init(document.getElementById('chart'));
          chart.setOption({
            xAxis: {
              type: 'category',
              data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
            },
            yAxis: {
              type: 'value'
            },
            series: [{
              data: [820, 932, 901, 934, 1290, 1330, 1320],
              type: 'line'
            }]
          });
        </script>
      </body>
    </html>
  `;

  await page.setContent(chartHtml);
  await page.pdf({ path: 'chart.pdf', format: 'A4' });

  await browser.close();
}

generatePDF();