We are using the custom shared components called PDF Tools custom nodes. One of

We are using the custom shared components called PDF Tools custom nodes. One of them is the Extract PDF pages. We currently have a user form that displays a pdf document. The user will have the ability to rotate the pdf document. The problem is we do not know how to save the pdf document after rotation. Does anyone know how to save a pdf document after it has been rotated in a form? Thanks!...

OriginalPostID-128701

OriginalPostID-128701

  Discussion posts and replies are publicly visible

  • The modifications that a user does in the browser to a PDF are done to the local copy of the file, they will need to re-upload unless you want to create your own custom smart service that allows for rotation so the end user can select from a predefined set of options to rotate and submit the form for your node to rotate the PDF and display in a second form the rotated file.
  • Thanks Eduardo! I want to confirm...and also ask a 2nd question. Even if the user could rotate the PDF within the browser/form they would have to save it to a folder, at that time it is not available to the current process. We would have to somehow retrieve it from another node and then display it in a new task/form? My second question is...what if this document was NOT a PDF but a jpg or TIF file. If we could rotate the file using javascript or CSS within the browser and then save it to a PV, then the saved PV/document would be available moving forward in the process? Thanks!
  • Assuming you want to use the rotation offered by the browser plug-in then they will have to rotate and save to their local computer and you will have to offer the possibility of uploading a new version of the document either in the same form or in the next form via File Upload Component; the node will bot pull it from her computer, the user will need to select Upload and provide the rotated file.

    In the approach of building your own plug-in I was thinking more about:

    1. Show the original PDF
    2. Show a dropdown with standard rotation options (e.g. 90`, 180`, etc)
    3. The user selects one option from the dropdown and submits the form
    4. Between the form 1 and the form 2 (which will display the final result) you place your custom plug-in which does the rotation

    For images there's already a plug-in that does image manipulation such as crop, trim, square and resize meaning you could use the approach #2 I describe in 4 steps above to test this and then enahnce the plug-in to do rotation.

    The plug-in is called Image Utilities (doesn't offer rotation but is a good example) forum.appian.com/.../summary
  • Are you familar with the smart server "PDF Tools"? It has a pdg merge, create pdf, etc. Do you think that one be a good service to download and try to modify to add rotation? Or are you recommending the "Image Utilities" may be best? Thanks!
  • If the main objective is to use PDF then PDF Tools, if you want it for Images the Image Utilities would be the example.