When exporting a page to PDF, the page size is always set to A4 despite using PDF stylesheet to change the page size

XMLWordPrintable

    • 1
    • Minor

      Issue Summary

      When exporting a page to PDF, the page size is always set to A4 despite using PDF stylesheet to change the page size.

      Steps to Reproduce

      1. Add PDF stylesheet to change the page size to any format, for example A3 (297mm × 420mm, 11.7in × 16.5in), as seen here;
        @page {
            size: 17in 11in;
        }
        
      2. Export a page to PDF;

      Expected Results

      The PDF file is exported according to the specified page's size.

      Actual Results

      The PDF page's size is always A4 (210mm × 297mm, 8.3in × 11.7in).

      Workaround

      The workaround available now is removing CSS comments

      @media print {
        @page {
          size: 17in 11in; 
          margin-top: 0.25in;  
          margin-bottom: 0.25in;  
          margin-left: 0.25in;  
          margin-right: 0.35in; 
        }
      }
      

              Assignee:
              Haibert Barfian
              Reporter:
              Rodrigo C
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: