Jump to content

Export to PDF is getting truncated using pdfExportSetting


Jorge Madrigal

Recommended Posts

I have Spotfire verision 7.11 and I am using PdfExportSettings to create an export to PDF, but my visualization is getting truncated on the PDF, I have added the code below to try to make it work without sucess:

pdfexpsettings = PdfExportSettings()

pdfexpsettings.UseEntirePage = True

pdfexpsettings.IncludePageFooter=False

pdfexpsettings.Scope = ExportScope.ActivePageOnePagePerVisualization

if Document.Properties["Orientation"] == 0:

pdfexpsettings.PageOrientation = PageOrientation.Portrait

else:

pdfexpsettings.PageOrientation = PageOrientation.Landscape

pdfexpsettings.IncludeFilterSettings = False

pdfexpsettings.IncludePageTitles = False

pdfexpsettings.IncludeVisualizationTitles = True

pdfexpsettings.IncludeVisualizationDescriptions = False

pdfexpsettings.IncludeNonVisibleContent = True

size = Document.Properties["Size"]

if size == 0:

pdfexpsettings.PaperSize = PaperSize.A4

elif size ==1:

pdfexpsettings.PaperSize = PaperSize.Letter

elif size ==2:

pdfexpsettings.PaperSize = PaperSize.A0

elif size ==3:

pdfexpsettings.PaperSize = PaperSize.A1

elif size ==4:

pdfexpsettings.PaperSize = PaperSize.A2

elif size ==5:

pdfexpsettings.PaperSize = PaperSize.A3

elif size ==6:

pdfexpsettings.PaperSize = PaperSize.A5

elif size ==7:

pdfexpsettings.PaperSize = PaperSize.Legal

if Document.Properties["Orientation"] == 0:

pdfexpsettings.PageOrientation = PageOrientation.Portrait

else:

pdfexpsettings.PageOrientation = PageOrientation.Landscape

 

Any ideas on this It looks that the Report option is not available on my version of Spotfire

Link to comment
Share on other sites

If you check the documentation for "IncludeNonVisibleContent" it states that "This is not applicable when exporting active page or all pages".

https://docs.tibco.com/pub/doc_remote/sfire_dev/area/doc/api/TIB_sfire-a...

In your code you have set the ExportScope to"ActivePageOnePagePerVisualization" so it will export only the content that isvisible on screen. In order to export the invisible content for a table visualization you should only export that visualization and thus the ExportScope should be "ActiveVisualization"

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...