ICEpdf
  1. ICEpdf
  2. PDF-18

OnePageView shrinks when pageIndex is changed from DocumentViewController

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.0
    • Fix Version/s: 4.0 - Beta
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows
    • Workaround Description:
      Hide
      I had to re-set the zoom level back to 0.5F every time the page is changed.
      Show
      I had to re-set the zoom level back to 0.5F every time the page is changed.

      Description

      I am displaying a PDF document with following code (from the constructor of a class that extends JFrame):

              SwingController controller = new SwingController();
              controller.setPageViewMode(DocumentViewControllerImpl.ONE_PAGE_VIEW, true);

              DocumentViewControllerImpl vc = (DocumentViewControllerImpl) controller.getDocumentViewController();
              vc.setDocument(doc);
              vc.setCurrentPageIndex(currentPageIndex);
              vc.setZoom(0.5F);

              JScrollPane scroll = (JScrollPane) vc.getViewContainer();

              panel1.add(scroll, BorderLayout.CENTER);

              pack();
              setLocationRelativeTo(getOwner());

      Then, I would like to ViewContainer to show any page I want, by using the following code inside a button listener:

              vc.setCurrentPageIndex(currentPageIndex);

      Problem: whan I change the page this way, the viewContainer shrinks down to a very tiny area.

      Put it in a different way: what is the right way to change the PDF page shown in the ViewContainer?



        Activity

        Hide
        Carlo Guglielmin added a comment -

        Unless I hear otherwise I'm closing this issue as I cannot reproduce the issue, and believe it stems from a misconstructed viewer component.

        Show
        Carlo Guglielmin added a comment - Unless I hear otherwise I'm closing this issue as I cannot reproduce the issue, and believe it stems from a misconstructed viewer component.
        Hide
        Carlo Guglielmin added a comment -

        Attached a test case while trying to reproduce this issue. Unable to see the behaviour the user described.

        Perhaps compared the attached code to your own approach of initializing your UI, as there is a chance you missed an important step or are misusing the viewer component which is causing the area to "shrink".

        Show
        Carlo Guglielmin added a comment - Attached a test case while trying to reproduce this issue. Unable to see the behaviour the user described. Perhaps compared the attached code to your own approach of initializing your UI, as there is a chance you missed an important step or are misusing the viewer component which is causing the area to "shrink".

          People

          • Assignee:
            Carlo Guglielmin
            Reporter:
            Adriano Santoni
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: