showing results for - "jspdf save in server"
Claudio
07 Aug 2018
1//in your Javascript
2<script>
3var blob = doc.output('blob');
4
5            var formData = new FormData();
6            formData.append('pdf', blob);
7
8            $.ajax('/upload.php',
9            {
10                method: 'POST',
11                data: formData,
12                processData: false,
13                contentType: false,
14                success: function(data){console.log(data)},
15                error: function(data){console.log(data)}
16            });
17</script>
18
19//In your upload.php file:
20<?php
21move_uploaded_file(
22    $_FILES['pdf']['tmp_name'], 
23    $_SERVER['DOCUMENT_ROOT'] . "/uploads/test.pdf"
24);
25