{"message":"HTML to PDF API","version":"2.0.0","architecture":"MVC Pattern","endpoints":{"POST /api/v1/pdf/html":{"description":"Convert HTML string to PDF","body":{"html":"string (required) - HTML content","options":"object (optional) - PDF options"}},"POST /api/v1/pdf/url":{"description":"Convert URL to PDF","body":{"url":"string (required) - URL to convert","options":"object (optional) - PDF options"}},"POST /api/v1/pdf/file":{"description":"Convert HTML file to PDF","body":{"htmlFile":"file (required) - HTML file","options":"string (optional) - JSON string of PDF options"}},"POST /api/v1/pdf/count-pages":{"description":"Count pages in a base64 PDF","body":{"pdf":"string (required) - Base64 encoded PDF data"}},"GET /api/v1/health":{"description":"Health check endpoint"},"GET /":{"description":"API documentation"}},"pdfOptions":{"format":"string - Paper format (A4, A3, A2, A1, A0, Legal, Letter, Tabloid) - Default: A4","margin":"object - Page margins { top, right, bottom, left } - Default: { top: \"50px\", right: \"30px\", bottom: \"50px\", left: \"30px\" }","printBackground":"boolean - Print background graphics - Default: true","landscape":"boolean - Paper orientation (false = portrait, true = landscape) - Default: false","displayHeaderFooter":"boolean - Display header and footer - Default: true","headerTemplate":"string - HTML template for the header","footerTemplate":"string - HTML template for the footer (includes page numbers by default)","preferCSSPageSize":"boolean - Give preference to CSS page size - Default: false","javascript":"string - JavaScript code to execute in the page before PDF generation","jsWaitTime":"number - Milliseconds to wait after JavaScript execution - Default: 1000","width":"string - Paper width (overrides format)","height":"string - Paper height (overrides format)"},"examples":{"htmlToPdf":{"url":"/api/v1/pdf/html","method":"POST","body":{"html":"<h1>Hello World</h1>","options":{"format":"A4","margin":{"top":"50px","right":"30px","bottom":"50px","left":"30px"}}}},"urlToPdf":{"url":"/api/v1/pdf/url","method":"POST","body":{"url":"https://example.com","options":{"format":"A4","landscape":false}}},"countPdfPages":{"url":"/api/v1/pdf/count-pages","method":"POST","body":{"pdf":"JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovT3V0bGluZXMgMiAwIFIKL1BhZ2VzIDMgMCBSCj4+CmVuZG9iago..."}}}}