export const BOOK_6X9_PRINT_OPTIONS = {
    pageSize: {
        width: 152400, // 6 inches in microns
        height: 228600, // 9 inches in microns
    },
    marginsType: 0,
    printBackground: true,
    preferCSSPageSize: true,
};
/**
 * Renders HTML string to PDF buffer using Electron webContents printToPDF API.
 */
export async function renderHtmlTo6x9Pdf(htmlContent, cssStyles, electronWebContentsPrintToPDF) {
    // Wrap HTML into full document container with print media styles
    const fullDocumentHtml = `
    <!DOCTYPE html>
    <html>
      <head>
        <meta charset="utf-8">
        <style>
          ${cssStyles}
        </style>
      </head>
      <body>
        ${htmlContent}
      </body>
    </html>
  `;
    // Note: Caller in Obsidian plugin will load HTML into a hidden Electron WebContents window or offscreen renderer
    // and invoke printToPDF(BOOK_6X9_PRINT_OPTIONS).
    const pdfBuffer = await electronWebContentsPrintToPDF(BOOK_6X9_PRINT_OPTIONS);
    return pdfBuffer;
}
//# sourceMappingURL=renderer.js.map