package com.agilex.healthcare.schedulingmanager.pdf;

import com.lowagie.text.Document;
import com.lowagie.text.pdf.PdfWriter;

import java.io.OutputStream;

public class ConsultPdfPageFactory extends BasePdfPageFactory {

    private AbstractPage consultPage;

    public ConsultPdfPageFactory(Document document, PageEvent event, PdfWriter writer, PdfGenerationContext context) {
        super(document, event, writer, context);
    }

    public ConsultPdfPageFactory(Document document, PageEvent event, PdfWriter writer, PdfGenerationContext context, OutputStream outputStream) {
        super(document, event, writer, context, outputStream);
    }

    @Override
    public void createCoverPage(){

        if (consultPage == null) {
            consultPage = new ConsultPage(document, event, writer, context);
        }

        consultPage.create();
    }
}
