flexible pdf reporting using fme
DESCRIPTION
Presented by Nic Ranicar, Front Point Consulting See more FME World Tour 2014 presentations at www.safe.com/recap2014TRANSCRIPT
CONNECT. TRANSFORM. AUTOMATE.
Flexible PDF Reporting Using FMENicholas RanicarFront Point Consulting
Objective
Project Cadastral data translation and validation process
for the Regional Municipality of Wood Buffalo (Tesera Systems)
Required solution Standalone FME Workspace or Transformer PDF report output Visualisation of error features on context map,
separate attribution section
Source Data
SHP file containing report features
FFS file of background features
FFS file of background text
Required Output
Challenge
FME PDF Writer “The document will have one page and features will
be drawn in a rectangular region of the page called the viewport.”
Required output: Multiple pages Multiple regions per page Optional regions per page
Solution: Enabling PDF Writer Multi-Page Support
A PDF document can have 1 or more pages: pdf_page_number
A page can have 1 or more frames: pdf_frame_name position of the frame on the page: pdf_frame_rectangle
extent of the "map" inside the frame: pdf_world_rectangle
A feature can be written directly to the page or relative to a frame: pageCoordinates [yes|no]
Solution: Development of the FME Workflow
Build page elements Calculate number of report sections required
Create a new feature for each section title Assign each report feature to a section
Create frame as bounding box with 100m buffer around each report feature Build subset of background features, clipped to frame Define pdf_world_rectangle for each frame
Duplicate each report feature as a text feature for attribute reporting
Solution: Development of the FME Workflow
Position page elements Calculate sizes of page elements (section title, map
frame, attribute data) Calculate number of page elements per page (with
or without section title) based on PDF page size Calculate the position of each element on the page
(ie. x/y location in PDF page coordinates) Assign a page number to each element Assign a frame number and page number to each
report feature
What Makes This Flexible?
At runtime the user can specify page layout options, e.g. page size, margins, frame size, etc.
Demo