Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

epub2pdf is a fairly platform-independent program. Based on Java, it executes without a hitch on my machine, with no dependencies.

However, strangely enough, the program requires an active internet connection to work properly. I didn't realize this at first, and the program's website gives no indication of the fact that, as such, the program is just a front-end for an 'online' converter.

Is that normal?

Isn't that kind of an invasion of privacy?

Why would this program need to make HTTP connections to external servers?

Furthermore, this program isn't available in the Debian/Ubuntu repositories.

Would that have anything to do with this issue?

Can someone suggest an alternative?

This is the error it gives when you run it without an internet connection:

me@ROOROO:~/epub2pdf$ ./epub2pdf.sh adventures_in_dev_null.epub 
epub2pdf v0.5 - Copyright (C) 2010  Brendan C. Lefebvre
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.
See file 'COPYING' for full license and warranty details.


Registered font families: courier, helvetica, symbol, times, times-roman, zapfdingbats
Default font set to helvetica
Default font base size set to 12.0pt
Default monospace font: courier
Monospace base size: 10.0pt
Default paragraph alignment: left
Margins (top right bottom left): 4.00mm 4.00mm 4.00mm 4.00mm 
Page size (w x h): 90.00mm x 115.00mm
Converting ~/epub2pdf/adventures_in_dev_null.epub
java.net.UnknownHostException: www.daisy.org
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:175)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:546)
        at java.net.Socket.connect(Socket.java:495)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:178)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
        at sun.net.www.http.HttpClient.New(HttpClient.java:321)
        at sun.net.www.http.HttpClient.New(HttpClient.java:338)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:935)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:876)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:801)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
        at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
        at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.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 com.amphisoft.epub.metadata.Ncx.fromFile(Unknown Source)
        at com.amphisoft.epub.Epub.populateMemberFields(Unknown Source)
        at com.amphisoft.epub.Epub.setFile(Unknown Source)
        at com.amphisoft.epub.Epub.setFile(Unknown Source)
        at com.amphisoft.epub.Epub.fromFile(Unknown Source)
        at com.amphisoft.epub2pdf.Converter.convert(Unknown Source)
        at com.amphisoft.epub2pdf.Converter.main(Unknown Source)
        at com.amphisoft.epub2pdf.Epub2Pdf.main(Unknown Source)
Writing PDF to /home/user/adventures_in_dev_null.pdf
Processing 22 HTML file(s): 
.java.net.UnknownHostException: www.w3.org
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:175)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:546)
        at java.net.Socket.connect(Socket.java:495)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:178)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
        at sun.net.www.http.HttpClient.New(HttpClient.java:321)
        at sun.net.www.http.HttpClient.New(HttpClient.java:338)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:935)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:876)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:801)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:654)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1292)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1229)
        at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.startPE(XMLDTDScannerImpl.java:699)
        at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.skipSeparator(XMLDTDScannerImpl.java:2046)
        at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDecls(XMLDTDScannerImpl.java:2009)
            at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDTDExternalSubset(XMLDTDScannerImpl.java:297)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1178)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1065)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:978)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:819)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:748)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
        at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
        at org.apache.xml.resolver.tools.ResolvingXMLFilter.parse(ResolvingXMLFilter.java:141)
        at com.amphisoft.epub2pdf.content.XhtmlHandler.parseXhtml(Unknown Source)
        at com.amphisoft.epub2pdf.content.XhtmlHandler.<init>(Unknown Source)
        at com.amphisoft.epub2pdf.content.XhtmlHandler.process(Unknown Source)
        at com.amphisoft.epub2pdf.Converter.convert(Unknown Source)
        at com.amphisoft.epub2pdf.Converter.main(Unknown Source)
        at com.amphisoft.epub2pdf.Epub2Pdf.main(Unknown Source)
Exception converting adventures_in_dev_null.epub:
        ExceptionConverter at:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
        at com.amphisoft.epub2pdf.Converter.main(Unknown Source)
        at com.amphisoft.epub2pdf.Epub2Pdf.main(Unknown Source)
share|improve this question

1 Answer 1

Looking at the Java sources, the connections seem benign. Their purpose is to retrieve DOM and DTD files for the book types the program deals with. Z39.86, for instance, is a digital talking book specification. It seems odd to me as a programmer to put this kind of network dependency into an application instead of bundling the needed files, but there may be copyright or licensing issues I'm not aware of.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.