SfQRCodeGenerator extract image

Hi

Please advise if there is a method to capture the QR Image generated using the Blazor SfQRCodeGenerator .I would like to show users the QRCode and also email a copy to them using a MailMessage . 

9 Replies

RO Roger May 29, 2020 09:00 AM UTC

Also I tried to embed a qr code in a dialog but it comes out blank .Is there a way to show the qrcode inside a Dialog ?

 <DialogTemplates>
        <Header> @ResultDialogHeader </Header>
        <Content>
            @ResultDialogMessage           
        </Content>
        <FooterTemplate>
            <SfQRCodeGenerator Width="200px" Height="150px" Value="@QRCode"></SfQRCodeGenerator>
        </FooterTemplate>
    </DialogTemplates>


AR Aravind Ravi Syncfusion Team June 1, 2020 07:58 AM UTC

Hi Roger, 

We have created a sample to render the barcode inside dialog. In the dialog template we have rendered the QR code. Currently in blazor we does not have support to capture the QR Code as image. Please find the below code snippet for how to render the QR code inside dialog 

<SfDialog Height="250px" Width="435px" ShowCloseIcon="true"> 
    <DialogTemplates> 
        <Header> @ResultDialogHeader </Header> 
        <Content> 
            @ResultDialogMessage 
        </Content> 
        <FooterTemplate> 
            <SfQRCodeGenerator Width="200px" Height="150px" Mode="@RenderingMode.SVG" Value="Syncfusion"> 
                <QRCodeGeneratorDisplayText Visibility="false"></QRCodeGeneratorDisplayText> 
            </SfQRCodeGenerator> 

        </FooterTemplate> 
    </DialogTemplates> 
</SfDialog> 
@functions{ 
    public string ResultDialogHeader = "Barcode"; 

    public string ResultDialogMessage = "QR Code"; 


 




Regards 
Aravind Ravi 



MA Mark June 12, 2020 06:01 PM UTC

Hi there,
I am really struggling to have a QR code display in a Dialog.

I have downloaded your example, which when run doesn't work well. It's buggy.
If you change Page and go back to index the dialog is there with no QR Code.

In my project I just can not get it to display in a dialog.
I have basically copied your code.





AR Aravind Ravi Syncfusion Team June 15, 2020 03:11 PM UTC

Hi Mark, 

We are validating your requirements and update you with more details on June 17th 2020. 

Regards 
Aravind Ravi 



AR Aravind Ravi Syncfusion Team June 17, 2020 04:20 PM UTC

Hi Mark, 

We are able to reproduce the reported issue at our end. We are validating the issue and update you with more details on June 19th 2020. 

Regards 
Aravind Ravi 



MA Mark June 18, 2020 08:03 AM UTC

Thanks much appreciated!


AR Aravind Ravi Syncfusion Team June 22, 2020 09:25 AM UTC

Hi Mark, 

We have modified a sample to show qr code while open dialog. By default, in the barcode , we have calculated a barcode height and width based on the parent div height and width. In this sample we have rendered barcode as template for dialog component. So while navigate the sample dialog did not gets rendered so that barcode height and width does not gets set . In this sample on click the open button we have opened a dialog. After dialog gets rendered we have rendered the barcode. Please refer the sample and code example below 

<SfDialog Height="75%" Width="435px" ShowCloseIcon="true" @bind-Visible="Visibility"
        <DialogTemplates> 
            <Header> @ResultDialogHeader </Header> 
            <Content> 
                @ResultDialogMessage 
            </Content> 
            <FooterTemplate> 
                @if (Visibility) 
               
                    <SfQRCodeGenerator Width="200px" Height="150px" Mode="@RenderingMode.SVG" Value="Syncfusion"> 

                        <QRCodeGeneratorDisplayText Visibility="false"></QRCodeGeneratorDisplayText> 
                    </SfQRCodeGenerator> 
               

            </FooterTemplate> 
        </DialogTemplates> 
    </SfDialog> 


Regards 
Aravind Ravi 



MA Mark June 24, 2020 09:08 AM UTC

Fantastic,
Thank you for your assistance!



AR Aravind Ravi Syncfusion Team June 25, 2020 04:23 AM UTC

Hi Mark, 
 
Thanks for your update. 
 
Regards 
Aravind Ravi 


Loader.
Up arrow icon