Solved

Text size PDFStyler doesn't work


Badge

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

icon

Best answer by ebygomm 1 July 2016, 12:59

View original

15 replies

Userlevel 2
Badge +16

Maybe off topic, but have you tried the PDFPageFormatter?

It has many more options than the PFDStyler.

Badge

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

Badge

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

Userlevel 1
Badge +21

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

Badge

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.

Badge

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.

Badge

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?

Userlevel 5
Badge +25

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.

Badge

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?

Userlevel 5
Badge +25

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.

Badge

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.

Userlevel 1
Badge +21

Sample 2015 workspace changing font size using pdfstyler and fme_text_size

Badge

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.

Badge +3

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

Badge +3

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.

Reply