Skip to content

Help Please: How Do You Mix Page Orientations? #44

Description

@lartheon

Hi, I am converting some html to PDF but I have a couple of issues.

  1. Can't mix page orientations
  2. I can't seem to insert a blank page
//example get html var printContents = document.getElementById("exampleId")?.innerHTML;
//example var html = htmlToPdfmake(printContents);

var htmlBlankPage = htmlToPdfmake(); //not sure what should go here
var htmlOverview = htmlToPdfmake(printOverview);
var htmlFFListing = htmlToPdfmake(printFFListing);
var htmlNNListing = htmlToPdfmake(printNNListing);
var htmlSSListing = htmlToPdfmake(printSSListing);
var htmlSummary = htmlToPdfmake(printSummary);

const pdf = new PdfMakeWrapper();
PdfMakeWrapper.setFonts(pdfFonts);

pdf.pageSize("A4");
pdf.pageOrientation("portrait");
pdf.add(printOverview);
pdf.add(); // add blank page
pdf.add(printFFListing);
pdf.pageOrientation("landscape");
pdf.add(printNNListing); // should be displayed in landscape
pdf.pageOrientation("portrait"); // the rest of the pdf in portrait
pdf.add(printSSListing);
pdf.add(); // add blank page
pdf.add(summary);

Thank you

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions