PDF java response byte/stream

Hello! We are trying to create a process that works as follows:

  1. The web app (Java) endpoint acts as a trigger.
  2. This endpoint sends data to PlanetPress.
  3. PlanetPress creates a PDF.
  4. The PDF is returned as a byte or another type of stream.
  5. Java receives a “200 OK” response along with the byte/stream.

We’re attempting to use an HTTP Input server with JSON, but we’re having difficulty sending the PDF data (as a byte array or stream) back to the web app after the PDF is created.

Hello @dariuszb,

Find below a short steps list to achieve what you want:

  1. NodeJS Server Input
    • Use custom HTTP server response code
    • Set it to a variable in process
  2. Set Job Info and Variable
    • Set the variable of NodeJS Server Input to an error
  3. Connect Datamapper
  4. Connect Template
  5. Connect Create Job
  6. Connect Create Output
    • Through Workflow
  7. Set Job Info and Variable
    • Set the variable of NodeJS Server Input to 200