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

Display a page range possibly not working correctly #13

Open
arjen375 opened this issue Nov 12, 2023 · 0 comments
Open

Display a page range possibly not working correctly #13

arjen375 opened this issue Nov 12, 2023 · 0 comments

Comments

@arjen375
Copy link

arjen375 commented Nov 12, 2023

I am trying to get the PdfRangeDocument.FromDocument method to work on a Windows Form but whatever I try, it will always show me a page range [1..n] rather than [m..m+n]. If Ι am using the following:

    private void pdfViewer1_Load(object sender, EventArgs e)
    {
        string path = @"D:\tmp\0543_y20_sp_4.pdf";
        IPdfDocument _document = PdfDocument.Load(path);
        pdfViewer1.Document = PdfRangeDocument.FromDocument(_document, 2, 2);
    }

I expect this to show page 2 of the pdf but is just shows page 1. If I change the last line to

   pdfViewer1.Document = PdfRangeDocument.FromDocument(_document, 2, 3);

I get pages 1 and 2 displayed.

Am I missing something here?

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

No branches or pull requests

1 participant