export { renderToBuffer, Document, Page, View, Text, Image, Link, StyleSheet, Font } from '@react-pdf/renderer';

/**
 * Get a suggested filename for a PDF.
 * @example getFilename('invoice', '12345') // 'invoice-12345-2024-01-15.pdf'
 */
export function getFilename(prefix, identifier, date = new Date()) {
  return `${prefix}-${identifier}-${date.toISOString().split('T')[0]}.pdf`;
}
