Skip to main content
I have managed to create a workspace that will generate PDF files based on maptiles that are run through a clipper transformer and output one PDF per maptile for my entire dataset. Now I want to add non-map elements to the PDF files, but i can find very little info about how to easily do thissimply.

 

 

How can I add text (title, map scale, etc) and jpeg images (north arrow, scale bar?) to the output pdf?

 

 

Thanks,

 

 

Christopher
Hi,

 

 

I asked that a couple of months ago and it seems that Safe is trying to include a 'real' PDF-Writer in the future. You should conntact support to get added to the PR case.

 

 

We solved the issue by inserting a scale bar (LL84!) and a north arrow by generating real geographic objects at the corners of a BoundingBoxReplacer. It's not very nice but the only way from my point of view.

 

 

Cheers,

 

Heinz
Hi,

 

 

This example might help you.

 

http://fmepedia.safe.com/articles/Samples_and_Demos/Creating-PDF-Cartographic-Output
There's not really a simple method to do that. I've recently had to generate a bunch of maps (simple maps to be used in setting up a walking network) and output them to JPG, some of what I've done will apply to PDF as well.

 

 

I added text with a TextAdder, TextStroker and FeatureColorSetter. If you go to PDF you probably won't need to stroke the text.

 

 

Legend boxes (colors of walking routes) were done with 2DBoxReplacers. The fact that the number of legend boxes would be different for every map *but* they would have to be done in a certain order.

 

 

Fortunately that was it for my maps. To add proper scale bars and north arrows, you can try Heinz's method or perhaps create some template features yourself, centered on 0,0, Then store them as DXF, Shape or FFS, read them in and use the Offsetter to place them on the correct location. Never done it this way myself but that's what I'd try.

 

 

Another thing to consider is the FME Auto plug-in for MAPublisher. MAPublisher is a plug-in for Adobe Illustrator that lets you import several GIS formats. The FME Auto plug-in lets you add MAPublisher as a writer in FME, and this setup gives you a lot more control over the output. You can set up a template in Illustrator and just fill in the map data through FME.

 

 

Hope this helps.
We add text (e.g. Title and copyright)  to pdf maps using a 2d point adder and a text adder with page units set on the feature type. So adding a point at 20,20 and then replacing it with text produces a copyright statement in a consistent position in the bottom left corner of any map produced.
Jpg images can be added by reading the jpg, and using a rastergeoreferencer to set the position of the jpg using pageunits
Hello!

 

 

It is now the year 2015, and I have a similar problem. The situation has changed, as FME 2015.0 has a new Transformer for formatting PDF output: the PDFPageFormatter.

 

 

I am glad that this Transformer was developed as it makes the generation of PDF a lot easier. However I still have some problem with adding text under different maps. I am searching for a method to set the text height equal to each other and that the text is fixed to a certain distance of the maps. 

 

 

I have in this case two text lines of different length.

 

Using the PDF Formatter I can change the size and position of the box, which indirectly changes the size and position of the text. Unfortunately, depending on the length of the text, the size and the position of the text is altered such that the text height is different in the two cases, as well as the distance to the maps.

 

 

By using Trial and Error, changing the size and the position of the boxes within the PDFPageFormatter, I can thus indirectly alter the size and position of the text. This method is not accurate however.

 

 

Did anyone experience similar problems?

Reply