Skip to main content
Solved

Data Streaming service and File copy writer output (pdf)

  • January 13, 2021
  • 1 reply
  • 50 views

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

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.

 

 

View original
Did this help you find an answer to your question?

1 reply

Forum|alt.badge.img+2
  • 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.

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings