Type Alias: GenerateProductPDF()
GenerateProductPDF = (
items
,formatMessage
?,pdfConfig
?) =>Promise
<void
>
Function
Generates a comprehensive PDF document for the current product configuration.
This method creates a professionally formatted PDF that includes detailed information about the configured product. The content typically includes product images, selected options, specifications, pricing, and any other relevant tabs from the product interface.
The PDF can be customized through configuration options, including page layout, branding, sections to include, and formatting. Custom document templates can be applied for brand-consistent documentation.
Product PDFs serve as comprehensive documentation for configured products, useful for sharing with clients, keeping for reference, or including in quotes and orders.
Parameters
items
Array of product tabs to include in the PDF
formatMessage?
Optional translation function for localized content
pdfConfig?
Optional custom configuration for PDF formatting and branding
Returns
Promise
<void
>
Example
// Generate a PDF including all product tabs
const allTabs = window.mimeeqApp.observers.product.tabs.getValue().newValue || [];
window.mimeeqApp.actions.generateProductPDF(allTabs);
// Generate a PDF with only specific tabs and custom formatting
const selectedTabs = allTabs.filter(tab =>
['configuration', 'finishes'].includes(tab.tabType)
);
window.mimeeqApp.actions.generateProductPDF(
selectedTabs,
translateMessage, // Translation function
{
logoPosition: 'RIGHT',
displayLogoAt: 'FIRST_PAGE',
logo: 'https://example.com/company-logo.png'
}
);
Emits
mimeeq-pdf-generate-done When PDF generation is complete