kovacsv / JSModeler

A JavaScript framework to create and visualize 3D models.
MIT License
655 stars 123 forks source link

Can't print the models with wkhtmltopdf #28

Open xploshioOn opened 7 years ago

xploshioOn commented 7 years ago

For some reason, everytime that I try to print the models with wkhtmltopdf, I get the same error, tested with the examples on the sandbox and the ones created by me.

xploshioon@personal ~ $ wkhtmltopdf --javascript-delay 4000 --debug-javascript file:///home/xploshioon/Desktop/JSModeler-master/sandbox/texture.html test.pdf
Loading pages (1/6)
Warning: undefined:0 TypeError: 'null' is not an object           
Counting pages (2/6)                                               
Resolving links (4/6)                                                       
Loading headers and footers (5/6)                                           
Printing pages (6/6)
Done                   

I even tried adding the js on the html directly and adding it to the end of the page, to be sure that the elements are rendered first. it's weird. I am trying to print some dynamic models pdf files, but for some reason it breaks everytime, if I open the browser console, there is no errors and the model is rendered.