Search code examples
pdf-generationflying-saucer

getting extra blank pdf page in Flying Saucer/iText


while creating pdf from XHTML by using Flying Saucer/iText, want landscape in every pages ( am using this method ) but am getting extra blank page in initial and end pages, any ideas?


Solution

  • If you want lanscape on every page, don't use any selector on the @page rule.

    Just use:

      @page {size: landscape;}
    

    It will apply on the whole document, and won't add blank pages in the document.