Create frame with custom size linked to real world physical print?
Hello - I’m working with a team that’s creating a digital mock-up of a physical poster that we need to print and ensure the size will transfer over appropriately.
Can someone direct me to how I can measure or ensure the miro frames I create will translate to a physical print size?
Page 1 / 1
Hey @Rob Desio,
You can do it with our Web SDK 2.0. The steps will be:
Click the address bar of your browser, press F12 or fn + F12 shortcut to open the browser developer console, open the Console tab.
Type in or copy and paste loadSdk under all logs. Press Enter, and you should see the notification:
Paste the following command:
await miro.board.createFrame({ title: 'This frame ratio is 16:9', style: { fillColor: '#ffffff', }, x: 0, // Default value: horizontal center of the board y: 0, // Default value: vertical center of the board width: 800, height: 450, });
Instead of 800 and 450, you can put in the frame size (in pixels) you need. Press Enter.
Hope this helps
Alyona,
Thanks for the reply. When I try this, I get an error - see below - screen capture of console
Code snip below
await miro.board.createFrame({ title: 'This frame ratio is 16:9', style: { fillColor: '#ffffff', }, x: 0, // Default value: horizontal center of the board y: 0, // Default value: vertical center of the board width: 800, height: 1600,});
Hi @Rob Desio
I’ve converted your post to a ticket since I would like to ask you more details. I will get back to you via email soon
Just wanna circle back here and say that the command didn't initially work for Rob because when I accidentally added it without saving the correct formatting. I've now updated it, so if anyone else would like to use this method in the future, you should be able to do so.
To learn more about the ability to create widgets (and specifically frames) via SDK, feel free to check this documentation.