SDK/python : selecting "Print to File..." as printer from API may be fraught with difficulty?

the »arrays« are »tuple«s in this context:

print( type( ( filter_name, filter_data)))

⇒ <class tuple>

Oh sorry, I deleted my comment…

Oh, yes, I see you made up the tuple in the call to storeToURL()

Cf. this implementation for Basic: getUnoTypeForSbxValue
(note the comment telling “If all elements of the arrays are from the same type, take this one - otherwise the whole will be considered as Any-Sequence” - it checks the types of the Basic array first, and then decided which type the sequence elements must be)
to the Python-specific implementation: pyObject2Any
which takes either a tuple, or a list, and converts them to a sequence of any unconditionally.

The code in the core, that eventually gets the resulting sequence (itself packed into an any), will attempt to extract it into a sequence of PropertyValue - and will fail. Which is handled silently in this case.

So yes, as I mentioned elsewhere, it’s a bug in the implementation … and someone could want to file a bug report.

2 Likes

mikekaganski I’m pretty fluent in C++, but I’ve kind of tried to avoid reading source for a while now.
.
I just want to say a sincere thank you for the help you and others have offered. I really do appreciate it! I may well revisit this topic at some time, but I’ve found a way to meet my requirements using pdftk and bash.
.
In case you’re interested, I write with markdown, which allows me to use git for version control. I convert my manuscripts to .odt using pandoc, then print to pdf using libreoffice and a style template. Usually, I just leave it at that, and have a live preview with my pdf viewer. My goal here is to rearrange the pages into signatures, so I can bind them into book form. I’m involved in the book’s design, so this is a way to make a dummy.
.
Sorry I annoyed you. Wasn’t intentional! :slight_smile:

1 Like