Skip to main content
Solved

Data Streaming service and File copy writer output (pdf)

  • January 13, 2021
  • 1 reply
  • 63 views

dms2
Contributor
Forum|alt.badge.img+11
  • Contributor
  • 48 replies

I have published a workspace to FME Server enabling the Data Streaming service with parameter Include Writers in Stream set to the output from a File copy writer. This output is a PDF file and the MIME type parameter of the writer is set to application/pdf.

When executing the workspace in FME Server, the PDF opens as text inside the browser. Shouldn't it open as a PDF file inside the browser or show the dialogue to save it?

This is what shows in the browser:

pdfasbinaryTo give some context to the problem, the workspace builds an html that is transformed to PDF using the HTML2PDFConvertor.

To be able to stream the HTML2PDFConvertor output (the PDF file), I've set the output PDF path to the FME Server temp directory and I've used a File copy writer to 'move' the PDF file again to FME Server temp directory. This works as a kind of hack to be able to stream the PDF.

filcopywriterfielcopywriter_navigator 

Best answer by hollyatsafe

Hi @dms2​ ,

 

I am sorry that you have encountered this issue, I was able to reproduce the output you have described and have filed a bug to request this is fixed (internal reference FMESERVER-16144).

 

The only workaround I can think of would be to reauthor your workflow to use the PDF writer instead. For example, after the HTML2PDFConvertor use a FeatureReader to read in the newly created PDF followed by the PDF Writer to temp as opposed to FileCopy.

 

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

Forum|alt.badge.img+2
  • 719 replies
  • Best Answer
  • January 13, 2021

Hi @dms2​ ,

 

I am sorry that you have encountered this issue, I was able to reproduce the output you have described and have filed a bug to request this is fixed (internal reference FMESERVER-16144).

 

The only workaround I can think of would be to reauthor your workflow to use the PDF writer instead. For example, after the HTML2PDFConvertor use a FeatureReader to read in the newly created PDF followed by the PDF Writer to temp as opposed to FileCopy.