How to get the epub from an acsm file? - adobe

I want to write a small linux tool that automates the download of eBooks. From my online library I can download an ACSM file. Now I need a step to automatically download the epub file. From what I've read this step is called fulfilment. The tool shall run on a headless server.
Right now I'm scripting wine and Adobe Digital Editions. But that is quite ugly and requires a graphical user interface. While this works fine on my PC, it doesn't work on a headless server.
Does anyone know a library that I could use?
Or a documentation of the fulfilment process so I could implement my own library?
In "PDF -Adobe Digital Edition" I saw a reference to the ADE_LauncherSDK_DevNet.pdf but I do not understand how to use this in an application.
Notes:
I do not want to remove the DRM, I just want to get the epub file.
The tool will be open source, so I do not want to buy anything from Adobe.

I know it's a 9 years old question but because I ended up on it with the exact same question, I wanted to give an answer.
Indeed, the code to download an epub/pdf from an acsm file can be found in 2 projects.
libgourou is a free implementation of Adobe's ADEPT protocol used to
add DRM on ePub/PDF files. It overcome the lacks of Adobe support for
Linux platforms.
https://indefero.soutade.fr//p/libgourou/
There is a docker version: https://github.com/bcliang/docker-libgourou/
Calibre ACSM Input plugin
This is a Calibre plugin that allows you to
turn ACSM files into EPUB or PDF files without the need for Adobe
Digital Editions. It is a full Python reimplementation of libgourou by
Grégory Soutadé (http://indefero.soutade.fr/p/libgourou/), and has
since been extended by more and more features.
https://github.com/Leseratte10/acsm-calibre-plugin
Calibre has a command line interface: https://manual.calibre-ebook.com/generated/en/cli-index.html

Related

How to create and modify .doc and .docx file in Qt?

I want to create and modify .doc and .docx file in Qt creator with ability to compile for Windows, Linux, Android and IOS.
This is not a Qt-specific question imho. Anyhow here is my answer:
Quoting wikipedia:
is a zipped, XML-based file format
What this means is you need to decompress (you need to figure out how it is compressed to begin with) and process the XML for doc files. Qt provides basic (de)compression facilities and does provide the tools to process XML data.
In terms of Qt Creator - you have to write your own plugin for that purpose. You can check what's already there - processing of CMake, C++, C, Python files.
You should use what's already there. LibreOffice for example, which is open source and free, can handle such documents (incl. doc). There are libraries that do that too. So your best bet is to integrate some library into your Qt application. I would NOT recommend implementing it yourself unless you have a lot of spare time. The fact that big projects such as LibreOffice, OpenOffice etc. still don't have 100% support for such documents should give a big enough hint that it's not a trivial task.

How to use a license with JWrapper

So I have been working with the free version of JWrapper for some time now and have been quite pleased with the results; however, I have now purchased a license and would like to use it but I am unable to find the method with which to activate my JWrapper. I do not use the graphical interface version of JWrapper; rather I have created a xml installation file and pass that directly via commandline to JWrapper for building. Is there a special xml tag for specifying the license location? I was unable to find this information on JWrapper's homepage or support docs.
I received an answer from the support team. In order to use the license without using the JWrapperApp gui to build your application you will simply have to have the jwlicense.txt file in the same directory as your jwrapper.jar
After some tests it appears that the jwlicence.txt file must be in the current directory. So the best is to have all the files (jwrapper jar, jwrapper.xml and jwlicence.txt) in the same folder and run the compiler from that folder.

Qt - QImage works on one computer and not on another [duplicate]

I set a background image(JPEG) on a Qt widget using setStyleSheet(). This is perfectly shown on my computer, but not on another computer.
I am not getting a link error on the other computer -- the feature just doesn't work. Is there something I am missing in the distribution or build of my app, something that the Qt dev tools installs or is otherwise available, that isn't present on other machines? How can I distribute a Qt app that uses JPEG functionality?
JPEG support in Qt comes as a plugin. Make sure you have also deployed the plugin to your non-development machine. If you haven't, it will simply silently fail and you'll end up not seeing any of the JPEG images. Have a look at the official documentation for more detailed information: http://qt-project.org/doc/qt-4.8/deployment-windows.html
In short (and as a quick solution, but have a look at the documentation as well) you could create a directory named "imageformats" as a subdirectory of the folder containing your exe, into which you copy QJPEG4.dll.

Installing Flex 4.6 in Eclipse on Windows Vista

I am using Windows Vista 32bit. I have installed Eclipse Helios Service Release 2.
I need to integrate flex in Eclipse. Can someone show give me steps to install or point me to a good tutorial that explains the process.
Note: I have downloaded flex_sdk_4.6
From your comments it seems FlashBuilder is your tool of choice.
Download it
Go to the FlashBuilder download page to get it. The automatic download will have you download an Akamai software, which is Adobe's download crapware. If you're behind a proxy, you're out of luck: your download won't work. You can get a direct link though: simply cancel the automatic download and on the download page select the "File 1 of 1" link.
Install it
You can find the installation instructions here for both a standalone installation or as an Eclipse plugin: http://helpx.adobe.com/flash-builder/release-note/flash-builder-4-6-release.html#main_Install_your_software
You can't really integrate Flex into eclipse without a plug-in - it would let you edit the text files as text, and run the compiler, but you'd have no actual IDE support.
As for plugins/eclipse-based IDEs: Right now, there's Adobe Flash Builder and FDT, which are both good products (they each have different advantages and shortcomings, though -you probably want to try them out and see which fits your needs best), but they are both neither free nor cheap.
Another very good commercial IDE is IntelliJ IDEA, but that's not eclipse-based.
If you need a free IDE for ActionScript on Windows, check out FlashDevelop - it is not quite as sophisticated as the eclipse-based commercial products, but a good start if you want to get into ActionScript, or try out IDE alternatives to Flash.

How can I convert a JAR file to an EXE file?

I want to created a JAR file and I want to run it on a client machine.So, I have a couple of questions:
How can I convert the JAR file to an EXE file?
How can I encrypt the JAR file's contents? The jar file could be extracted with WinRAR and the classes could be decompiled with any Java decompiler.
How can I create an installer? My clients doesn't have any JVM and I don't want to ship JDK or JRE along, because they have big size.
See this link: Java to Exe. It also explains what valid reasons are to do this, and when you should not.
You can't really encrypt binaries as the machine has to understand them. That said, an optimized executable is very difficult to decompile, while plain class files are ease.
If you have an exe there are installers enough.
JSmooth is a application which will wrap your Jar in an exe
it also allows you to check if the correct version of JRE is available on the system you're deploying to
http://jsmooth.sourceforge.net/
As for 1): I guess you can not. There may be tools out there, but you cannot do that with standard tools shipped with JDK, as it would destroy platform independance. (See other answers providing links to such 3rd party tools)
As for 3): Use InnoSetup to create the installer. Include JRE within setup and let InnoSetup install it on the fly.
You can't prevent decompilation. The best you can do is make it harder or more time-consuming to do so. As an answer to your question though, I believe you can use gcj to compile Java into EXEs.
May be Excelsior JET will satisfy your needs.) IMHO very mature product.
1) I have recently tried the program jarToExe and like it.
Some features are:
free basic version or very cheap ($30) for 'enterprise'
ability to have windows task manager list your app's name instead of the default java.exe
extra obfuscation
runtime check that java is installed
2) You can make it harder to reverse engineer using proguard or other obfuscator
3) nsis is a very powerful, free scripting language to create windows installers. Good documentation on the site wiki and support on stack overflow as well.
Launch4j worked for me while some tools hadn't been working. It also have a good guide here.
Hope this help!
We use a 7zip SFX install launcher. This is an open source simple tool. It will package your jar, a version of jre so it's not mandatory for the installing systems to have jre installed and a self extracting version of 7zip. Here is a tutorial which explains how to bundle and GitHub link
The project is not maintained but works perfectly(tested until Java 1.8)
1) To create the exe, you can use Launch4j
2) As I have seen, you cannot encrypt the jar contents. I'm not sure though.
3) To create the installer you can use the exe you just created and use InnoSetup to create the files. You have to embed the jre inside the installer and also any other libraries and extra files that may need in the runtime. When embedding the jre, the setup gets large and if you want to avoid that, you can ask the clients to install java in the machines. That way, you wont need to ship with the jre.

Resources