Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-5523

Bug in org/apache/pdfbox/multipdf/Overlay#overlay(specificPageOverlayFile)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.27, 3.0.0 PDFBox
    • 2.0.28, 3.0.0 PDFBox
    • None

    Description

      path = e.getValue();
      LayoutPage layoutPage = layouts.get(path);
      if (layoutPage == null)
      {
          PDDocument doc = loadPDF(path);
          layouts.put(path, getLayoutPage(doc));
          openDocuments.add(doc);
      }
      specificPageOverlayPage.put(e.getKey(), layoutPage);

      layoutPage is null because never assigned within the if clause. It should be:

      path = e.getValue();
      LayoutPage layoutPage = layouts.get(path);
      if (layoutPage == null)
      {
          PDDocument doc = loadPDF(path);
          openDocuments.add(doc);
          layoutPage = getLayoutPage(doc);
          layouts.put(path, layoutPage);
      }
      specificPageOverlayPage.put(e.getKey(), layoutPage);

      Attachments

        Issue Links

          Activity

            People

              tilman Tilman Hausherr
              sz5000 Stefan Ziegler
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: