» Archive for the 'Ubuntu' Category

chm2pdf-A script that converts CHM files into PDF files

Tuesday, August 7th, 2007 by rubypdf

Today I find this project and have not tested it, but I like to note and share it with my friends.

A simple Python script that converts CHM files into PDF files.

Requires:

  • chmlib
  • pychm
  • htmldoc
  • pdftk

All of these should be in your favourite distro repository. Currently it works on Linux (and probably most Unixen).

If you download and use it, drop me a feedback email at devicerandom@gmail.com - I love feedback, both positive and negative.

chm2pdf-0.0.2.tar.gz

From: http://code.google.com/p/chm2pdf/

PortableSigner-Tool to sign Portable Document Files (PDF)

Saturday, May 19th, 2007 by rubypdf

Yesterday, I got a email, he said he want a tool to sign PDF in ubuntu. At first, I decided to develope one, then I thought I have downloaded a this kind tool before, so I think just need tell him this one is ok. And if needed, I can compile it with GCJ(of course just command line), just like pdftk, do not need JVM.

I have a problem: I want to generate a pdf, then I want to apply a digital signature to it. I need a tool very similar to pdftk to do this.

More or less it has to do what you did @ http://blog.rubypdf.com/2007/02/13/merge-xfdf-to-pdf-form-do-digital-signature-then-send-to-customer/

Can you suggest / give some advice on any of the following?

* Is there anything out there already that does this, particularly that works on ubuntu?
* If not, how much difficulty is involved in implementing the ability to digitally sign a pdf into a command line application?
* Is there any documentation you would suggest as a starting point?

Any feedback would be awesome
Regards,
Daniel O’Connor

PortableSigner Logo

Tool to sign Portable Document Files (PDF)

PortableSigner is a signing (with X.509 certificates) program for PDF files. It’s plattform independent and runs (tested) under Windows (2000, XP, …), Linux and Mac OS X.
Features

It’s possible to sign PDF documents digital with X.509 certificates. This signed documents are read only. Therefore it’s possible to implement “electronic paper”
Sourceforge.net page and download

http://sf.net/projects/portablesigner/
What is needed?

* This program
* Java 1.5 compatible runtime
* one PKCS#12 file with your personal digital X.509 certificate (from CaCert for example)
* PDF files to sign

Operating modes

PortableSigner can work in 2 modes:

* GUI Desktop Modes : Graphical frontend to sign single documents.
* Commandline Modes : Operation from the commandline for batch or operatorless work

GUI Desktop Modes

If you have a Java 1.5 compatible runtime, unpack the ZIP file and doubleclick or invoke the following commandline from the extracted directory:

java -jar PortableSigner.jar

Now you see something like this:
MainScreen
The operation on base of this screen is straightforward:

1. Select your inputfile (the last used file is preselected).
2. Select an outputfile.
3. Select your PKCS#12 file (I will support other type of files and keystores later. Look in the ToDo)
4. It is possible to attach a signature block as last page of the document.
5. The password of your PKCS#12 file.
6. Press the “Sign” Button
7. Ready!

Here’s the “About …” dialog. please include the version info in every request to me!
About
Commandline Modes

You can use the following commandline parameter:

pfp$ java -jar PortableSigner.jar -h
usage: PortableSigner
-h Help (this page)
-n Without GUI
-o Outputfile (PDF)
-p Signaturepassword
-s Signaturefile (P12)
-t Inputfile (PDF)
pfp$

For the example above the following commandline is requiered:

pfp$ java -jar PortableSigner.jar -n \
-t /Users/pfp/Desktop/unsigned.pdf \
-o /Users/pfp/Desktop/signed.pdf \
-s /Users/pfp/Desktop/pfp.p12 \
-p MySecretPassword
Document
/Users/pfp/Desktop/signed.pdf
is generated and signed!
pfp$

The switch “-n” turns the GUI off. In all other cases the GUI is invoked to support macro mode calling!

Cross Compiler-Building Windows application under linux

Saturday, November 18th, 2006 by rubypdf

I used to use JavaCompiler0.8 compile windows and Linux applications under windows xp, but some feature I want it does not support(for example, Regex, UTF-16E, MacRoman encoding), and the last version called NativeJ is never free(one developer license need USD35, still does not support UTF-16 encoding).
So I decide to compile one by myself, but I have very little knowledge about GCC and Linux, how can I do?
Google helped me, I found this article:Building GCJ for Windows, it is very detailed. base on this article, I got the Linux version and windows version under Ubuntu, both can build windows application(no matter under windows or under Linux), but I found it omits some resources, when I try the String.replaceAll method of java, it failed, this problem easily to solve, another one is not so easy for me, it not include libiconv, so it does not support most Unicode converting(UTF-16, UTF-16BE, UTF-16LE and so on), I ask the author of the article, he let me ask gcj mail listing.
Last night, I found thisiscool has released the GCJ4.2, and said it also support cross compiler, I have test windows version(just download the compiled version from the website), it work, support Regex and UTF-16BE, great, I can do something base on it. and will try to compile it under Ubuntu next Monday.
Todo:
compile the gcj 4.2 source code get from thisiscool under Ubuntu.
try to compile a version that supports compile Mac OS X application under Ubuntu, because I have no Mac.