Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in save #1313

Closed
tri9 opened this issue Jun 5, 2017 · 1 comment
Closed

Error in save #1313

tri9 opened this issue Jun 5, 2017 · 1 comment

Comments

@tri9
Copy link

tri9 commented Jun 5, 2017

issue at IE9 only
i m using jspdf Version 1.0.272.my code is


<title>Document</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="jquery.xdomainrequest.min.js"></script>
<script src="jspdf.debug.js"></script>
<script src="typedarray.js"></script>

<script type="text/javascript" src="es5-sham.js"></script>
<script type="text/javascript" src="es6-sham.js"></script>
<script type="text/javascript" src="es6-shim.js"></script>
 <script>

function demoPDF() {
var doc = new jsPDF();
doc.text(10, 10, 'Hello everybody');
doc.text(10, 20, 'My name is');
doc.text(10, 40, 'Contact me at');
doc.text(10, 30, 'I have just created a simple pdf using jspdf');
doc.setFont("times");
doc.setFontType("italic");
doc.text(50, 40, document.getElementById("email").value); //append email id in pdf
doc.setFontType("bold");
doc.setTextColor(255, 0, 0); //set font color to red
doc.text(60, 20, document.getElementById("fname").value); //append first name in pdf
doc.text(100, 20, document.getElementById("lname").value); //append last name in pdf
doc.addPage(); // add new page in pdf
doc.setTextColor(165, 0, 0);
doc.text(10, 20, 'extra page to write');
doc.save('katara.pdf'); // Save the PDF with name "katara"...
}
</script>
</script>

<div style="margin-top: 200px">  
    <b>  
        <label style="color: blue">  
            First Name</label></b>  
    <input type="text" id="fname" style="margin-left: 24px"><br>  
    <br>  
    <b>  
        <label style="color: blue">  
            Last Name</label></b>  
    <input type="text" id="lname" style="margin-left: 27px"><br>  
    <br>  
    <b>  
        <label style="color: blue">  
            Email</label></b>  
    <input type="text" id="email" style="margin-left: 60px"><br>  
    <br>  
    <button onclick="demoPDF()">  
        want pdf</button>  
</div>  
@Uzlopak
Copy link
Collaborator

Uzlopak commented Jun 5, 2017

Use latest version of jspdf and see if error still occurs.

@Uzlopak Uzlopak closed this as completed Feb 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants