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

Render one page at a time (pageFling) instead of continuous rendering of pages #21

Closed
cyberneid opened this issue Jan 10, 2024 · 5 comments
Labels
feature request New feature or request

Comments

@cyberneid
Copy link

cyberneid commented Jan 10, 2024

The current version renders the pages in continuous mode. i.e. you can have the bottom of page 1 above and the top of page 2 below. AndroidPdfViewer instead allows flinging a single page at a time (with pageFling property).

 /** Spacing between pages, in px */
    private int spacingPx = 0;

    /** Add dynamic spacing to fit each page separately on the screen. */
    private boolean autoSpacing = false;

    /** Fling a single page at a time */
    private boolean pageFling = true;

See this class:
https://github.com/barteksc/AndroidPdfViewer/blob/master/android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/PDFView.java

Can you add such a feature too?

@espresso3389 espresso3389 added the feature request New feature or request label Jan 13, 2024
@jezell
Copy link

jezell commented Jan 19, 2024

Would be very useful for us, we used the pdf render textures from pdf_render for this, hard to switch over without something equivalent.

@espresso3389
Copy link
Owner

For Texture or such widget, I opened #41.

For page flinging, if I introduce some kind of Texture or such, I think carousel_slider or such is enough. Do you agree?

@cyberneid
Copy link
Author

Yes carusel_slider may be a good option but with vertical scrolling

@espresso3389
Copy link
Owner

0.4.23 introduces PdfDocumentViewBuilder and PdfPageView.

@cyberneid
PdfPageView can be used within other carousel like widget and I think it's enough for such use case.
Please check it and if you have any questions, please ask me!

@jezell
Copy link

jezell commented Jan 25, 2024

@espresso3389 awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants