Skip to main content
Solved

Current date in PDF

  • April 16, 2020
  • 4 replies
  • 42 views

oliver
Contributor
Forum|alt.badge.img+6

Hi there!

 

I'm using MapnikRasterizer, PDFStyler and PDFPageFormatter for creating PDF documents.

 

 

There is some static text content in my PDFs like Title, Subtitle, Copyright etc.

 

This static text content is created by Creators and the text is defined as Geometry Type:Text and set as Text String.

 

All works fine.

 

 

Now, I want to print the current date (today) into the PDF using DateTimeStamper and DateTimeConverter.

 

I formated the date attribute using PDFStyler and connected it to the PDFPageFormatter, but the date (frame) is missing in the resulting PDF.

 

 

Any idea how to print the current date into a PDF?

 

For example by replacing the Text String of the Creation instance dynamically by the current date?

 

Or any other way?

 

 

Best regards

 

 

Oliver

Best answer by oliver

I've got the solution!

The magic is, to insert a TextPropertySetter.

At first view, it does nothing, because the relevant text properties are defined in PDFStyler, but obviously something happens in the background.

I love FME ; )

 

timestampinpdf.zip

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.

4 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • April 16, 2020

Are you able to share your workflow?


oliver
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • 15 replies
  • April 16, 2020

The original Workbench is complex and contains some closed data.

I'll strip it down to the basics and come back.

Oliver


oliver
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • 15 replies
  • Best Answer
  • April 17, 2020

I've got the solution!

The magic is, to insert a TextPropertySetter.

At first view, it does nothing, because the relevant text properties are defined in PDFStyler, but obviously something happens in the background.

I love FME ; )

 

timestampinpdf.zip


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • April 17, 2020

I've got the solution!

The magic is, to insert a TextPropertySetter.

At first view, it does nothing, because the relevant text properties are defined in PDFStyler, but obviously something happens in the background.

I love FME ; )

 

timestampinpdf.zip

Glad you sorted it, i would have created the dynamic text like this, and sent that to the pdfstyler