Skip to main content
Solved

Can not run TextStroker transformer


davidlee
Supporter
Forum|alt.badge.img+7

I have a Geospatial PDF file, I want to convert it to Raster (Geotif) but I can't put any text into the Raster output. I use the TextStroker transformer before connecting it to ImageRasterizer Transformer but it always error, I also tried some way to run the TextStroker transformer but I have just received only one message "Error running translation".

imageAnybody help me! .....

 I'm using FME 2023 version

Best answer by davidlee

@jamesb16otterill​ @nielsgerrits​ I fixed this problem, it was really caused by the Fonts folder, in the Fonts folder I have many error fonts so it does not work.

Thank you so much!

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

10 replies

j.botterill
Influencer
Forum|alt.badge.img+40
  • Influencer
  • August 21, 2023

If you turn background map off, I can see in Feature Information that the geometry is multiArea polygons. I think the ImageRasteriser doesn't accept text geometry, so the polygon is probably the way to go. I suspect you need more rows/columns, higher resolution for the textimage


davidlee
Supporter
Forum|alt.badge.img+7
  • Author
  • Supporter
  • August 21, 2023
j.botterill wrote:

If you turn background map off, I can see in Feature Information that the geometry is multiArea polygons. I think the ImageRasteriser doesn't accept text geometry, so the polygon is probably the way to go. I suspect you need more rows/columns, higher resolution for the textimage

Thanks for your comment! I tried many ways to write text geometry to raster. My problem in this case is I cannot run the textstroker transformer, I just only received a message "Error running translation", evenly there's not any log is write to view. Do you have any ideals for this?


j.botterill
Influencer
Forum|alt.badge.img+40
  • Influencer
  • August 21, 2023

as you see above, I removed a few other transformers and the Text Stroker ran successfully. Perhaps add a logger transformer (log & record) before the TextStroker. In the translation log, are there other warnings or hints adjacent the error message?

 

Vector features must have an fme_color attribute. For fine control over vector styling for raster output, consider using the MapnikRasterizer.


davidlee
Supporter
Forum|alt.badge.img+7
  • Author
  • Supporter
  • August 21, 2023
j.botterill wrote:

as you see above, I removed a few other transformers and the Text Stroker ran successfully. Perhaps add a logger transformer (log & record) before the TextStroker. In the translation log, are there other warnings or hints adjacent the error message?

 

Vector features must have an fme_color attribute. For fine control over vector styling for raster output, consider using the MapnikRasterizer.

​There are not any warnings or hints adjacent the error message, just only message "Error running translation.". I don't know does it related to the core to run or lacke of something in the core, i removed a few other transformers as you show above but it didn't work. 😥

Yeh, I tried MapnikRasterizer transformer, but output is a big file, and the text in output is very bad, so that i want to use textstroker to control quality output.


j.botterill
Influencer
Forum|alt.badge.img+40
  • Influencer
  • August 21, 2023

Hmm the only other differences between our workspaces, might be the coordinate system (which I don't have at my end) or the encoding you have set. My language and region format is set to Australia... UTF-8image.pngimagemaybe stick a textencoder or attributeenchor before the TextStroker? UTF8encoder


davidlee
Supporter
Forum|alt.badge.img+7
  • Author
  • Supporter
  • August 21, 2023
j.botterill wrote:

Hmm the only other differences between our workspaces, might be the coordinate system (which I don't have at my end) or the encoding you have set. My language and region format is set to Australia... UTF-8image.pngimagemaybe stick a textencoder or attributeenchor before the TextStroker? UTF8encoder

Thank you so much! @jamesb16otterill​ 

I got it a try. But it didn't work. It was really tough case. 😐


nielsgerrits
VIP
Forum|alt.badge.img+54
davidlee wrote:

Thank you so much! @jamesb16otterill​ 

I got it a try. But it didn't work. It was really tough case. 😐

Is this solved yet? It feels like an encoding issue. I have not installed 2023 so I can't run you workspace, but if I try to use the PDF, filter the text and do a textstroker it just works.


davidlee
Supporter
Forum|alt.badge.img+7
  • Author
  • Supporter
  • August 21, 2023
davidlee wrote:

Thank you so much! @jamesb16otterill​ 

I got it a try. But it didn't work. It was really tough case. 😐

Actually, not yet! I'm feel that the encoding it's not the problem, i find out that every time i run the transformer that have related to the Fonts Window, it has the problem, so that i think probably the reason is Fonts Windown.

I just run the translation from AutoCAD to Geospatial PDF, it has waring about Fonts Window and then i get an error that the same with TextStroker. Do you have any ideas?

image


nielsgerrits
VIP
Forum|alt.badge.img+54
davidlee wrote:

Thank you so much! @jamesb16otterill​ 

I got it a try. But it didn't work. It was really tough case. 😐

I would try and let only one simple text through, from one of the labels in the drawing, not the part on the right side, to check if that works. Also try to work directly from reader to geometryfilter to textstroker. If it starts to work add more complexity.


davidlee
Supporter
Forum|alt.badge.img+7
  • Author
  • Supporter
  • Best Answer
  • October 3, 2023

@jamesb16otterill​ @nielsgerrits​ I fixed this problem, it was really caused by the Fonts folder, in the Fonts folder I have many error fonts so it does not work.

Thank you so much!


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