Skip to main content

Hi,

I would like to set the default filename for the PDF which is opened in my Data Streaming service (using the PDF2D Writer). I can't work out how to do this.

I have seen the following post which mentions setting the MIME Type, but I'm not sure how to do this..

https://knowledge.safe.com/questions/85804/fme-server-data-stream-datafile-writer-pdfs.html

Thanks!

Hi @aquamarine,

This is a known issue with the PDF format and the Data Streaming Service and can be broken down into two parts.

 

 

Issue 1:

When I view the file that was returned by the data streaming service in the web browser it has the name and extension of the workspace as opposed to the correct extension and name:

The problem for this lies in the PDF Writer, an issue has been filed to fix this (FMEENGINE-64169) but there is not yet a planned timeline for when it may be implemented.

Note, this also only appears to be an issue when the job is submitted in Google Chrome. For example submitting the job in IE rather than a direct stream, I'll first be prompted as to whether I want to open or save the file. If I choose open - it opens a Chrome tab but correctly shows the name.

 

Issue 2:

If I go to download the file to save for later, it uses this workspace name, and because the extension is incorrect the file cannot be opened without first manually changing the filename.

 

This issue (FMESERVER-14764) has been fixed for FME 2020.1 b20547 and FME 2021 b21903:

 

In the linked post the user was using the Data File Writer as opposed to the PDF Writer. The Data File format has a MIME Type parameter which as you mentioned resolved their issue, however the PDF2D Writer does not have this parameter to set, so I do not believe there is a workaround to using the PDF Writer with Data Streaming in FME 2020 and older other than the manual fix of the file name/type when saving.


Hi @hollyatsafe thank you for your reply.

When I run the app in IE (version details below) and then go to save the PDF, it still defaults to the fmw workbench name, but does set the file type to .pdf. I'm not sure if the version of IE I am using is a different one to you.

Either way, sounds like a good excuse for me to upgrade FME server!

Thanks,


Reply