Printing with an Index printer

6 views
Skip to first unread message

Sebastian Humenda

unread,
Jul 16, 2013, 12:18:43 PM7/16/13
to braill...@googlegroups.com
Hello there,

I'd like to emboss (simple) braille with an Index printer. The current work flow
on the command line seems to be:
some_liblouis_command my_text.txt > mytext.brl
Adjust the line length:
cat mytext.brl |fmt -w 31 > mytext.brl

And then? I saw that there is a text2pef sub-command and a emboss command, but
I'm not quite sure how to use those.

Thanks
Sebastian
--
Web: http://www.crustulus.de | Blog (eng / deu): http://www.crustulus.de/blog
Freies Latein-Deutsch-Wörterbuch: http://www.crustulus.de/freedict.de.html
FreeDict: Free multilingual dictionary databases - http://www.freedict.org
signature.asc

Joel Håkansson

unread,
Jul 24, 2013, 5:37:20 AM7/24/13
to braill...@googlegroups.com
Hi,

Have you tried this:
https://code.google.com/p/brailleutils/wiki/UsersGuide

Best,
Joel

-----Ursprungligt meddelande-----
Från: braill...@googlegroups.com [mailto:braill...@googlegroups.com] För Sebastian Humenda
Skickat: den 16 juli 2013 18:19
Till: braill...@googlegroups.com
Ämne: Printing with an Index printer

Sebastian Humenda

unread,
Jul 25, 2013, 12:21:16 PM7/25/13
to braill...@googlegroups.com
Hello Joel,

Joel Håkansson schrieb am 24.07.2013, 11:37 +0200:
>Have you tried this:
>https://code.google.com/p/brailleutils/wiki/UsersGuide
Yeah, I overlooked it. What would be the device to enter on GNU/Linux for an
USB-connected index printer?

I've tried to convert a PEF file, using:
$ brailleutils text2pef brl.txt out.pef -doublex=true
Starting text to pef application...
Exception in thread "main" java.lang.IllegalArgumentException: Unknown option "doublex"
at org.daisy.braille.facade.PEFConverterFacade.parseTextFile(PEFConverterFacade.java:285)
at org.daisy.braille.ui.TextParser.main(TextParser.java:80)
at org.daisy.braille.ui.BasicUI.run(BasicUI.java:114)
at org.daisy.braille.ui.BasicUI.main(BasicUI.java:143)

What have I done wrong?
The text is attached to this e-mail.
brl.txt
signature.asc

Joel Håkansson

unread,
Jul 26, 2013, 5:18:30 AM7/26/13
to braill...@googlegroups.com
Hi Sebastian,

You made a small typo, it's "duplex", not "doublex". Also, in this case, you need to specify the table, since the content matches two tables nabcc and de_de.

Assuming nabcc, the command on Windows is:
java -jar brailleUtils-ui.jar text2pef brl.txt out.pef -duplex=true -mode=nabcc

From what you wrote, I assume the command you want is:
$ brailleutils text2pef brl.txt out.pef -duplex=true -mode=nabcc

As for embossing, the command is simply:
$ brailleutils emboss out.pef

If this is not the first time you run this command you may need to use the following command first to reconfigure the embosser:
$ brailleutils emboss -setup

In the case of a USB-connected device, it might be more convenient to have a combined command. I have added an issue regarding this:
http://code.google.com/p/brailleutils/issues/detail?id=48

Note that, text2pef is designed for paginated text and the input you provided does not contain any form feeds which causes the resulting pef-file to contain a single page. Because the page is too high, it will not emboss. See also: http://code.google.com/p/brailleutils/issues/detail?id=39

Best,
Joel

-----Ursprungligt meddelande-----
Från: braill...@googlegroups.com [mailto:braill...@googlegroups.com] För Sebastian Humenda
Skickat: den 25 juli 2013 18:21
Till: braill...@googlegroups.com
Ämne: Re: Printing with an Index printer

Sebastian Humenda

unread,
Jul 26, 2013, 8:28:35 AM7/26/13
to braill...@googlegroups.com
Hello Joel,

Joel Håkansson schrieb am 26.07.2013, 11:18 +0200:
>You made a small typo, it's "duplex", not "doublex". Also, in this case, you
>need to specify the table, since the content matches two tables nabcc and
>de_de.
I was too tired. I translated my text using libblouis, via the command
lou_translate (en-gb-g1.utb). Can I always assume that the output is nabcc?

Now I get:
$ brailleutils text2pef brl.txt out.pef -duplex=true
Starting text to pef application...
Validating result...
Validating out.pef using "PEF Validator": A validator for PEF 1.0 files.
Validation was unsuccessful
Messages returned by the validator:
net.sf.saxon.TransformerFactoryImpl
java.lang.IllegalArgumentException: invalid input for CompactParseable
at com.thaiopensource.relaxng.parse.compact.CompactParseable.makeReader(CompactParseable.java:80)
at com.thaiopensource.relaxng.parse.compact.CompactParseable.parse(CompactParseable.java:40)
at com.thaiopensource.relaxng.pattern.SchemaBuilderImpl.parse(SchemaBuilderImpl.java:76)
at com.thaiopensource.validate.rng.impl.SchemaReaderImpl.createSchema(SchemaReaderImpl.java:60)
at com.thaiopensource.validate.AbstractSchemaReader.createSchema(AbstractSchemaReader.java:13)
at com.thaiopensource.validate.schematron.SchemaReaderImpl.<init>(SchemaReaderImpl.java:87)
at com.thaiopensource.validate.schematron.SchematronSchemaReaderFactory.createSchemaReader(SchematronSchemaReaderFactory.java:18)
at com.thaiopensource.validate.SchemaReaderLoader.createSchemaReader(SchemaReaderLoader.java:19)
at com.thaiopensource.validate.auto.SchemaReaderFactorySchemaReceiverFactory.createSchemaReceiver(SchemaReaderFactorySchemaReceiverFactory.java:17)
at com.thaiopensource.validate.auto.SchemaReceiverLoader.createSchemaReceiver(SchemaReceiverLoader.java:15)
at com.thaiopensource.validate.auto.AutoSchemaReceiver$Handler.startElement(AutoSchemaReceiver.java:46)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElementAfterName(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.thaiopensource.validate.auto.AutoSchemaReader.createSchema(AutoSchemaReader.java:69)
at com.thaiopensource.validate.ValidationDriver.loadSchema(ValidationDriver.java:126)
at org.daisy.braille.pef.PEFValidator.runValidation(PEFValidator.java:147)
at org.daisy.braille.pef.PEFValidator.validate(PEFValidator.java:129)
at org.daisy.braille.pef.PEFValidator.validate(PEFValidator.java:87)
at org.daisy.braille.facade.PEFValidatorFacade.validate(PEFValidatorFacade.java:64)
at org.daisy.braille.ui.TextParser.main(TextParser.java:82)
at org.daisy.braille.ui.BasicUI.run(BasicUI.java:114)
at org.daisy.braille.ui.BasicUI.main(BasicUI.java:143)
Warning: Validation failed for out.pef

What is now wrong?
signature.asc

Joel Håkansson

unread,
Jul 29, 2013, 4:36:42 AM7/29/13
to braill...@googlegroups.com
Hi Sebastian,

I don't know. I have never seen it. It seems to me that either you are using an older version of Braille Utils (because I cannot reproduce it), or (more likely) that there is something wrong with the packaging or classpath. As far as I can tell, a resource file for the validation seems to be missing for some reason, and that is causing the error. Could you please try and download Braille Utils from Google code and run that as is, and tell me if you have the same problem? Also, if it still does not work, can you give me some details about the JVM and OS you are using?

Best,
Joel

-----Ursprungligt meddelande-----
Från: braill...@googlegroups.com [mailto:braill...@googlegroups.com] För Sebastian Humenda
Skickat: den 26 juli 2013 14:29
Till: braill...@googlegroups.com
Ämne: Re: Printing with an Index printer

Sebastian Humenda

unread,
Jul 29, 2013, 5:20:32 AM7/29/13
to braill...@googlegroups.com
Hello Joel,

Joel Håkansson schrieb am 29.07.2013, 10:36 +0200:
>I don't know. I have never seen it. It seems to me that either you are using an
>older version of Braille Utils (because I cannot reproduce it), or (more
>likely) that there is something wrong with the packaging or classpath. As far
>as I can tell, a resource file for the validation seems to be missing for some
>reason, and that is causing the error. Could you please try and download
>Braille Utils from Google code and run that as is, and tell me if you have the
>same problem? Also, if it still does not work, can you give me some details
>about the JVM and OS you are using?
So it still doesn't work which at least seems to give me the confidence that
I'll packaged it correctly :-). Here a screen dump:
===
krustenbook /tmp/brailleUtils % java -jar brailleUtils-ui.jar text2pef ~/brl.txt out.pef -duplex
Starting text to pef application...
Exception in thread "main" java.lang.IllegalArgumentException: Unknown option "required-2"
at org.daisy.braille.facade.PEFConverterFacade.parseTextFile(PEFConverterFacade.java:285)
at org.daisy.braille.ui.TextParser.main(TextParser.java:80)
at org.daisy.braille.ui.BasicUI.run(BasicUI.java:114)
at org.daisy.braille.ui.BasicUI.main(BasicUI.java:143)
===
Java is at version 6, but changing to version 7 yields the same error! I'm
running Debian Unstable, so presumably the same software as the current Ubuntu
has. What else details can I give you?

Best
signature.asc

Joel Håkansson

unread,
Jul 29, 2013, 5:25:46 AM7/29/13
to braill...@googlegroups.com
Hi,

Slight typo may cause the problem now:
java -jar brailleUtils-ui.jar text2pef ~/brl.txt out.pef -duplex

it should be:
java -jar brailleUtils-ui.jar text2pef ~/brl.txt out.pef -duplex=true

(also, I am not sure about ~/brl.txt, but that's just because I don't know much about Linux)

Best,
Joel

-----Ursprungligt meddelande-----
Från: braill...@googlegroups.com [mailto:braill...@googlegroups.com] För Sebastian Humenda
Skickat: den 29 juli 2013 11:21
Till: braill...@googlegroups.com
Ämne: Re: SV: Printing with an Index printer

Bert Frees

unread,
Jul 29, 2013, 5:32:27 AM7/29/13
to braill...@googlegroups.com

2013/7/29 Joel Håkansson <Joel.Ha...@mtm.se>


(also, I am not sure about ~/brl.txt, but that's just because I don't know much about Linux)


That should be ok, the shell automatically expands ~ in arguments to ${HOME}

Sebastian Humenda

unread,
Jul 29, 2013, 6:14:35 AM7/29/13
to braill...@googlegroups.com
Hello Joel,

Joel Håkansson schrieb am 29.07.2013, 11:25 +0200:
>Slight typo may cause the problem now:
>java -jar brailleUtils-ui.jar text2pef ~/brl.txt out.pef -duplex
I always forget that since that is not the common syntax :-).

>it should be:
Ok, then there is indeed something wrong with the classpath.
===
krustenbook /tmp/brailleUtils % java -jar brailleUtils-ui.jar text2pef /home/streicher/brl.txt out.pef -duplex=true -mode
=nabcc
Starting text to pef application...
Validating result...
Validating out.pef using "PEF Validator": A validator for PEF 1.0 files.
Validation was succcessful
[packaged command:]
krustenbook /tmp/brailleUtils % brailleutils text2pef /home/streicher/brl.txt out.pef -duplex=true -mode
Starting text to pef application...
at org.daisy.braille.ui.BasicUI.run(BasicUI.java:114)
at org.daisy.braille.ui.BasicUI.main(BasicUI.java:143)
Warning: Validation failed for out.pef



























>java -jar brailleUtils-ui.jar text2pef ~/brl.txt out.pef -duplex=true
===
krustenbook /tmp/brailleUtils % java -jar brailleUtils-ui.jar text2pef /home/streicher/brl.txt out.pef -duplex=true
Starting text to pef application...
Jul 29, 2013 12:00:49 PM org.daisy.braille.pef.TextInputDetector detect
WARNING: These (matching) tables uses the same bytes for different braille characters: 'German' 'US (NABCC)'
org.daisy.braille.pef.InputDetectionException: Cannot choose a table automatically. Possible matches: 'German', 'US (NABCC)'
at org.daisy.braille.pef.TextHandler.<init>(TextHandler.java:192)
at org.daisy.braille.pef.TextHandler.<init>(TextHandler.java:39)
at org.daisy.braille.pef.TextHandler$Builder.build(TextHandler.java:162)
at org.daisy.braille.facade.PEFConverterFacade.parseTextFile(PEFConverterFacade.java:288)
at org.daisy.braille.ui.TextParser.main(TextParser.java:80)
at org.daisy.braille.ui.BasicUI.run(BasicUI.java:114)
at org.daisy.braille.ui.BasicUI.main(BasicUI.java:143)
===

I have looked both into the jar's of your zip and my package and there is at
least the XSL file present. But I can remember that saxon was a bit touchy when
the class path was incorrect.
I also looked in the META-InF file of my version, please see the below attached
version. Is the class path incorrect? Should it have the full paths?

Best
Sebastian
===MANIFEST.MF===
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Created-By: 1.7.0_03-b21 (Oracle Corporation)
Built-By: streicher
Built-On: 2013-05-29
Repository-Revision: N/A
Implementation-Title: Braille Utils Core
Implementation-Version: snapshot
Implementation-URL: http://code.google.com/p/brailleutils/
Class-Path: saxonb.jar stax-api.jar wstx-lgpl.jar jing.jar xercesImpl.
jar xml-apis.jar isorelax.jar
signature.asc
Reply all
Reply to author
Forward
0 new messages