search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

0 answers
Q&A jsPDF can't get any styling to work
jsPDF can't get any styling to work
P粉807471604 2025-12-28 08:43:18 Views 83
CSS

0

I'm new to using jsPDF but and for the life of me I can't get any css to apply to this thing! I've tried inline, internal, and external all to no avail! I read in another SO post that since it's technically printing stuff to a file I need a print style sheet, and that didn't work either.

I have a very basic page that I'm just trying to get any CSS to work with: JS:





 
               


HTML:

    
Download Maybe?

We support special element handlers. Register them with jQuery-style

And finally the stylesheet that is external:

h1{
    color: red;
}
div{
    color: red;
}

I'm sure all is getting included correctly, and that there are no errors, already checked all of that. Is there like some extra function I need to call to get the css to work as well? Let me know please! Thanks alot! Any other tips you may have are also appreciated!

EDIT: This is the exact webpage:

    
        
        
        
        
        
        
                       
        
        
    
    
        
Download Maybe?

We support special element handlers. Register them with jQuery-style

Your Answer
submit

0 answers

Popular tool

vc9-vc14 (32+64 bit) runtime library collection (link below)

vc9-vc14 (32+64 bit) runtime library collection (link below)

Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit

VC9 32-bit

VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version

PHP programmer toolbox full version

Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit

VC11 32-bit

VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use