Jump to content

Iron python export to pdf


Ram B

Recommended Posts

Export to pdf using iron python

cant find document property type to specify relative text size

I need to set to 90%.

Anyone has done using iron python script?

 

image.png.2a33cb01199c75dd8d87d5fccaf05502.png

Link to comment
Share on other sites

Hi Ram

I have been looking at our API and it seems that option is not public (We will double-check with a developer). Therefore we have the below workaround (proposed by one of my colleagues) 

Quote

If they are trying to set the property with an input parameter, they can create multiple export configurations and select the corresponding one using if-statements.
Mmm the size ratio impacts the font size on every visualisation, they could loop all visualisation and access the font properties.

Here is the example she provided
# 1. Set up the desired font
font = Font("Arial", 20 * ratio) 
# 2. Apply the font settings to any desired text categories
# (Order below is the same as the fonts tab in the user interface)

# Category axis scale labels:
myVis.XAxis.Scale.Font = font

# Value axis scale labels:
myVis.YAxis.Scale.Font = font

# Category axis title label (printing only):
myVis.XAxis.TitleFont = font

# Value axis title label (printing only):
myVis.YAxis.TitleFont = font

# Bar chart labels:
myVis.LabelFont = font

# Trellis headers:
myVis.Trellis.HeaderFont = font

# Legend:
myVis.Legend.Font = font

# Line & curve labels:
myVis.FittingModels.LabelFont = font

# Description:
# Not available in the Spotfire API

# Details visualization message:
myVis.Data.LimitingMarkingsEmptyMessageFont = font
 
 

Let me know if this helps

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...