Skip to main content
Solved

Text size PDFStyler doesn't work


Forum|alt.badge.img

When I change the text size in a PDFStyler from 12 to 6, there is no modification at all.

I cannot see where else I can modify this parameter.

Could someone help me?

Thanks

Best answer by ebygomm

Sample 2015 workspace changing font size using pdfstyler and fme_text_size

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

15 replies

erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • June 30, 2016

Maybe off topic, but have you tried the PDFPageFormatter?

It has many more options than the PFDStyler.


sclkimly
Participant
Forum|alt.badge.img+1
  • Participant
  • June 30, 2016

I am having the same issue(s). Which version of Workbench are you using? I tried in 2015.0, but have yet to retry this in 2016.1. Very frustrating. The text box size seems to dynamically scale, based upon the number of characters in the string. Not good if you're trying to precisely place text for a report. I'll be watching this thread to see what the responses are.

Lynn


sclkimly
Participant
Forum|alt.badge.img+1
  • Participant
  • June 30, 2016
erik_jan wrote:

Maybe off topic, but have you tried the PDFPageFormatter?

It has many more options than the PFDStyler.

PDFPageFormatter, in my experience, has the same "scaling" issues. Need to retry this using v2016.1. I hope there have been some updates here. Still, very useful for an output option. Lynn


ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • June 30, 2016

Changing the text size in the PDF styler works for me in both 2015 and 2016.

You could also try exposing and setting the fme_text_size attribute


Forum|alt.badge.img
  • Author
  • July 1, 2016
sclkimly wrote:

I am having the same issue(s). Which version of Workbench are you using? I tried in 2015.0, but have yet to retry this in 2016.1. Very frustrating. The text box size seems to dynamically scale, based upon the number of characters in the string. Not good if you're trying to precisely place text for a report. I'll be watching this thread to see what the responses are.

Lynn

I have the 2015.1.2.1 version.

Indeed the response is really weird.


Forum|alt.badge.img
  • Author
  • July 1, 2016
ebygomm wrote:

Changing the text size in the PDF styler works for me in both 2015 and 2016.

You could also try exposing and setting the fme_text_size attribute

Works for you? But how?

Maybe I'm using it the wrong way. Could you post a example?

I just tried with fme_text_size attribute and pdf_text_font also. It doesn't work.


Forum|alt.badge.img
  • Author
  • July 1, 2016
erik_jan wrote:

Maybe off topic, but have you tried the PDFPageFormatter?

It has many more options than the PFDStyler.

I can't see how you can access to text size in the PDFPageFormatter. I only can move the different boxes with a drag & drop and change their size. That's all. Right?


redgeographics
Celebrity
Forum|alt.badge.img+49

I think 2016.1 is going to be an improvement. I've been doing quite a bit of work with PDF output recently and I think I've got it sorted out.

What I do is:

  1. Add text with a TextAdder, it doesn't matter what size you specify there.
  2. Run that through a PDFStyler and set font/size there. Although it doesn't matter what font you pick, it always defaults to Arial anyway (a known issue, PR41837)
  3. Run that output through a PDFPageFormatter and then write to PDF.

This works for me, in FME 2016.1. If I open up a PDF generated that way and check the text size it shows the correct size, in points.

However, I do agree that text layout in PDF is quite tricky at the moment.


Forum|alt.badge.img
  • Author
  • July 1, 2016
redgeographics wrote:

I think 2016.1 is going to be an improvement. I've been doing quite a bit of work with PDF output recently and I think I've got it sorted out.

What I do is:

  1. Add text with a TextAdder, it doesn't matter what size you specify there.
  2. Run that through a PDFStyler and set font/size there. Although it doesn't matter what font you pick, it always defaults to Arial anyway (a known issue, PR41837)
  3. Run that output through a PDFPageFormatter and then write to PDF.

This works for me, in FME 2016.1. If I open up a PDF generated that way and check the text size it shows the correct size, in points.

However, I do agree that text layout in PDF is quite tricky at the moment.

I have just done it with a 2015 version. It doesn't work.

Do you really think the issue comes from the version? If I use a 2016, will it be working?


redgeographics
Celebrity
Forum|alt.badge.img+49
slerendu wrote:

I have just done it with a 2015 version. It doesn't work.

Do you really think the issue comes from the version? If I use a 2016, will it be working?

I can't guarantee it'll work in 2016, but it does work for me in that version and I used to have similar problems in 2015, so I suggest you give it a try.


Forum|alt.badge.img
  • Author
  • July 1, 2016
redgeographics wrote:

I can't guarantee it'll work in 2016, but it does work for me in that version and I used to have similar problems in 2015, so I suggest you give it a try.

I just tried but it doesn't on the 2016 version. Really odd. I'll try other things.

Thanks anyway.


ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • Best Answer
  • July 1, 2016

Sample 2015 workspace changing font size using pdfstyler and fme_text_size


Forum|alt.badge.img
  • Author
  • July 1, 2016
ebygomm wrote:

Sample 2015 workspace changing font size using pdfstyler and fme_text_size

Ha ok, you don't use the PDFPageFormatter.

I see. Thanks for your help.


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • July 1, 2016

actualy setting size using the textadder does matter if u sent it straight to the pdffpormatter. (so no styler intervention) Using fme 2015.


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • July 1, 2016

btw the pdf writer reverts to Helvetica. Or so it says..

Maybe consider writing your data nicely structured to svg.

Then use Inkscape to create your pdf's. Way more beautiful pdf's can be made then.

Automation can be done trough Inkascape batch.


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