🎯 Easy PDF Generator

Simple HTML to PDF conversion - Just pass a container ID!

📋 Sample Document Content

This is a sample document that will be converted to PDF. The Easy PDF Generator can extract content from any HTML container and create a professional PDF document.

✨ Key Features:

  • Simple container ID based generation
  • Automatic text extraction from HTML
  • Professional PDF formatting
  • Mobile responsive preview modal
  • Customizable options

🚀 How It Works:

Just include the JavaScript and CSS files, then call the generation method with your container ID. The generator will automatically extract all text content and create a beautiful PDF.

Date: November 6, 2025

Generated by: Easy PDF Generator

🎮 Try It Out:

Click the buttons below to generate or preview PDF from the content above

💡 Usage Examples:

1. Quick Generation (Simplest):

// Just pass container ID - that's it! EasyPDF.quick('myContent'); // With custom filename EasyPDF.quick('myContent', 'my-document.pdf');

2. Preview Before Download:

// Show preview modal first EasyPDF.quickPreview('myContent'); // Or with the full method EasyPDF.preview('myContent', { title: 'My Document', addPageNumbers: true });

3. Custom Options:

// Full control with custom options EasyPDF.generate('myContent', { filename: 'custom-document.pdf', pageSize: 'a4', orientation: 'portrait', addHeader: true, headerText: 'My Company Report', addFooter: true, addPageNumbers: true, fontSize: 12, margin: 25 });

4. Using Class Instance:

// Create instance with default options const pdfGen = new EasyPDFGenerator({ pageSize: 'letter', addPageNumbers: true, footerText: 'Confidential Document' }); // Generate with instance pdfGen.generatePDF('myContent'); pdfGen.previewPDF('myContent');

📋 Requirements & Setup:

1. Include Required Files:

<!-- jsPDF Library (Required) --> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script> <!-- Easy PDF Generator --> <link rel="stylesheet" href="easy-pdf-generator.css"> <script src="easy-pdf-generator.js"></script>

2. HTML Structure:

<!-- Any HTML content with an ID --> <div id="myContent"> <h1>My Document Title</h1> <p>Any content here will be converted to PDF</p> <ul> <li>Lists work too</li> <li>Text formatting is preserved</li> </ul> </div>

3. Generate PDF:

// That's it! Super simple. EasyPDF.quick('myContent');