Skip to content

Creates/refactors PDFPageView class - #5552

Merged
brendandahl merged 10 commits into
mozilla:masterfrom
yurydelendik:pdfpageview
Jan 5, 2015
Merged

brendandahl merged 10 commits into
mozilla:masterfrom
yurydelendik:pdfpageview

Conversation

@yurydelendik

Copy link
Copy Markdown
Contributor

Allows just to paint a single PDF page. Also makes TextLayerBuilder much simpler to use.

Comment thread web/text_layer_builder.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be used anywhere else

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed, thanks

@Snuffleupagus

Copy link
Copy Markdown
Collaborator

When scrolling really fast through e.g. tracemonkey.pdf with these patches applied locally, I get an error in the console:

TypeError: visibleViews is undefined                    pdf_rendering_queue.js:110:10

It appears that it's connected with cancelling of page rendering, since in these cases visibleViews === 'cancelled' at pdf_viewer.js#L608.

@yurydelendik

Copy link
Copy Markdown
Contributor Author

When scrolling really fast through e.g. tracemonkey.pdf with these patches applied locally, I get an error in the console

Fixed

@Snuffleupagus

Copy link
Copy Markdown
Collaborator

Review progress:

  • Renames page_view.js file
  • Simple restructuring PageView into PDFPageView
  • Creates IPDFTextLayerFactory interface
  • Removes PDFPageSource
  • Creates AnnotationsLayerBuilder
  • Removes Stats dependency from PDFPageView
  • Refactors Cache into PDFPageViewBuffer
  • Removes lastScrollSource and isViewerInPresentationMode from TextLayerBuilderOptions
  • Refactors draw method in PDFPageView; makes optional some PDFPageViewOptions options
  • Replaces text selection example

@yurydelendik
yurydelendik force-pushed the pdfpageview branch 2 times, most recently from 96557e9 to 0a171f7 Compare December 19, 2014 21:34
@yurydelendik
yurydelendik force-pushed the pdfpageview branch 2 times, most recently from e4b3bdc to 9a5da2e Compare December 20, 2014 00:11
@yurydelendik

Copy link
Copy Markdown
Contributor Author

/botio-linux preview

@pdfjsbot

Copy link
Copy Markdown

@Snuffleupagus

Copy link
Copy Markdown
Collaborator

As far as I'm concerned, this is good to go now!

@brendandahl Do you agree?

brendandahl added a commit that referenced this pull request Jan 5, 2015
Creates/refactors PDFPageView class
@brendandahl
brendandahl merged commit e93cf5c into mozilla:master Jan 5, 2015
@nschloe

nschloe commented Jan 5, 2015

Copy link
Copy Markdown
Contributor

Is there example code for how to use this?

@yurydelendik

Copy link
Copy Markdown
Contributor Author

@nschloe yes, see the example in the last commit

@yurydelendik

Copy link
Copy Markdown
Contributor Author

or examples/components/pageviewer.html

@timvandermeij

Copy link
Copy Markdown
Collaborator

Awesome work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants