Skip to main content
Solved

Emailing the result as attached pdf file


Forum|alt.badge.img

Good day!

The result of my WB is PDF map which should be sent as attached file. But I met the problem. File has been damaged. The size of file is less than original. It looks like FME-server had no time to attach the full file.

Have you any ideas about fixing this problem?

Best answer by todd_davis

Ok, I suspect that the Notifier is firing before the PDF writes. Instead of using a Notifier, replace with a text file writer and connect into that (make sure that text writer is under the pdf writer in the Navigator, so that it will write after the pdf has created).

Then when you publish to FME Server, under the particular service you are using (e.g. jobsubmitter) choose edit and choose the relevant topic for the email, and select the text file writer at the value to be posted.

Give that a try and see how it goes.

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

10 replies

itay
Contributor
Forum|alt.badge.img+16
  • Contributor
  • March 24, 2017

hello!

How are you sending the attachment?


Forum|alt.badge.img
  • Author
  • March 24, 2017

@itay By using standard tools kit (FMEServerEmailGenerator--->FMEServerNotifier).

The original file size is 1.78 Mb, but I recieve only 260 bytes...


itay
Contributor
Forum|alt.badge.img+16
  • Contributor
  • March 24, 2017
sega wrote:

@itay By using standard tools kit (FMEServerEmailGenerator--->FMEServerNotifier).

The original file size is 1.78 Mb, but I recieve only 260 bytes...

If you are on FME 2016 you can better use the Emailer transformer, seems to me more of an pdf creation issue that mailing, can you verify that the pdf is properly created without sending the mail?

 

 


Forum|alt.badge.img
  • Author
  • March 27, 2017
itay wrote:
If you are on FME 2016 you can better use the Emailer transformer, seems to me more of an pdf creation issue that mailing, can you verify that the pdf is properly created without sending the mail?

 

 

I am on FME 2015 and pdf is properly created in the specified directory, but attached file is broken.

 

 


todd_davis
Supporter
Forum|alt.badge.img+20
  • Supporter
  • March 27, 2017

How are you firing the notification? FMEServerNotifier or writing an output to a writer connected to the topic?

I presume you are doing the second and have your writer order for that notification service at the bottom of the writers?

A couple of screenshots would be good.


Forum|alt.badge.img
  • Author
  • March 27, 2017

I use standard couple of tools: FMEServerEmailGenerator--->FMEServerNotifier.

The first one generates message and defines attachment as direct link to re-writable PDF file/as user parameter. FMEServerNotifier pulls through topic to send an email.

For both situations I have the same result (260 bytes instead 1.78 Mb).


todd_davis
Supporter
Forum|alt.badge.img+20
  • Supporter
  • Best Answer
  • March 27, 2017

Ok, I suspect that the Notifier is firing before the PDF writes. Instead of using a Notifier, replace with a text file writer and connect into that (make sure that text writer is under the pdf writer in the Navigator, so that it will write after the pdf has created).

Then when you publish to FME Server, under the particular service you are using (e.g. jobsubmitter) choose edit and choose the relevant topic for the email, and select the text file writer at the value to be posted.

Give that a try and see how it goes.


itay
Contributor
Forum|alt.badge.img+16
  • Contributor
  • March 27, 2017
sega wrote:

I use standard couple of tools: FMEServerEmailGenerator--->FMEServerNotifier.

The first one generates message and defines attachment as direct link to re-writable PDF file/as user parameter. FMEServerNotifier pulls through topic to send an email.

For both situations I have the same result (260 bytes instead 1.78 Mb).

Yes I agree with @todd_davis, the pdf is created AND the mail is sent at the same time.

 

Just make sure, as stated, that the order of the writers is pdf first and then the notification text file.

 

See the following article for a 2015 configuration: https://knowledge.safe.com/content/kbentry/23226/index.html

 


Forum|alt.badge.img
  • Author
  • April 10, 2017
todd_davis wrote:

Ok, I suspect that the Notifier is firing before the PDF writes. Instead of using a Notifier, replace with a text file writer and connect into that (make sure that text writer is under the pdf writer in the Navigator, so that it will write after the pdf has created).

Then when you publish to FME Server, under the particular service you are using (e.g. jobsubmitter) choose edit and choose the relevant topic for the email, and select the text file writer at the value to be posted.

Give that a try and see how it goes.

@todd_davis

 

Many thanks. It works)

 


fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • April 17, 2017
sega wrote:

I use standard couple of tools: FMEServerEmailGenerator--->FMEServerNotifier.

The first one generates message and defines attachment as direct link to re-writable PDF file/as user parameter. FMEServerNotifier pulls through topic to send an email.

For both situations I have the same result (260 bytes instead 1.78 Mb).

Note that in modern FME's, you would use the FeatureWriter to create the PDF and then do the notification thereafter.

 

 


Reply


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