Rest - Get Form as PDF

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Rest - Get Form as PDF

Joel Oates
Hello,

I have a document that has previously been filled out and saved, I want to
extract the PDF of that document via the REST interface.

I have been looking through the documentation and haven't found a way of
achieving this..

is it possible to get the generated pdf (same as the PDF button) from the
CRUD or Persistence API?

Thanks,
Joel.

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1598257150641-0.post%40n4.nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Rest - Get Form as PDF

Alessandro  Vernet
Administrator
Hi Joel,

Say your form is accessible through:

   
http://localhost:8080/orbeon/fr/a/a/edit/a4451a08bf8d666ac54e572ef11edce5ae183fcd

Then you get the PDF by accessing the following, i.e. just replacing `edit`
by `pdf`. You'll let me know if this works for you.

   
http://localhost:8080/orbeon/fr/a/a/pdf/a4451a08bf8d666ac54e572ef11edce5ae183fcd

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1598309906917-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Rest - Get Form as PDF

Joel Oates
Worked a Treat!

Thanks Alex!

I couldn't seem to find it in the documentation..

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1598319863909-0.post%40n4.nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Rest - Get Form as PDF

Joel Oates
Just a Follow up question here..

If I wanted to get the PDF document as a PDF (Via postman or in Code) I get
the response

`This response could not be previewed. Download the response to open it with
an appropriate application.`

Is there a way I can get this response as a file? or some way of saving it?


Joel

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1598328341950-0.post%40n4.nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Rest - Get Form as PDF

Alessandro  Vernet
Administrator
Hi Joel,

Is that may be an error from Postman? If I run the following command (where
`123` is my document id), I do get the expected PDF in `file.pdf`. If you're
getting a different result, how can I reproduce that?

    curl --output file.pdf http://localhost:8080/orbeon/fr/a/a/pdf/123

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1598415404820-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Rest - Get Form as PDF

Joel Oates
Hi Alex,

Seemed to be an issue with Postman..

Thanks,
Joel

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1598487690190-0.post%40n4.nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Rest - Get Form as PDF

Alessandro  Vernet
Administrator
Got it Joel, this is reassuring, and thank you for the confirmation.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1598574717389-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet