Skip to content

Commit

Permalink
Merge branch 'master' into fix-#371
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil committed Apr 7, 2022
2 parents 46b0595 + 361aba7 commit 9f5ea36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
6 changes: 4 additions & 2 deletions src/main/java/neqsim/thermo/system/SystemInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -2273,14 +2273,16 @@ public double calcBeta() throws neqsim.util.exception.IsNaNException,
* generatePDF.
* </p>
*/
public void generatePDF();
public neqsim.dataPresentation.iTextPDF.PdfCreator generatePDF();

/**
* <p>
* displayPDF.
* </p>
*/
public void displayPDF();
default public void displayPDF() {
generatePDF().openPDF();
}

/**
* <p>
Expand Down
12 changes: 2 additions & 10 deletions src/main/java/neqsim/thermo/system/SystemThermo.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ abstract class SystemThermo implements SystemInterface {
protected neqsim.standards.StandardInterface standard = null;
protected InterphasePropertiesInterface interfaceProp = null;
private boolean multiphaseWaxCheck = false;
Object pdfDocument = null;
private boolean forcePhaseTypes = false;
static Logger logger = LogManager.getLogger(SystemThermo.class);

Expand Down Expand Up @@ -3986,7 +3985,7 @@ public neqsim.standards.StandardInterface getStandard(String standardName) {

/** {@inheritDoc} */
@Override
public void generatePDF() {
public neqsim.dataPresentation.iTextPDF.PdfCreator generatePDF() {
neqsim.dataPresentation.iTextPDF.PdfCreator pdfDocument = null;
pdfDocument = new neqsim.dataPresentation.iTextPDF.PdfCreator();
pdfDocument.getDocument().addTitle("NeqSim Thermo Simulation Report");
Expand Down Expand Up @@ -4026,14 +4025,7 @@ public void generatePDF() {
logger.error("error", e);
}
pdfDocument.getDocument().close();
this.pdfDocument = pdfDocument;
}

/** {@inheritDoc} */
@Override
public void displayPDF() {
generatePDF();
((neqsim.dataPresentation.iTextPDF.PdfCreator) pdfDocument).openPDF();
return pdfDocument;
}

/**
Expand Down

0 comments on commit 9f5ea36

Please sign in to comment.