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

截图不全的情况处理 #44

Open
icedme666 opened this issue Apr 22, 2024 · 0 comments
Open

截图不全的情况处理 #44

icedme666 opened this issue Apr 22, 2024 · 0 comments

Comments

@icedme666
Copy link

使用该库时出现截图不全,经过调试后有以下几个方式可以处理:

  1. scanBook.py:若页面过长,此处需要修改浏览器选项缩放页面(原理:canvas高度与实际不匹配,缩放后才能覆盖全部,截图不全的情况出现在多个canvas的高度相加与其父节点高度不相等)
    firefox_options.set_preference("layout.css.devPixelsPerPx", "0.5")
  2. WeRead.py:shot_full_canvas_context函数高度和宽度修改
  3. png2pdf.py:PIL修改为使用reportlab转换成pdf(原理:PIL像素限制)
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

1 participant