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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: