title: How to set page orientation in itextpdf HtmlConverter
body: <p>In database I store different html templates for pdf.
  Today client ask to add landscape oriented template.
  Well, now convertation works incorrect:
  template is landscape and part of text out of page, because page is vertical oriented.</p>
  <p>I used itextpdf and convertation from html to pdf looks like:</p>
  <pre><code>public static byte[] convertString(String htmlContent, boolean useDefaultStyles) throws IOException {
          log.debug(&quot;html {}&quot;, htmlContent == null? 0: htmlContent.length());
          byte[] bytes = new byte[0];
          if(Strings.isNullOrEmpty(htmlContent)){
              return bytes;
          }
          try{
              if(useDefaultStyles){
                  htmlContent = htmlContent.replace(
                          &quot;&lt;head&gt;&quot;,
                          &quot;&lt;head&gt;\n&lt;style type=\&quot;text/css\&quot;&gt;@page {\tsize: A4; margin: 0; }&lt;/style&gt;&quot;
                  );
              }
              ByteArrayOutputStream baos = new ByteArrayOutputStream();
              HtmlConverter.convertToPdf(htmlContent, baos);
              bytes = baos.toByteArray();
          } catch(Exception e){
              log.error(&quot;Error converting html to pdf&quot;, e);
          }
          log.debug(&quot;html2pdf {}&quot;, bytes.length);
          return bytes;
      }
  </code></pre>
  <p>What I need to add to fix this problem?
  Thanks in advance.</p>