Skip to main content
Solved

Orientation of PDF Output

  • June 6, 2018
  • 3 replies
  • 72 views

Forum|alt.badge.img

Good day,

I create one map per ship showing its track of the last month. The map is output as pdf (Adobe Geospatial PDF Writer). By default the page orientation is portrait. I would like to dynamically change the orientation to landscape depending of the map's bounding box (width/length). How can I do it?

Best answer by debbiatsafe

Hi @kat

You can use a Tester or TestFilter to route features based on the bounding box ratio (eg. if width greater than length = portrait, etc.) to an appropriately configured PDFPageFormatter. You will be able to determine the page size and orientation using the PDFPageFormatter.

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

debbiatsafe
Safer
Forum|alt.badge.img+21
  • Safer
  • Best Answer
  • June 6, 2018

Hi @kat

You can use a Tester or TestFilter to route features based on the bounding box ratio (eg. if width greater than length = portrait, etc.) to an appropriately configured PDFPageFormatter. You will be able to determine the page size and orientation using the PDFPageFormatter.


Forum|alt.badge.img
  • Author
  • June 7, 2018

Hi @kat

You can use a Tester or TestFilter to route features based on the bounding box ratio (eg. if width greater than length = portrait, etc.) to an appropriately configured PDFPageFormatter. You will be able to determine the page size and orientation using the PDFPageFormatter.

Thanks. Working fine. I even don't need the PDFPageFormatter. I only create the pdf_page_size attribute.

 

 


deanhowell
Influencer
Forum|alt.badge.img+24
  • Influencer
  • July 15, 2019
Thanks. Working fine. I even don't need the PDFPageFormatter. I only create the pdf_page_size attribute.

 

 

Hello @kat, I am trying to do the same thing, so was wondering if you could do a screen shot of what you did to solve this issue please?