Skip to main content
Question

Fit map extent to frame in PDF

  • November 8, 2019
  • 3 replies
  • 51 views

I'm trying to create a multipage PDF with one map for each "delområde" (=part of area) in a city on every page (along with text information later as well). My problem is that both map extents and text do not fit in correct in the frames.

I want my map extent to fill out the whole frame as defined in PDFPageFormatter. This is probably an easy task but this is the first time I'm working with pdf's in FME so I feel like I'm missing out on something.

As far as for the text, I just want them to be centered in the frame "Delområde". The text is created with TextAdder from the same data as the map extent, which means it still has the geometry and therefore I guess that they are spatially distribuated across the page according to their geometry.

Thanks for any help!!

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.

3 replies

sigtill
Supporter
Forum|alt.badge.img+25
  • Supporter
  • 956 replies
  • November 8, 2019

For creating great PDFs I would recommend to have a look at jsreports (https://jsreport.net/ )

 

 

How to connect to a REST API and send data to jsreports can be seen here on thie presentation from FMEUC2017:

 

https://www.safe.com/presentations/wrapping-any-rest-api-into-a-simple-custom-transformer/

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • November 8, 2019

You want to look at creating a pdf_world_rectangle for each page.

A simple example

Sample_PDF.fmwt


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies
  • November 8, 2019

@mat13ian

 

Hi.

Every single input will gets centered in the frame. So they will get out of sync spatially.

To keep them in sync. you should create a bounding box for the entire/desired extent. Relate this extent to all the objects. Then either make it invisible by not assigning any color or use it as a border line, but you must send it along with the data you want to visualize.

This indeed also aply to any text you create based on some geometry. The texxt requires them saem bounds. Unless you want intentionally place the in a pageframe.

 

 

This is explained in a lot of similar questions on this forum.

 

It is a flaw in the formatter imo.