agentleFS
roedyrustamroedyrustam/vibes-plug/skills/pdf-document-generation-expert/SKILL.md

pdf-document-generation-expert

Skill73 starsChanged 58 days agoMITView on GitHub

Expert guide for PDF generation and document processing (React PDF, Puppeteer, jsPDF, pdf-lib) / Panduan ahli generasi PDF dan pemrosesan dokumen (React PDF, Puppeteer, jsPDF, pdf-lib).

The file

Files
SKILL.md

PDF & Document Generation Expert (2026 Edition)

English | Bahasa Indonesia


<a name="english"></a>

English

Orchestration & Integration

  • email-notification-expert: PDF attachments in transactional emails.
  • saas-billing: Invoice and receipt PDF generation.
  • file-upload-media-expert: PDF storage and CDN delivery.

Description

Expert guide for generating PDFs and processing documents in web applications. Covers React PDF (@react-pdf/renderer), Puppeteer HTML-to-PDF, jsPDF, pdf-lib, invoice generation, report templates, digital signatures, and document parsing.

Trigger Conditions

  • Generating invoices, receipts, or reports as PDFs.
  • Converting HTML pages to downloadable PDFs.
  • Building document templates with dynamic data.
  • Implementing digital signatures on PDF documents.

Library Selection

LibraryApproachServer/ClientBest For
@react-pdf/rendererReact components → PDFBothComplex layouts
PuppeteerHTML → PDF (headless Chrome)ServerPixel-perfect from HTML
jsPDFProgrammatic canvasClientSimple client-side PDFs
pdf-libLow-level PDF manipulationBothModify existing PDFs
// React PDF — Invoice generation
import { Document, Page, Text, View, StyleSheet, renderToBuffer } from '@react-pdf/renderer';

const styles = StyleSheet.create({
  page: { padding: 40, fontSize: 12 },
  header: { fontSize: 24, marginBottom: 20, color: '#8B5CF6' },
  row: { flexDirection: 'row', justifyContent: 'space-between', marginBottom: 8 },
  total: { fontSize: 16, fontWeight: 'bold', borderTopWidth: 1, paddingTop: 8, marginTop: 16 },
});

function InvoicePDF({ invoice }) {
  return (
    <Document>
      <Page size="A4" style={styles.page}>
        <Text style={styles.header}>Invoice #{invoice.number}</Text>
        {invoice.items.map((item, i) => (
          <View key={i} style={styles.row}>
            <Text>{item.description}</Text>
            <Text>${item.amount.toFixed(2)}</Text>
          </View>
        ))}
        <View style={styles.total}>
          <Text>Total: ${invoice.total.toFixed(2)}</Text>
        </View>
      </Page>
    </Document>
  );
}

// Server-side render to buffer
export async function generateInvoicePDF(invoice) {
  return await renderToBuffer(<InvoicePDF invoice={invoice} />);
}

Orchestration & Integration

  • email-notification-expert, saas-billing, file-upload-media-expert

<a name="bahasa-indonesia"></a>

Bahasa Indonesia

Deskripsi

Panduan ahli untuk menghasilkan PDF dan memproses dokumen di aplikasi web. Mencakup React PDF, Puppeteer HTML-to-PDF, jsPDF, dan pdf-lib.

Kondisi Pemicu

  • Menghasilkan invoice, struk, atau laporan sebagai PDF.
  • Mengkonversi halaman HTML ke PDF yang bisa diunduh.
  • Membangun template dokumen dengan data dinamis.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.