TronDesigner - Integration Examples
Docs: Developer documentation  |  Logos

Back to examples

Logo Features

Oregon 400 ml - Red

Logo Features

No logo selected

Logo Dialog Actions
Logo Management
Preselect Logo Examples

Implementation Code

const td = window.tronDesigner;

// Remember the logo the customer selects or uploads (entityGuid is null when the selection was cleared)
td.subscribeDesignerEvent('logo', 'selected', (event) => {
    selectedLogoGuid = event.entityGuid;
});

// Only the logo dialog
td.openLogoGallery({ mode: 'dialog' });     // or td.openLogoUpload({ mode: 'dialog' })

// The current selected logo
const logo = await td.getLogo();             // ILogoDTO or undefined
console.log(logo?.logoGuid);

// Preselect a logo in a new print job - by GUID or by URL
td.openDesigner({
    openMode: 'Create',
    dataMode: 'Exact',
    printJob: {
        logo: { guid: selectedLogoGuid },      // or { url: 'https://www.promotron.com/media/brand/tronshop/horizontal-color.svg' }
        addProducts: { supplierCode: 'PFC', variants: [{ productCode: '10086021' }] },
        addPrintings: [{ printPositionCode: 'front', printTechnologyCode: 'PAD03' }]
    }
}, { mode: 'dialog' });