title: How to change PDF margin while converting .docx to pdf using opensagres
body: <p>I'm using this code to convert an <code>XWPFDocument</code> to <code>PDF</code>: </p>
  
  <pre><code>ByteArrayOutputStream baos = new ByteArrayOutputStream();
  PdfOptions options = PdfOptions.create();
  
  PdfConverter.getInstance().convert(xwpfDocument, baos, options);
  </code></pre>
  
  <p>The converter is setting wrong margins on the pdf. Here is the original <code>.docx</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/8Sr7I.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8Sr7I.png" alt="enter image description here"></a></p>
  
  <p>And this is the <code>pdf</code> after conversion:</p>
  
  <p><a href="https://i.stack.imgur.com/u5LI1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u5LI1.png" alt="enter image description here"></a></p>
  
  <p>How can I retain the original left and right margins?</p>