GladistonXD / html2pdfconverter

Convert html to pdf
0 stars 0 forks source link

Weird  letters appearing on the text #1

Closed dresatt closed 2 weeks ago

dresatt commented 2 weeks ago

Hello, I've used your Perlego downloader successfully and i've been satisfied enough to study the book from the html.

I saw your html to pdf converted and I successfully tried it out. My first pdf produced, there aren't any pictures, the text isn't centered and there are wrong page cutoffs which I understand may have been my mistake. However, there are these weird  letters appearing all of the text that obscure it. Do you know how to fix this? Thank you perlegotest.pdf

GladistonXD commented 2 weeks ago

Could you send the .html file? It seems to be a coding problem.

dresatt commented 2 weeks ago

Apparently I can't send it to this issue section for some reason. The file is greyed out and I can't click it.

I've uploaded it to my repository. I hope that is satisfactory.

GladistonXD commented 2 weeks ago

The problem is that this script only works with EPUB book formats, PDF formats use SVG images, hence the confusion when printing, in this case you can only use the browser itself to print the content in PDF.

dresatt commented 2 weeks ago

Hello. I seem to have fixed the problem myself. Encoding it in UTF-8 seemed to have worked. Pictures can load when cairosvg is implemented and the shifting can be fixed with changing the margin (by trial and error). Thanks for creating the perlego downloader and html2pdf converter, really helped!

GladistonXD commented 2 weeks ago

Very good, if you want to share the code to help if someone is having the same problem it will be useful.