Re: [api-dev] Questions ad XPrintable.print(properties) ...

2010-07-15 Thread Mathias Bauer

On 14.07.2010 11:37, Rony G. Flatscher wrote:

Hi there,

so far I have been under the assumptions that the list of properties
that one is able to supply to the XPrintable.print(...) method matches
the options that can be given in the GUI of the respective component
type. This way each document type would have a common set of properties,
but also additional print properties it would honor. Then, that's what I
was expecting, the task would be to find the documentation of the print
properties of the respective document type.

Now, trying to print a presentation and taking advantage of its GUI
defined print properties programmatically (i.e. print the presentation
in form of handouts, where each page would depict a programmatically
defined number of slides per printed page)  seems to not be possible. At
least I cannot find any documentation or working examples for this.

So, two questions:

 * Is it intended that the print properties for XPrintable.print(...)
   allow for defining all print options that the document type's GUI
   allows for?


There are two different kinds of such properties - the print options 
(those are passe to the print call) and the print settings (that are 
general printer options set with a setPrinter call). The generic 
services are defined in the css.view package.


At least that was the plan. Reality obviously is different.

To my knowledge none of our applications have own print options (though 
the API would allow to treat it as you described it). At least there is 
no documentation for additional print options, so basically they don't 
exist. ;-)


Writer has its own PrintSettings Service (css.text.PrintSettings) 
defined, but I failed to find comparable service definitions for the 
other applications.



 * How can one exploit the GUI print options for presentations
   (simpress components) such, that one can programmatically print
   handouts with multiple slides per printed page?


It seems that the Impress developers didn't implement that. I also 
couldn't find a setPrinter() implementation in Writer, though - as 
mentioned above - there is a service definition for PrinterSettings in 
the css.text IDL.


It seems that printer settings are set through the DocumentSettings 
services of the applications. I discovered the text PrinterSettings 
properties in the css.text.DocumentSettings and, amongst others, a 
IsPrintHandout property in the css.presentation.DocumentSettings.


Regards,
Mathias

--
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to nospamfor...@gmx.de.
I use it for the OOo lists and only rarely read other mails sent to it.

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Questions ad XPrintable.print(properties) ...

2010-07-15 Thread Rony G. Flatscher
Hi Mathias,

thank you for your comments!

Please see inline comments.


On 15.07.2010 09:40, Mathias Bauer wrote:
 On 14.07.2010 11:37, Rony G. Flatscher wrote:
 Hi there,

 so far I have been under the assumptions that the list of properties
 that one is able to supply to the XPrintable.print(...) method matches
 the options that can be given in the GUI of the respective component
 type. This way each document type would have a common set of properties,
 but also additional print properties it would honor. Then, that's what I
 was expecting, the task would be to find the documentation of the print
 properties of the respective document type.

 Now, trying to print a presentation and taking advantage of its GUI
 defined print properties programmatically (i.e. print the presentation
 in form of handouts, where each page would depict a programmatically
 defined number of slides per printed page)  seems to not be possible. At
 least I cannot find any documentation or working examples for this.

 So, two questions:

  * Is it intended that the print properties for
 XPrintable.print(...)
allow for defining all print options that the document type's GUI
allows for?

 There are two different kinds of such properties - the print options
 (those are passe to the print call) and the print settings (that are
 general printer options set with a setPrinter call). The generic
 services are defined in the css.view package.

 At least that was the plan. Reality obviously is different.

It still would help *tremendeously* everyone else in the world who is
not acquainted with the gory details of OOo programming, if this simple
rule would be at least implemented now for every document/component type.

Currently, printing is much more too effortful than really necessary,
besides, there are document types which seem to be impossible to be
addressed by customers of the UNO APIs as they lack the knowledge (and
also the documentation!) that the core OOo developers have at their command.


 To my knowledge none of our applications have own print options
 (though the API would allow to treat it as you described it). At least
 there is no documentation for additional print options, so basically
 they don't exist. ;-)

 Writer has its own PrintSettings Service (css.text.PrintSettings)
 defined, but I failed to find comparable service definitions for the
 other applications.
That's a very interesting information, thank you very much !

(simpress components) such, that one can programmatically print
handouts with multiple slides per printed page?
  * How can one exploit the GUI print options for presentations

 It seems that the Impress developers didn't implement that. I also
 couldn't find a setPrinter() implementation in Writer, though - as
 mentioned above - there is a service definition for PrinterSettings in
 the css.text IDL.

 It seems that printer settings are set through the DocumentSettings
 services of the applications. I discovered the text PrinterSettings
 properties in the css.text.DocumentSettings and, amongst others, a
 IsPrintHandout property in the css.presentation.DocumentSettings.
Yes, Ariel Constenla-Haile was kind enough to share his findings in
http://api.openoffice.org/servlets/ReadMsg?list=devmsgNo=22705 (start
of the thread:
http://api.openoffice.org/servlets/ReadMsg?list=devmsgNo=22704). As a
result I have experimented more than an hour with all kind of
properties, but have not been able to become successful!
:(

Again, any ideas, hints, docs howto print impress docuemnts as handouts
with multiple slides per page would be very welcome!

Regards,

---rony


-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org