Skip to main content
Solved

Expose fme_basename on PDF's with FeatureReader


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.

 

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

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+32
  • 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
ebygomm wrote:

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


  • February 11, 2020
jakemolnar wrote:

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.


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