Skip to main content
Best Answer

Expose fme_basename on PDF's with FeatureReader

  • April 11, 2019
  • 7 replies
  • 278 views

jatoxa
Contributor
Forum|alt.badge.img+12
Hi all,

 

As the title says I need to expose the basename or file name for multiple PDF files I read with FeatureReader. Seems there is no way to expose PDF attributes neither in the PDF reader or FeatureReader where PDF is selected as format?

 

 

I use a directory reader to make a list of Word documents that I convert to PDF using an external program and then pass the file name + pdf extension to the FeatureReader. However I'm stranded if I don't find a way to indentifying my input files.

 

 

Thanks!

 

 

/Jacob

 

 

Best answer by ebygomm

If you are passing the filename plus pdf extension into the feature reader, you can maintain this attribute for later use by changing the Accumulation Mode to merge initiator and result. Although I'd agree that ideally you'd be able to expose the attributes via a parameter for PDF formats as you can with other formats.

 

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.

7 replies

jakemolnar
Forum|alt.badge.img

Hi @j2,

 

Have you tried using an AttributeExposer transformer after the FeatureReader?


jakemolnar
Forum|alt.badge.img

In addition to the workaround given in the replies, I just thought I'd let you know that this issue has been fixed in FME 2019.1


jatoxa
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • April 12, 2019

Hi @jakemolnar

 

 

Thanks for your replies. I have already tried AttributeExposer and it doesn't work.

 

 

Do you mean 2018.1? Or do you have early access to 2019.1?

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • Best Answer
  • April 12, 2019

If you are passing the filename plus pdf extension into the feature reader, you can maintain this attribute for later use by changing the Accumulation Mode to merge initiator and result. Although I'd agree that ideally you'd be able to expose the attributes via a parameter for PDF formats as you can with other formats.

 


jatoxa
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • April 12, 2019

If you are passing the filename plus pdf extension into the feature reader, you can maintain this attribute for later use by changing the Accumulation Mode to merge initiator and result. Although I'd agree that ideally you'd be able to expose the attributes via a parameter for PDF formats as you can with other formats.

 

Hi @egomm

 

 

Thanks for the solution it worked perfectly although I should've tested this already!

 

 

/Jacob

jakemolnar
Forum|alt.badge.img

Oh, haha, yes I do have early access: I'm an FME developer, and I personally fixed that bug for the next release


aarcra
Contributor
  • Contributor
  • February 11, 2020

Hi @j2,

 

Have you tried using an AttributeExposer transformer after the FeatureReader?

Hi, as of FME 2019 19813, using an attribute exposer to get the basename does not work. It used to in 2017/2018. Also, feature readers used to be able to expose attributes in the feature reader itself, this has been removed.