Custom parts list print
Code Sandbox:
Overriding the onPartlistPrint callback
1. Step: Initialize the configurator as usual
const configurator = await RoomleConfiguratorApi.createConfigurator(
"demoConfigurator",
document.getElementById("configurator-container"),
{
id: "usm:frame",
autoStart: true,
buttons: {
partlist_print: true, // Currently it is true by default so it is fine to not use it as well but you can hide it
},
}
);2. Step: Override the onPartlistPrint callback
onPartlistPrint callbackParameters of the onPartlistPrint Callback
onPartlistPrint CallbackGenerate custom PDF
1. Step: Translate "0" and "1" of the script to boolean
2. Step: Generate an array of parts list data
3. Step: Initializes the PDF document and add image
4. Step: Adding description of the bounds
5. Step: Adding the parts list table
6. Step: Final step
Conclusion
Last updated