Giter VIP home page Giter VIP logo

Comments (6)

jeroenjeremy avatar jeroenjeremy commented on June 19, 2024

I can confirm these problems. They are especially visible with longer documents. Our approach might be to convert the document to an html per page but that's not as elegant.

from pdf2htmlex.

tomas-net avatar tomas-net commented on June 19, 2024

jeroenjeremy: I believe that problem consist only in CSS or JS (something triggers repaint). If it is working fine in other browsers (even IE11!) I do not see a reason why change anything else. And from.my experience even 10 pages is enough to see problems

from pdf2htmlex.

Rockstar04 avatar Rockstar04 commented on June 19, 2024

For long, or technically complex PDF's converting to individual pages and writing a custom viewer that handles dynamically loading and unloading pages as they come in and out of the viewport will probably be your best bet.

Depending on the size of the PDF you are trying to convert, you could also try adjusting the conversion settings (--heps, --veps) to reduce the number of elements that are created.

from pdf2htmlex.

tomas-net avatar tomas-net commented on June 19, 2024

I forgot to mention one important information. I use pdf2htmlex with --split-pages 1. so all pages are loaded dynamically from server using ajax (I use default pdf2htmlex viewer). I use default value 3 for number of pre-loaded pages.

So performance problem is not related to the length of original PDF (I tried 400 pages and 10 pages = same result). Problem must be somewhere in JS and CSS because when trying to load index.html with fonts, css and js I still have performance issues, it barely loads first page.

If I use element inspector in browser and uncheck CSS rule position: absolute on #page-container, all pages are loaded by ajax and everything is OK. This brings me back to the problem with JS and CSS.

Even original demo "Full Circle Magazine" suffers from the same issue.

from pdf2htmlex.

amit777 avatar amit777 commented on June 19, 2024

@tomas-net I'm a little new to pdf2htmlex.. Could you point me to the "pdf2tmlex viewer" you are referring to?

from pdf2htmlex.

tomas-net avatar tomas-net commented on June 19, 2024

@amit777 By "pdf2tmlex viewer" I mean mainly Javascript code in index.html (or in separate file) used for dynamically loading pages, scrolling to specific page, zooming in/out, etc. and related CSS styles in index.html (or in separate file) used for styling common things like #page-container, backgrounds, outline, etc. (not styles for positioning text from PDF file).

Even original demo propably converted by older version "Full Circle Magazine" (https://pdf2htmlex.github.io/pdf2htmlEX/demo/issue65_en.html) suffers from the same issue.

Can anyone confirm this issue?

from pdf2htmlex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.