OCplan PDF Generator
Overview
Automatisk PDF-generering for OCplan dokumenter
Client-side PDF generation for web apps using Chrome DevTools Protocol (Page.printToPDF). Produces identical output to "Save as PDF" from the print dialog — silently, with no user interaction. Zero cost, no size limits, perfect WYSIWYG fidelity, with no pdf print server running. Built by OCplan ApS. How to integrate in your web app: 1. Install this extension 2. Detect the extension from your web app: if (window.__OCPLAN_PDF_EXTENSION__) { // Extension is available } 3. Request a PDF of the current page: const requestId = crypto.randomUUID(); window.addEventListener("message", (event) => { if (event.data?.type === "OCPLAN_PDF_RESULT" && event.data.requestId === requestId) { if (event.data.success) { const bytes = Uint8Array.from(atob(event.data.pdfBase64), c => c.charCodeAt(0)); const blob = new Blob([bytes], { type: "application/pdf" }); // Use the PDF blob (download, upload, etc.) } } }); window.postMessage({ type: "OCPLAN_GENERATE_PDF", requestId, options: { paperWidth: 8.27, paperHeight: 11.69, printBackground: true, scale: 1, marginTop: 0, marginBottom: 0, marginLeft: 0, marginRight: 0, } }, "*"); Options: paperWidth, paperHeight (inches), printBackground (boolean), scale (number), marginTop/Bottom/Left/Right (inches).
0 out of 5No ratings
Details
- Version1.0.0
- UpdatedMarch 11, 2026
- Offered byOCplan ApS
- Size37.69KiB
- Languagesdansk
- DeveloperOCplan ApS
Odinsgade 6, st Herning 7400 DKEmail
dbo@ocplan.dkPhone
+45 27 28 94 41 - TraderThis developer has identified itself as a trader per the definition from the European Union and committed to only offer products or services that comply with EU laws.
- D-U-N-S306366850
Privacy
This developer declares that your data is
- Not being sold to third parties, outside of the approved use cases
- Not being used or transferred for purposes that are unrelated to the item's core functionality
- Not being used or transferred to determine creditworthiness or for lending purposes