You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Bert Frees <be...@gmail.com> on 2011/10/25 16:26:50 UTC
Fwd: odt2braille on the Mac
Hi all,
My name is Bert Frees. I'm the developer of odt2braille, the Braille
plugin for OOo: http://odt2braille.sourceforge.net/index.html. Some time
ago I raised an issue on the old developer list (see e-mail below), but
I got no reaction. I'm bringing it up again on this list in the hope
somebody here can help me out. I'm not a Mac expert at all, but I get a
lot of requests for Mac support. A lot of people would be very happy if
this got solved.
Thanks in advance,
Bert Frees
--
Bert Frees
Katholieke Universiteit Leuven
Dept. Elektrotechniek - ESAT - SCD
Onderzoeksgroep Documentarchitecturen
Kasteelpark Arenberg 10 bus 2442
B-3001 Heverlee-Leuven
België
-------- Original Message --------
Subject: odt2braille on the Mac
Date: Mon, 16 May 2011 11:55:37 +0200
From: Bert Frees <be...@gmail.com>
To: dev@openoffice.org
Hello,
I'm new to this mailing list. My name is Bert Frees. I am the developer
of odt2braille, the OpenOffice.org plugin for printing and exporting
Braille. The website is http://odt2braille.sourceforge.net/index.html.
I'm trying to make this plugin available on the Mac, but I've been
puzzling on a bug for some time now and I'm really stuck. I hope there
is somebody on this list who is familiar with OOo on the Mac, and who
knows what might be the problem.
I'm using javax.print.PrintServiceLookup
<http://download.oracle.com/javase/1.4.2/docs/api/javax/print/PrintServiceLookup.html>
to look up the default printer device. It works fine on Windows, but on
Mac OS it causes OOo to crash. Also, I'm sure the problem is OOo-related
because the code runs fine when it is not embedded in an OOo extension.
This is the code:
javax.print.PrintService[] printers =
javax.print.PrintServiceLookup.lookupDefaultPrintService();
Thanks,
Bert
Re: odt2braille on the Mac
Posted by Bert Frees <be...@gmail.com>.
Thank you! This bug looks familiar, I've come across it before. The
difference is that with this one, an Exception is thrown. But when
trying to use javax.print.PrintServiceLookup, OOo crashes without giving
any details.
/BErt
On 31/10/2011 15:29, Christian Lohmaier wrote:
> Hi Bert, *,
>
> On Mon, Oct 31, 2011 at 12:09 PM, Bert Frees<be...@gmail.com> wrote:
>> PS: Would it be possible to get some more information about this type of
>> threading issue please? Is there a bug report maybe?
> https://issues.apache.org/ooo/show_bug.cgi?id=47888
>
> But that only affects java extensions trying to create a GUI using awt.
>
> ciao
> Christian
Re: odt2braille on the Mac
Posted by Christian Lohmaier <cl...@openoffice.org>.
Hi Bert, *,
On Mon, Oct 31, 2011 at 12:09 PM, Bert Frees <be...@gmail.com> wrote:
> PS: Would it be possible to get some more information about this type of
> threading issue please? Is there a bug report maybe?
https://issues.apache.org/ooo/show_bug.cgi?id=47888
But that only affects java extensions trying to create a GUI using awt.
ciao
Christian
Re: odt2braille on the Mac
Posted by Bert Frees <be...@gmail.com>.
PS: Would it be possible to get some more information about this type of
threading issue please? Is there a bug report maybe?
Thanks,
Bert
On 31/10/2011 11:46, Bert Frees wrote:
> Hi Ariel,
>
> Thanks. Like you said, OOo is an office suite, so we can't really
> expect that printing other things than office documents is well
> supported. I'll try to think of a temporary solution for my problem,
> and I hope this threading issue on Mac gets fixed eventually.
>
> Thanks for the help!
> Bert
>
>
> On 28/10/2011 18:33, Ariel Constenla-Haile wrote:
>> Hi Brett, *
>>
>> On Fri, Oct 28, 2011 at 12:42:18PM +0200, Bert Frees wrote:
>>> Hello Jürgen and Ariel,
>>>
>>> Thanks for your help. I appreciate you want to solve this MacOS
>>> issue when
>>> there is more time.
>>>
>>> Ariel, the suggested code works :) I am now trying to find a way to
>>> send a
>>> byte stream to a printer.
>> let me see if I get it: you are trying to print arbitrary stuff just
>> like in this java snippet
>> http://download.oracle.com/javase/6/docs/api/javax/print/PrintService.html
>>
>>
>>> Could XPrinterPropertySet.setBinarySetup be used
>>> for this purpose maybe?
>> this method is for setting the Printer setup (that is, the printer
>> configuration), not for setting the data to be printed
>>
>>> The com.sun.star.awt.XPrinter service only seems to
>>> support graphical data, am I right?
>> mmm I've only used this to get the printer name, and then print an OOo
>> document, via the css.view.XPrintable interface implemented by OOo
>> documents.
>> Printing in OOo is well supported for printing *office* documents (not
>> any data you may want to print, let's say a PDF file, for example. If
>> you want to print an arbitrary file, let's say a PNG picture, you have
>> to import it as an OOo Draw document and print that office document;
>> AFAIK there is now away to then the PNG image directly to the printer
>> - and this is not wrong, OOo is an office suite, not a printing
>> application).
>>
>> On the other hand, looking at the code in
>> http://svn.apache.org/viewvc/incubator/ooo/trunk/main/toolkit/workben/controls.cxx?view=markup#l125
>>
>> you are able to draw onto a virtual device and print it. See the
>> attached code, it is Java version of this C++ sample.
>>
>> Unfortunately this does not work, there is a bug in the implementation:
>> http://svn.apache.org/viewvc/incubator/ooo/trunk/main/toolkit/source/awt/vclxprinter.cxx?view=markup#l325
>>
>> if ( mpListener.get() ) always evaluates to false, that shared pointer
>> has never been set before. For what I could understand there, it should
>> be:
>>
>> if ( mpPrinter.get() )
>> {
>> maInitJobSetup = mpPrinter->GetJobSetup();
>> mpListener.reset( new vcl::OldStylePrintAdaptor( mpPrinter ) );
>> }
>>
>> this seems to "work"... well, the "Print" dialog shows up now, with the
>> text drawn onto the virtual device:
>> http://arielch.fedorapeople.org/images/vclxprinter.png
>>
>> funny indeed.
>>
>>
>> In short, print office documents, using the well known interfaces
>> described in the view module
>> http://api.openoffice.org/docs/common/ref/com/sun/star/view/module-ix.html
>>
>> http://api.openoffice.org/docs/common/ref/com/sun/star/view/XPrintable.html
>>
>> http://api.openoffice.org/docs/common/ref/com/sun/star/view/XPrintable-xref.html
>>
>> http://ooo-wiki.apache.org/wiki/Documentation/DevGuide/OfficeDev/Storing_Documents#Printing_Documents
>>
>>
>>
>> Regards
>
Re: odt2braille on the Mac
Posted by Bert Frees <be...@gmail.com>.
Hi Ariel,
Thanks. Like you said, OOo is an office suite, so we can't really expect
that printing other things than office documents is well supported. I'll
try to think of a temporary solution for my problem, and I hope this
threading issue on Mac gets fixed eventually.
Thanks for the help!
Bert
On 28/10/2011 18:33, Ariel Constenla-Haile wrote:
> Hi Brett, *
>
> On Fri, Oct 28, 2011 at 12:42:18PM +0200, Bert Frees wrote:
>> Hello Jürgen and Ariel,
>>
>> Thanks for your help. I appreciate you want to solve this MacOS issue when
>> there is more time.
>>
>> Ariel, the suggested code works :) I am now trying to find a way to send a
>> byte stream to a printer.
> let me see if I get it: you are trying to print arbitrary stuff just
> like in this java snippet
> http://download.oracle.com/javase/6/docs/api/javax/print/PrintService.html
>
>> Could XPrinterPropertySet.setBinarySetup be used
>> for this purpose maybe?
> this method is for setting the Printer setup (that is, the printer
> configuration), not for setting the data to be printed
>
>> The com.sun.star.awt.XPrinter service only seems to
>> support graphical data, am I right?
> mmm I've only used this to get the printer name, and then print an OOo
> document, via the css.view.XPrintable interface implemented by OOo
> documents.
> Printing in OOo is well supported for printing *office* documents (not
> any data you may want to print, let's say a PDF file, for example. If
> you want to print an arbitrary file, let's say a PNG picture, you have
> to import it as an OOo Draw document and print that office document;
> AFAIK there is now away to then the PNG image directly to the printer
> - and this is not wrong, OOo is an office suite, not a printing
> application).
>
> On the other hand, looking at the code in
> http://svn.apache.org/viewvc/incubator/ooo/trunk/main/toolkit/workben/controls.cxx?view=markup#l125
> you are able to draw onto a virtual device and print it. See the
> attached code, it is Java version of this C++ sample.
>
> Unfortunately this does not work, there is a bug in the implementation:
> http://svn.apache.org/viewvc/incubator/ooo/trunk/main/toolkit/source/awt/vclxprinter.cxx?view=markup#l325
> if ( mpListener.get() ) always evaluates to false, that shared pointer
> has never been set before. For what I could understand there, it should
> be:
>
> if ( mpPrinter.get() )
> {
> maInitJobSetup = mpPrinter->GetJobSetup();
> mpListener.reset( new vcl::OldStylePrintAdaptor( mpPrinter ) );
> }
>
> this seems to "work"... well, the "Print" dialog shows up now, with the
> text drawn onto the virtual device:
> http://arielch.fedorapeople.org/images/vclxprinter.png
>
> funny indeed.
>
>
> In short, print office documents, using the well known interfaces
> described in the view module
> http://api.openoffice.org/docs/common/ref/com/sun/star/view/module-ix.html
> http://api.openoffice.org/docs/common/ref/com/sun/star/view/XPrintable.html
> http://api.openoffice.org/docs/common/ref/com/sun/star/view/XPrintable-xref.html
> http://ooo-wiki.apache.org/wiki/Documentation/DevGuide/OfficeDev/Storing_Documents#Printing_Documents
>
>
> Regards
Re: odt2braille on the Mac
Posted by Ariel Constenla-Haile <ar...@gmail.com>.
Hi Brett, *
On Fri, Oct 28, 2011 at 12:42:18PM +0200, Bert Frees wrote:
> Hello Jürgen and Ariel,
>
> Thanks for your help. I appreciate you want to solve this MacOS issue when
> there is more time.
>
> Ariel, the suggested code works :) I am now trying to find a way to send a
> byte stream to a printer.
let me see if I get it: you are trying to print arbitrary stuff just
like in this java snippet
http://download.oracle.com/javase/6/docs/api/javax/print/PrintService.html
> Could XPrinterPropertySet.setBinarySetup be used
> for this purpose maybe?
this method is for setting the Printer setup (that is, the printer
configuration), not for setting the data to be printed
> The com.sun.star.awt.XPrinter service only seems to
> support graphical data, am I right?
mmm I've only used this to get the printer name, and then print an OOo
document, via the css.view.XPrintable interface implemented by OOo
documents.
Printing in OOo is well supported for printing *office* documents (not
any data you may want to print, let's say a PDF file, for example. If
you want to print an arbitrary file, let's say a PNG picture, you have
to import it as an OOo Draw document and print that office document;
AFAIK there is now away to then the PNG image directly to the printer
- and this is not wrong, OOo is an office suite, not a printing
application).
On the other hand, looking at the code in
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/toolkit/workben/controls.cxx?view=markup#l125
you are able to draw onto a virtual device and print it. See the
attached code, it is Java version of this C++ sample.
Unfortunately this does not work, there is a bug in the implementation:
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/toolkit/source/awt/vclxprinter.cxx?view=markup#l325
if ( mpListener.get() ) always evaluates to false, that shared pointer
has never been set before. For what I could understand there, it should
be:
if ( mpPrinter.get() )
{
maInitJobSetup = mpPrinter->GetJobSetup();
mpListener.reset( new vcl::OldStylePrintAdaptor( mpPrinter ) );
}
this seems to "work"... well, the "Print" dialog shows up now, with the
text drawn onto the virtual device:
http://arielch.fedorapeople.org/images/vclxprinter.png
funny indeed.
In short, print office documents, using the well known interfaces
described in the view module
http://api.openoffice.org/docs/common/ref/com/sun/star/view/module-ix.html
http://api.openoffice.org/docs/common/ref/com/sun/star/view/XPrintable.html
http://api.openoffice.org/docs/common/ref/com/sun/star/view/XPrintable-xref.html
http://ooo-wiki.apache.org/wiki/Documentation/DevGuide/OfficeDev/Storing_Documents#Printing_Documents
Regards
--
Ariel Constenla-Haile
La Plata, Argentina
Re: odt2braille on the Mac
Posted by Bert Frees <be...@gmail.com>.
Hi Jürgen,
I'm afraid the printing will also crash because
/javax.print.PrintService/[1]//is needed to create a print job and
afaik, the only way to get an instance ofPrintservice is
through/javax.print.PrintServiceLookup/.
[1]
http://download.oracle.com/javase/1.4.2/docs/api/javax/print/class-use/PrintService.html
Thanks,
/Bert
On 28/10/2011 15:30, Andre Fischer wrote:
> Hi Bert,
>
> would it be an option to use the UNO API just to figure out the
> (default) printer name and do the actual printing directly in Java?
> Of course, when the printer enumeration/selection via Java API crashes
> then printing might also crash. But maybe not?
>
> Regards,
> Andre
>
> On 28.10.2011 12:42, Bert Frees wrote:
>> Hello Jürgen and Ariel,
>>
>> Thanks for your help. I appreciate you want to solve this MacOS issue
>> when
>> there is more time.
>>
>> Ariel, the suggested code works :) I am now trying to find a way to
>> send a
>> byte stream to a printer. Could XPrinterPropertySet.setBinarySetup be
>> used
>> for this purpose maybe? The com.sun.star.awt.XPrinter service only
>> seems to
>> support graphical data, am I right?
>>
>> Thanks,
>> /BErt
>>
>> 2011/10/27 Jürgen Schmidt<jo...@googlemail.com>
>>
>>> On 10/27/11 6:12 PM, Ariel Constenla-Haile wrote:
>>>
>>>> Hi Jürgen,
>>>>
>>>> On Thu, Oct 27, 2011 at 12:01:09PM +0200, Jürgen Schmidt wrote:
>>>>
>>>>> Hi Bert,
>>>>>
>>>>> i assume it is again a threading issue on MacOS and the used Java
>>>>> API requires the main thread as well. I don't have a solution yet
>>>>> for you and i am not aware of any existing solution but we have to
>>>>> solve this issue anyway. But at the moment we have many other thinks
>>>>> to do with our ongoing IP clearance.
>>>>>
>>>>> But your extensions is quite interesting and of course very useful
>>>>> for probably many users.
>>>>>
>>>>> We can also think about a further UNO API to ask for the system
>>>>> default printer because the code should be available somewhere.
>>>>>
>>>> it is already available in
>>>> http://api.openoffice.org/**docs/common/ref/com/sun/star/**
>>>> awt/XPrinterServer.html#**getPrinterNames<http://api.openoffice.org/docs/common/ref/com/sun/star/awt/XPrinterServer.html#getPrinterNames>
>>>>
>>>>
>>> you are right, sometimes i got lost in our APIs especially when i
>>> haven't
>>> used it for some time ;-) Hopefully it helps Bert for the moment.
>>>
>>> Juergen
>>>
>
Re: odt2braille on the Mac
Posted by Andre Fischer <af...@a-w-f.de>.
Hi Bert,
would it be an option to use the UNO API just to figure out the
(default) printer name and do the actual printing directly in Java? Of
course, when the printer enumeration/selection via Java API crashes then
printing might also crash. But maybe not?
Regards,
Andre
On 28.10.2011 12:42, Bert Frees wrote:
> Hello Jürgen and Ariel,
>
> Thanks for your help. I appreciate you want to solve this MacOS issue when
> there is more time.
>
> Ariel, the suggested code works :) I am now trying to find a way to send a
> byte stream to a printer. Could XPrinterPropertySet.setBinarySetup be used
> for this purpose maybe? The com.sun.star.awt.XPrinter service only seems to
> support graphical data, am I right?
>
> Thanks,
> /BErt
>
> 2011/10/27 Jürgen Schmidt<jo...@googlemail.com>
>
>> On 10/27/11 6:12 PM, Ariel Constenla-Haile wrote:
>>
>>> Hi Jürgen,
>>>
>>> On Thu, Oct 27, 2011 at 12:01:09PM +0200, Jürgen Schmidt wrote:
>>>
>>>> Hi Bert,
>>>>
>>>> i assume it is again a threading issue on MacOS and the used Java
>>>> API requires the main thread as well. I don't have a solution yet
>>>> for you and i am not aware of any existing solution but we have to
>>>> solve this issue anyway. But at the moment we have many other thinks
>>>> to do with our ongoing IP clearance.
>>>>
>>>> But your extensions is quite interesting and of course very useful
>>>> for probably many users.
>>>>
>>>> We can also think about a further UNO API to ask for the system
>>>> default printer because the code should be available somewhere.
>>>>
>>> it is already available in
>>> http://api.openoffice.org/**docs/common/ref/com/sun/star/**
>>> awt/XPrinterServer.html#**getPrinterNames<http://api.openoffice.org/docs/common/ref/com/sun/star/awt/XPrinterServer.html#getPrinterNames>
>>>
>> you are right, sometimes i got lost in our APIs especially when i haven't
>> used it for some time ;-) Hopefully it helps Bert for the moment.
>>
>> Juergen
>>
Re: odt2braille on the Mac
Posted by Bert Frees <be...@gmail.com>.
Hello Jürgen and Ariel,
Thanks for your help. I appreciate you want to solve this MacOS issue when
there is more time.
Ariel, the suggested code works :) I am now trying to find a way to send a
byte stream to a printer. Could XPrinterPropertySet.setBinarySetup be used
for this purpose maybe? The com.sun.star.awt.XPrinter service only seems to
support graphical data, am I right?
Thanks,
/BErt
2011/10/27 Jürgen Schmidt <jo...@googlemail.com>
> On 10/27/11 6:12 PM, Ariel Constenla-Haile wrote:
>
>>
>> Hi Jürgen,
>>
>> On Thu, Oct 27, 2011 at 12:01:09PM +0200, Jürgen Schmidt wrote:
>>
>>> Hi Bert,
>>>
>>> i assume it is again a threading issue on MacOS and the used Java
>>> API requires the main thread as well. I don't have a solution yet
>>> for you and i am not aware of any existing solution but we have to
>>> solve this issue anyway. But at the moment we have many other thinks
>>> to do with our ongoing IP clearance.
>>>
>>> But your extensions is quite interesting and of course very useful
>>> for probably many users.
>>>
>>> We can also think about a further UNO API to ask for the system
>>> default printer because the code should be available somewhere.
>>>
>>
>> it is already available in
>> http://api.openoffice.org/**docs/common/ref/com/sun/star/**
>> awt/XPrinterServer.html#**getPrinterNames<http://api.openoffice.org/docs/common/ref/com/sun/star/awt/XPrinterServer.html#getPrinterNames>
>>
> you are right, sometimes i got lost in our APIs especially when i haven't
> used it for some time ;-) Hopefully it helps Bert for the moment.
>
> Juergen
>
Re: odt2braille on the Mac
Posted by Jürgen Schmidt <jo...@googlemail.com>.
On 10/27/11 6:12 PM, Ariel Constenla-Haile wrote:
>
> Hi Jürgen,
>
> On Thu, Oct 27, 2011 at 12:01:09PM +0200, Jürgen Schmidt wrote:
>> Hi Bert,
>>
>> i assume it is again a threading issue on MacOS and the used Java
>> API requires the main thread as well. I don't have a solution yet
>> for you and i am not aware of any existing solution but we have to
>> solve this issue anyway. But at the moment we have many other thinks
>> to do with our ongoing IP clearance.
>>
>> But your extensions is quite interesting and of course very useful
>> for probably many users.
>>
>> We can also think about a further UNO API to ask for the system
>> default printer because the code should be available somewhere.
>
> it is already available in
> http://api.openoffice.org/docs/common/ref/com/sun/star/awt/XPrinterServer.html#getPrinterNames
you are right, sometimes i got lost in our APIs especially when i
haven't used it for some time ;-) Hopefully it helps Bert for the moment.
Juergen
Re: odt2braille on the Mac
Posted by Ariel Constenla-Haile <ar...@gmail.com>.
Hi Jürgen,
On Thu, Oct 27, 2011 at 12:01:09PM +0200, Jürgen Schmidt wrote:
> Hi Bert,
>
> i assume it is again a threading issue on MacOS and the used Java
> API requires the main thread as well. I don't have a solution yet
> for you and i am not aware of any existing solution but we have to
> solve this issue anyway. But at the moment we have many other thinks
> to do with our ongoing IP clearance.
>
> But your extensions is quite interesting and of course very useful
> for probably many users.
>
> We can also think about a further UNO API to ask for the system
> default printer because the code should be available somewhere.
it is already available in
http://api.openoffice.org/docs/common/ref/com/sun/star/awt/XPrinterServer.html#getPrinterNames
@Bert: see attached code.
Regards
--
Ariel Constenla-Haile
La Plata, Argentina
Re: odt2braille on the Mac
Posted by Jürgen Schmidt <jo...@googlemail.com>.
Hi Bert,
i assume it is again a threading issue on MacOS and the used Java API
requires the main thread as well. I don't have a solution yet for you
and i am not aware of any existing solution but we have to solve this
issue anyway. But at the moment we have many other thinks to do with our
ongoing IP clearance.
But your extensions is quite interesting and of course very useful for
probably many users.
We can also think about a further UNO API to ask for the system default
printer because the code should be available somewhere.
Please keep us informed or ping us again in the future when we have more
time to focus on this problem.
Juergen
On 10/25/11 5:17 PM, Bert Frees wrote:
> Hi Alexandro,
>
> Thanks for your suggestion.
>
> Something I didn't mention yet is that I need an interface that can send
> raw data (a byte stream) to a printer driver. The problem with braille
> printers is that they're very different from normal ink printers. A
> braille printer is more like an old dotmatrix or impact printer, and is
> controlled with special escape sequences and codes that define where a
> braille dot has to be placed on the paper.
>
> Is it possible to send raw data to a printer using this API?
>
> Best,
> Bert
>
> On 25/10/2011 16:41, Alexandro Colorado wrote:
>> hi, i think it might be better to usee the uno api for the printing
>> services.
>> http://wiki.services.openoffice.org/wiki/API/Samples/Java/Office/DocumentHandling#DocumentPrinter
>>
>>
>> On 10/25/11, Bert Frees<be...@gmail.com> wrote:
>>> Hi all,
>>>
>>> My name is Bert Frees. I'm the developer of odt2braille, the Braille
>>> plugin for OOo: http://odt2braille.sourceforge.net/index.html. Some time
>>> ago I raised an issue on the old developer list (see e-mail below), but
>>> I got no reaction. I'm bringing it up again on this list in the hope
>>> somebody here can help me out. I'm not a Mac expert at all, but I get a
>>> lot of requests for Mac support. A lot of people would be very happy if
>>> this got solved.
>>>
>>> Thanks in advance,
>>> Bert Frees
>>>
>>> --
>>> Bert Frees
>>> Katholieke Universiteit Leuven
>>> Dept. Elektrotechniek - ESAT - SCD
>>> Onderzoeksgroep Documentarchitecturen
>>> Kasteelpark Arenberg 10 bus 2442
>>> B-3001 Heverlee-Leuven
>>> België
>>>
>>>
>>>
>>> -------- Original Message --------
>>> Subject: odt2braille on the Mac
>>> Date: Mon, 16 May 2011 11:55:37 +0200
>>> From: Bert Frees<be...@gmail.com>
>>> To: dev@openoffice.org
>>>
>>>
>>> Hello,
>>>
>>> I'm new to this mailing list. My name is Bert Frees. I am the developer
>>> of odt2braille, the OpenOffice.org plugin for printing and exporting
>>> Braille. The website is http://odt2braille.sourceforge.net/index.html.
>>>
>>> I'm trying to make this plugin available on the Mac, but I've been
>>> puzzling on a bug for some time now and I'm really stuck. I hope there
>>> is somebody on this list who is familiar with OOo on the Mac, and who
>>> knows what might be the problem.
>>>
>>> I'm using javax.print.PrintServiceLookup
>>> <http://download.oracle.com/javase/1.4.2/docs/api/javax/print/PrintServiceLookup.html>
>>>
>>> to look up the default printer device. It works fine on Windows, but on
>>> Mac OS it causes OOo to crash. Also, I'm sure the problem is OOo-related
>>> because the code runs fine when it is not embedded in an OOo extension.
>>>
>>> This is the code:
>>>
>>> javax.print.PrintService[] printers =
>>> javax.print.PrintServiceLookup.lookupDefaultPrintService();
>>>
>>>
>>> Thanks,
>>> Bert
>
Re: odt2braille on the Mac
Posted by Bert Frees <be...@gmail.com>.
Hi Alexandro,
Thanks for your suggestion.
Something I didn't mention yet is that I need an interface that can send
raw data (a byte stream) to a printer driver. The problem with braille
printers is that they're very different from normal ink printers. A
braille printer is more like an old dotmatrix or impact printer, and is
controlled with special escape sequences and codes that define where a
braille dot has to be placed on the paper.
Is it possible to send raw data to a printer using this API?
Best,
Bert
On 25/10/2011 16:41, Alexandro Colorado wrote:
> hi, i think it might be better to usee the uno api for the printing services.
> http://wiki.services.openoffice.org/wiki/API/Samples/Java/Office/DocumentHandling#DocumentPrinter
>
> On 10/25/11, Bert Frees<be...@gmail.com> wrote:
>> Hi all,
>>
>> My name is Bert Frees. I'm the developer of odt2braille, the Braille
>> plugin for OOo: http://odt2braille.sourceforge.net/index.html. Some time
>> ago I raised an issue on the old developer list (see e-mail below), but
>> I got no reaction. I'm bringing it up again on this list in the hope
>> somebody here can help me out. I'm not a Mac expert at all, but I get a
>> lot of requests for Mac support. A lot of people would be very happy if
>> this got solved.
>>
>> Thanks in advance,
>> Bert Frees
>>
>> --
>> Bert Frees
>> Katholieke Universiteit Leuven
>> Dept. Elektrotechniek - ESAT - SCD
>> Onderzoeksgroep Documentarchitecturen
>> Kasteelpark Arenberg 10 bus 2442
>> B-3001 Heverlee-Leuven
>> België
>>
>>
>>
>> -------- Original Message --------
>> Subject: odt2braille on the Mac
>> Date: Mon, 16 May 2011 11:55:37 +0200
>> From: Bert Frees<be...@gmail.com>
>> To: dev@openoffice.org
>>
>>
>> Hello,
>>
>> I'm new to this mailing list. My name is Bert Frees. I am the developer
>> of odt2braille, the OpenOffice.org plugin for printing and exporting
>> Braille. The website is http://odt2braille.sourceforge.net/index.html.
>>
>> I'm trying to make this plugin available on the Mac, but I've been
>> puzzling on a bug for some time now and I'm really stuck. I hope there
>> is somebody on this list who is familiar with OOo on the Mac, and who
>> knows what might be the problem.
>>
>> I'm using javax.print.PrintServiceLookup
>> <http://download.oracle.com/javase/1.4.2/docs/api/javax/print/PrintServiceLookup.html>
>> to look up the default printer device. It works fine on Windows, but on
>> Mac OS it causes OOo to crash. Also, I'm sure the problem is OOo-related
>> because the code runs fine when it is not embedded in an OOo extension.
>>
>> This is the code:
>>
>> javax.print.PrintService[] printers =
>> javax.print.PrintServiceLookup.lookupDefaultPrintService();
>>
>>
>> Thanks,
>> Bert
Re: odt2braille on the Mac
Posted by Alexandro Colorado <jz...@openoffice.org>.
hi, i think it might be better to usee the uno api for the printing services.
http://wiki.services.openoffice.org/wiki/API/Samples/Java/Office/DocumentHandling#DocumentPrinter
On 10/25/11, Bert Frees <be...@gmail.com> wrote:
> Hi all,
>
> My name is Bert Frees. I'm the developer of odt2braille, the Braille
> plugin for OOo: http://odt2braille.sourceforge.net/index.html. Some time
> ago I raised an issue on the old developer list (see e-mail below), but
> I got no reaction. I'm bringing it up again on this list in the hope
> somebody here can help me out. I'm not a Mac expert at all, but I get a
> lot of requests for Mac support. A lot of people would be very happy if
> this got solved.
>
> Thanks in advance,
> Bert Frees
>
> --
> Bert Frees
> Katholieke Universiteit Leuven
> Dept. Elektrotechniek - ESAT - SCD
> Onderzoeksgroep Documentarchitecturen
> Kasteelpark Arenberg 10 bus 2442
> B-3001 Heverlee-Leuven
> België
>
>
>
> -------- Original Message --------
> Subject: odt2braille on the Mac
> Date: Mon, 16 May 2011 11:55:37 +0200
> From: Bert Frees <be...@gmail.com>
> To: dev@openoffice.org
>
>
> Hello,
>
> I'm new to this mailing list. My name is Bert Frees. I am the developer
> of odt2braille, the OpenOffice.org plugin for printing and exporting
> Braille. The website is http://odt2braille.sourceforge.net/index.html.
>
> I'm trying to make this plugin available on the Mac, but I've been
> puzzling on a bug for some time now and I'm really stuck. I hope there
> is somebody on this list who is familiar with OOo on the Mac, and who
> knows what might be the problem.
>
> I'm using javax.print.PrintServiceLookup
> <http://download.oracle.com/javase/1.4.2/docs/api/javax/print/PrintServiceLookup.html>
> to look up the default printer device. It works fine on Windows, but on
> Mac OS it causes OOo to crash. Also, I'm sure the problem is OOo-related
> because the code runs fine when it is not embedded in an OOo extension.
>
> This is the code:
>
> javax.print.PrintService[] printers =
> javax.print.PrintServiceLookup.lookupDefaultPrintService();
>
>
> Thanks,
> Bert
>
>
--
Alexandro Colorado
OpenOffice.org Español
http://es.openoffice.org