title: I can't rotate my page from existing PDF
body: <p>I've just made a simple Java Console Project, which writes content to an existent PDF, but I can't rotate the page. I've already tried to rotate the <strong>page</strong> trying many examples found here on stackoverflow, but nothing works for me.</p>
  
  <p><strong>My Class</strong></p>
  
  <pre><code>public class PDfRotate{
  
      private static String workingDir = System.getProperty("user.dir");
      private static String FILERIN = workingDir + "/Rin.pdf";
      private static String FILERIN_INPUT = workingDir + "/Test.pdf";
      private static String FILERIN_OUTPUT = workingDir + "/RinOutput.pdf";
      private static Document document;
  
      public static void main(String[] args) throws IOException, DocumentException {
  
          Document document = new Document();
          rotatePdf(document);
          document.close();               
      }
  
      public static void rotatePdf(Document document) throws DocumentException, IOException{
  
          PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(FILERIN_OUTPUT));
  
          document.open();
          Paragraph par = new Paragraph("hello");
          document.add(par);
  
          document.add(PageSize.A4.rotate());
  
          PdfReader reader = new PdfReader(FILERIN);
          PdfImportedPage page = writer.getImportedPage(reader,1);
          Image instance = Image.getInstance(page);
          document.add(instance);
      }
  </code></pre>