Documentation

Learn how to use PromptPDF effectively

Exporting PDFs

Once you've created and edited your document, you can export it to PDF format for professional use. PromptPDF provides multiple export options to meet your needs.

Exporting to PDF

To export your document to PDF:

  1. Generate your document using your chosen template and AI model
  2. Edit the content if needed using the editor
  3. Click on the "PDF" tab in the preview section
  4. The system will generate a PDF preview of your document
  5. Click the "Download PDF" button at the top of the preview
  6. The PDF will be downloaded to your device

PDF Generation Methods

PromptPDF uses two different methods for PDF generation to ensure the best results:

Primary Method

The primary PDF generation method uses the pdf-lib library to create PDFs with precise formatting control. This method:

  • Maintains proper text formatting (bold, italic, etc.)
  • Handles paragraph spacing correctly
  • Supports bullet points and numbered lists
  • Creates professional-looking documents

Alternative Method

If the primary method encounters issues, PromptPDF automatically falls back to an alternative method using pdfmake. This ensures you can always generate a PDF even with complex content.

PDF Formatting

The generated PDFs include:

  • Professional fonts: Times New Roman or Helvetica for formal documents
  • Proper margins: 1-inch margins on all sides
  • Consistent spacing: 1.5 line spacing for readability
  • Page numbers: Automatically added to multi-page documents
  • Text formatting: Bold and italic text preserved from your document
  • Lists: Properly formatted bullet points and numbered lists

Other Export Formats

In addition to PDF, PromptPDF supports exporting to:

Word Document (DOC)

Export to Word format for easy editing in Microsoft Word or other word processors:

  1. Click on the "DOC" tab in the preview section
  2. Review the preview
  3. Click "Download DOC" to export

CSV Spreadsheet

Export tabular data to CSV format for use in spreadsheet applications:

  1. Click on the "CSV" tab in the preview section
  2. Review the preview
  3. Click "Download CSV" to export

Markdown

Export to Markdown format for use in documentation systems or content management:

  1. Click on the "Markdown" tab in the preview section
  2. Review the preview
  3. Click "Download Markdown" to export

Troubleshooting Export Issues

If you encounter issues when exporting to PDF:

  • Try the alternative method: Click "Try Alternative Method" if the PDF generation fails
  • Simplify complex formatting: Very complex formatting may cause issues; simplify if needed
  • Check for special characters: Some special characters may not render correctly
  • Reduce document size: Very large documents may take longer to process

Best Practices

For the best export results:

  • Preview your document before exporting to check formatting
  • Use standard formatting rather than complex layouts
  • Keep document size reasonable for faster processing
  • Use the editor to fix any formatting issues before exporting
  • Test different export formats to find the best option for your needs

Next, explore the API Reference to learn how to integrate PromptPDF into your applications.