Class SalesReportViewer

java.lang.Object
team75.model.SalesReportViewer

public class SalesReportViewer extends Object
Open a new JavaFX window to view a given pdf given as an array of raw bytes Use SalesReportViewer.viewPdf(byte[] pdfBytes).
  • Constructor Details

    • SalesReportViewer

      public SalesReportViewer()
      This class should never be initialized
  • Method Details

    • viewPdf

      public static void viewPdf(byte[] pdfBytes) throws IOException
      Renders every page of a PDF side by side in a new Stage. Each page is scaled to FIXED_HEIGHT px tall (preserving aspect ratio), and the window width is set to the exact sum of all page widths. No scrolling, no spacing, no padding. Must be called on the JavaFX Application Thread.
      Parameters:
      pdfBytes - raw bytes of a valid PDF document
      Throws:
      IOException - if PDFBox cannot load or render the document