Vaadin 10 Dialog

Hello, I’m trying to show a Pdf in a Dialog using Java in Vaadin 10. Unfortunately I can’t find a way to setup width and height using Java API.
This is the example I’m doing

			val attachmentActionResponse = recurringBillingInfoManager.showInvoice(it)
            val inputToPdf: () -> InputStream = { URL(attachmentActionResponse.pdfUrl).openStream() }
            val streamResource = StreamResource(attachmentActionResponse.attachmentName, inputToPdf)
            Dialog(PdfBrowserViewer(streamResource)).open()

Setting width and height don’t affect the Dialog behaviour.
Thanks

‘By the way this is Kotlin’

Hi,

For now, there is no public API for set size for the dialog component. But you can do it via css by creating a theme to the component
something like this:

<dom-module id="my-dialog-overlay-theme" theme-for="vaadin-dialog-overlay">
  <template>
    <style>
      :host {
        padding: var(--lumo-space-xs);
      }
      [part="overlay"]
 {
        display: flex;
        animation: none !important;
        min-width: 300px;
      }
    </style>
  </template>
</dom-module>