Skip to main content

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 

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.

 

 


Reply