cherfia / chromiumly

A lightweight Typescript library that interacts with Gotenberg's different modules to convert a variety of document formats to PDF files.
MIT License
54 stars 7 forks source link

Css file #396

Closed forg002-ctrl closed 1 month ago

forg002-ctrl commented 1 month ago

Hello, how can I pass the css file to the htmlConverter? Here is my code: public async getPdfFile(): Promise const htmlConverter = new HtmlConverter(); const stream = createReadStream( join(process.cwd(), '/src/modules/booking/templates/index.html'), );

return await htmlConverter.convert({
  html: stream,
  assets: [
    {
      file: createReadStream(
        join(process.cwd(), '/src/modules/booking/templates/styles.css'),
      ),
      name: 'css',
    },
  ],
});

}