My charts are wider than deep. I am saving as a spreadsheet and also exporting to PDF. The problem arises in that I cannot see how to set to PORTRAIT in a way that the PDF Export finds acceptable.
What is happening is that the PDF is produced in landscape, truncating the charts to "print" in parts on different pages.
In manual mode, setting the Format>Page> to Portrait, and tweaking the X's and Y's appropriately, I can print the two charts on their own pages with no overlap, truncation, etc.
I have this piece of code
Code: Select all
dim PrintOptions(0) as new com.sun.star.beans.PropertyValue
PrintOptions(0).Name = "PaperOrientation"
PrintOptions(0).Value = com.sun.star.view.PaperOrientation.LANDSCAPE
There are two sheets, the data sheet where all the data is loaded, and the charts sheet where the charts are produced. The latter is sheet(0) and the other is sheet(1).
I have tried dropping these lines into several likely places but I always end up with the IOException message, pointing to the "Save as .ods" line:
Code: Select all
ThisComponent.storeAsURL(storeAsUrl, args_ODS())
Thanks
David