salve
ho questo script che lancio però da pagina ASP:
codice:
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js">
    </script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js">
    </script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.qrcode.js"></script>
<script type="text/javascript" src="js/qrcode.js"></script>
<canvas id="qrcodeCanvas" width="300" height="300" ></canvas>
<script>
    jQuery('#qrcodeCanvas').qrcode({
    width   : 300,
    height  : 300,
    text    : "<%=url%>/Registrazione_123456.pdf"
    });    
</script>
       <script>
       $(function() {
                html2canvas($("#qrcodeCanvas"), {
                    onrendered: function(canvas) {
                        var imgsrc = canvas.toDataURL("image/png");
                        console.log(imgsrc);                
                        var dataURL = canvas.toDataURL();
                        $.ajax({
                            type: "POST",
                            url: "save_image.php?mc=123456",
                            data: {
                                imgBase64: dataURL
                            }
                        }).done(function(o) {
                            console.log('saved');
                        });
                    }
                
            });
        });
</script>
Pagina: save_image.php
codice:
define('UPLOAD_DIR', '../public/pubblico/qr_code/');  
$img = $_POST['imgBase64'];  
$img = str_replace('data:image/png;base64,', '', $img);  
$img = str_replace(' ', '+', $img);  
$data = base64_decode($img);  
$file = UPLOAD_DIR.'QR_CODE_'. $_GET['mc'].'.png';  
$success = file_put_contents($file, $data);  
print $success ? $file : 'Unable to save the file.';
Lanciando da qualsiasi browser da pc fisso tutto ok, crea correttamente l'immagine del qrcode, mentre da qualsiasi browser da smartphone android crea invece il file qrcode vuoto, come mai? dove sbaglio?
Grazie