title: Itext7 Canvas set text to right border
body: <p>I am using Itext7 in my java project to fill the pdf form. Is there any way to set text extension in canvas to the left from absolute position? For example, i set text to right top corner, and it extends to the left top corner as longer i increase its length. As i mentioned before, i use canvas.</p>
  
  <p>Example of adding text</p>
  
  <pre><code>PdfDocument document = new PdfDocument(new PdfReader(SRC), new PdfWriter(dest));
  
  
      PdfCanvas canvas1 = new PdfCanvas(document.getPage(1));
      canvas1.beginText().setFontAndSize(PdfFontFactory.createFont(FontConstants.HELVETICA), 7)
              .moveText(500, 592.5)
              .showText(new SimpleDateFormat("dd/MM/YYYY").format(invoice.getDate()))
              .endText();
  </code></pre>