OL Learn

PDF + Image Rotation

I have a COTG form with 4 fields tables each containing a single page image + annotation. End user is allowed to add multiples of any of the four pages. It’s set to output a PDF of the returned document. Everything works they can add and annotate multiple copies of the same page and the output PDF has the correct image is on the correct page. They decided they want one of the pages to be landscape in the COTG app but all pages to be portrait in the output PDF. Found a script to change the PDF so all pages are portrait, works great except the image on the PDF is not rotated. So close :^)

Is there a way to rotate the image too in the PDF or should I be looking more into doing this in the control script ? Currently not able to find a way to do this, still looking.


You have to ways to achieve it.

  1. You can rotate your image within the control script (transform: rotate(90deg); ).
  2. You can rotate the pdf pages in workflow via alambic after creating the pdf . See following example script in vbs. It will rotate all pages to portrait.

Set myPDF = Watch.GetPDFEditObject
myPDF.open Watch.GetJobFileName,false
pageCount = myPDF.Pages.Count
for x = 0 to pageCount-1
myPDF.Pages(x).Orientation = 0
myPDF.Save False


Of course its better to do it directly in the Connect Designer because its in most cases faster. But if your pdf files are small, the workflow way may be the better choice (better control).

Thanks, neither your script or the one I was using would work until I rebooted my computer. Afterwards both worked correctly. Tried restarting the service before before reboot but nothing changed.

¯_(ツ)_/¯ works now