View Full Version : soPDF GUI Front-End


Nathan Campos
12-31-2009, 03:17 PM
Hello,
I've dedicated some of my free time to help users that don't have much experience with consoles and then I've built a GUI front-end to soPDF.

Requirements

Windows 32-bit(95 or better)
soPDF on the GUI front-end directory
PDFs to convert :D


http://img33.imageshack.us/img33/5701/sopdfgui.png

File Descriptions

soPDF_Bundle.rar - soPDF GUI with the application included
soPDF_Frontend.rar - soPDF GUI only


Thanks for frabjous for the x64 Linux port (http://www.mobileread.com/forums/showpost.php?p=733549&postcount=13). ;)

rhadin
12-31-2009, 03:27 PM
Nathan, the GUI looks great in the screen capture. But I have a more basic question: What is soPDF? What is it supposed to do?

Nathan Campos
12-31-2009, 03:36 PM
soPDF - Better than yet another PDF to LRF converter (http://www.mobileread.com/forums/showthread.php?t=32066)

wallcraft
12-31-2009, 03:57 PM
I see that the primary soPDF thread is also under LRF, but soPDF is a PDF to PDF tool. Both threads should be in (and sticky in) the PDF forum. If it was announced today, the primary thread would probably be: "soPDF - better than yet another PDF Cropper".

Nathan Campos
12-31-2009, 04:52 PM
Yeah, but soPDF is a tool to format PDFs to be converted better for LRF ;)

jbloudg20
01-07-2010, 03:27 PM
Any chance of a Linux or Mac port?

frabjous
01-07-2010, 04:14 PM
There's a linux port of sopdf in the sopdf thread. It would be nice to see a port of the GUI though.

This GUI looks very nice. Better the one I made, anyway. But mine does have one feature yours lacks, which is the ability to parse the filename to the metadata--or is that there but hidden in the screenshot?

It would be nice to include the source code too!

SoPDF really has nothing to do with LRF -- I think this, and even the original sopdf thread should be moved.

Nathan Campos
01-08-2010, 04:58 PM
Any chance of a Linux or Mac port?
I'm already developing it ;)

This GUI looks very nice. Better the one I made, anyway. But mine does have one feature yours lacks, which is the ability to parse the filename to the metadata--or is that there but hidden in the screenshot?
Hmm, I forgot about this, I'm going to add(5 minutes) and post here ;)

It would be nice to include the source code too!
I'm going to add this too, because I'm a Linux lover and user! :)

Nathan Campos
01-08-2010, 06:09 PM
I've just added the sources on the first thread to help all, please someone that is on a Linux machine. Get the sources and compile for me to build the binary and send it to me please(remember to follow that structure: "Standalone" and Bundle). ;)

PS: It was entirely built using Lazarus, and as Lazarus can't do a cross-compile from Windows to Linux, I need a Linux environment to compile it, but my Linux PC is on my home and I'm traveling. :(

frabjous
01-09-2010, 03:30 PM
[sorry duplicate post]

frabjous
01-09-2010, 03:31 PM
I'd be happy to, but you'll need to give me some more instructions... It wasn't obvious what I needed to do.

Wouldn't the linux version use the linux version of sopdf... why is the DOS executables in that package? And the packaged bundles for windows themselves?

Nathan Campos
01-09-2010, 05:42 PM
Hello frabjous,
Instructions to compile: Get the sources, on Linux, edit the line that is AProcess.Execute on the ConvertClick event, then you just need to click on the Build button of Lazarus. ;)

Intructions regarding the packages: When you have got the compiled executable, build the packages:

soPDF_Linux_Bundle.rar <> soPDF GUI and the soPDF app(both for Linux)
soPDF_Linux_Frontend.rar <> Only soPDF Linux GUI executable
soPDF_GUI_src.rar <> Sources of the Linux frontend

It's this good or have more questions?

Best Regards,
Nathan Paulino Campos

frabjous
01-10-2010, 12:25 AM
OK, I'm pretty sure I did everything OK.

I have to confess, Lazarus looks pretty intimidating to someone whose programming skills are as minimal and amateurish as mine. I haven't done more than the occasional bash script or easy javascript (and some easy stuff with AutoHotKey when I still used Windows, such as my GUI for soPDF). Otherwise, I stick to LaTeX and HTML markup. The last time I did anything with PASCAL was... Turbo Pascal 5.5 for DOS, perhaps? But all I needed to do is change SoPDF.exe to sopdf in the code, right?

Well, I couldn't have been all wrong, since it works. I will note, however, that if you don't use the default system fonts (which I don't), the GUI doesn't look perfect (the bottoms of the words get cut off--as you'll see the in the screenshot), though it's good enough. Switching back to the default fonts, and there's no problem at all.

Obviously, sopdf needs to be in the searched path for executables.

Let me know if I included anything you didn't want in the rar files, or failed to include anything I should have. Thanks again to Nathan for the GUI.

P.S. Where'd you get the list of categories? My degree is in philosophy, so I missed the philosophy category...

P.P.S. Added later. The binary included with these was compiled with and for 64-bit linux systems. It may not work for 32 bit systems. (Sorry)

Nathan Campos
01-10-2010, 07:33 AM
Hmm, Lazarus isn't intimidating because you haven't used Eclipse(for Java development), but my project isn't written in Pascal, was written in Object-Pascal that is much different.

P.S. Where'd you get the list of categories? My degree is in philosophy, so I missed the philosophy category...
I don't remember more :(

Let me know if I included anything you didn't want in the rar files, or failed to include anything I should have. Thanks again to Nathan for the GUI.
No it's all ok with your rars ;)
You're welcome!

Obviously, sopdf needs to be in the searched path for executables.
Yeah, but it's all ok ;)

But all I needed to do is change SoPDF.exe to sopdf in the code, right?
Correct! :)
Thanks very much!

frabjous
01-11-2010, 08:58 AM
Oops, I should have noted that i compiled the above on a 64 bit linux system, and I'm not sure the binary will work on a 32 bit system.

If someone out there has a 32 bit linux system and would like to recompile, that would be great.

Nathan Campos
01-14-2010, 06:40 PM
It will not run on 32-Bits Linuxes :(
If you recompile it will be much more better that we are going to have the 64-Bits and the 32-Bits version :)

greenapple
01-14-2010, 11:52 PM
I'm having a bit of a problem using the Frontend for Windows. After clicking on Convert, the program would just hang and doesn't respond.

My OS is VIsta. I've tried to run the program normally, also as admin, but the program didn't seem to work in both cases.

frabjous
01-15-2010, 02:51 AM
It will not run on 32-Bits Linuxes :(
If you recompile it will be much more better that we are going to have the 64-Bits and the 32-Bits version :)

I don't have easy access to 32 bit linux -- unless there's a way to compile it for 32 bit linux using 64 bit Lazarus. (You'd have to tell me how, if so.) I was hoping someone else would do it.

I'm having a bit of a problem using the Frontend for Windows. After clicking on Convert, the program would just hang and doesn't respond.

My OS is VIsta. I've tried to run the program normally, also as admin, but the program didn't seem to work in both cases.

Do you have the actual soPDF program installed alongside the Frontend? If so, have you tested it from a command shell?

greenapple
01-15-2010, 06:48 AM
I downloaded "soPDF_Bundle.rar" from the first post, and extracted the contents to the same folder. I'm not familiar command shell usage.

Nathan Campos
01-15-2010, 08:43 AM
Hmm, have you already tried to convert using another PDF file?

Just do a test with a small PDF file with about not more than 10 pages. ;)

greenapple
01-15-2010, 11:59 PM
I've tried a few. But the same thing happened. Or didn't happen. :) The program took a nap and no output was created. The program then had to be closed with task manager.

rasbadar
01-16-2010, 09:12 AM
I've tried a few. But the same thing happened. Or didn't happen. :) The program took a nap and no output was created. The program then had to be closed with task manager.

Same problem here:

- OS: Intel / Vista Ultimate 32 / German
- SoPDF and GUI installed in the same directory

- Gui started via Explorer
- Any PDF-File chosen
- All fields in GUI filled out, category chosen
- Press "Convert"
=> Program hangs, process explorer shows also instance of "sopdf.exe" is running.

Even after some minutes, nothing happens. If sopdfGUI is killed, the child process (sopdf.exe) stays (also multiple instances) and have to be cleaned up manually.

Sopdf.exe runs perfectly from commandline.

Any Ideas? User rights problem?

Regards
Ras

frabjous
01-16-2010, 01:10 PM
Have either of you tried the GUI I made?
You can find it here. (http://www.mobileread.com/forums/showpost.php?p=375895&postcount=63)
It would be nice to get Nathan's working, but this might help narrow down the problems.

greenapple
01-17-2010, 08:58 PM
Hi frabjous, your GUI software has worked like the proverbial charm on my Vista.
Thanks very much!

ziegl027
01-20-2010, 06:09 PM
So, to get this thing to run, *exactly* what do I need to do? Just click on the three attachments and let them do their thing? Once I get the interface in the screen shot I think I can handle it, but how do I get it? Speak slowly and use small words :o
:thanks:

I'm looking forward to finding a solution. In landscape my PDF's as-is are readable, but awfully small. All they need to be comfortably readable is to eliminate the white space!

frabjous
01-20-2010, 07:37 PM
If you're using Nathan's GUI you really only need one of the attachments. Assuming you're on Windows, get:

soPDF_Bundle.rar

That's a .rar file, which is like a.zip file: it's an archive that bundles together other files. I think there are just two in there. You need to extract those files. If you have a program that will unpack them, you can probably just double click, or maybe right click on the file and choose "Extract" or something like that. It depends what you have installed. If that isn't doing anything, you'll need some un-raring software like peazip (http://peazip.sourceforge.net/), and then you can extract the files using that.

Once extracted, I think you'll have two .exe files: soPdf.exe and soPDF_frontend.exe. Clicking on the latter should get you to the screen from which you can "take it yourself"... (though you might consider creating a shortcut to it in a menu or desktop).

ziegl027
01-21-2010, 10:32 PM
So, I've successfully cropped a few files. But, I can't figure out how to leave them in portrait. I want to have the device rotate them to landscape (like it does with the original file), so that when I annotate and so forth the menus come up oriented the right way. Right now they read an awful lot better but the menus and annotation keyboard is sideways ;). I've tried selecting just the "white space cropping" by itself and tried clicking the "reverse landscape" along with it. Near as I can tell, it comes up as the same orientation.
:help::thanks:

frabjous
01-22-2010, 12:14 AM
Try "FitWidth" or "FitHeight" rather than one of the 2x options.

ziegl027
01-23-2010, 12:49 PM
Try "FitWidth" or "FitHeight" rather than one of the 2x options.

:thanks:

I haven't had a chance to fiddle around much--I've been tidying up things at work and at home preparing for a weeklong trip with a 5 year old and a not-quite-three year old. Hopefully when we get to Phoenix I can pawn the kids off on the in-laws and have a chance to do some comparisons of what works best.

Qxr
01-26-2010, 06:08 AM
Nathan,

I have the same problem as described above on my XP Professional SP2:

After clicking "Convert", the button remains pressed down, and the application does not respond anymore. The converted file is generated, though.

In my case, selecting "Reverse Landscape" does not influence the result: no reversing happens (unlike in frabjous' application).

Thought you might find it helpful. Thanks for your efforts!

Sebl
01-26-2010, 08:42 AM
Hello, and thanks for simplifying the use of Sopdf. I tried to download it, but failled to use it. Maybe this is because of what I want to use it for : I would like to reformat Google (image scanned) book-length PDFs. Could someone tell me if it is feasable on old rare degraded spotty Google PDFs? I have aready tried other tools from this forum but did not get satisfying results.

frabjous
01-26-2010, 04:22 PM
Sebl,

I don't see any reason in particular why sopdf shouldn't have worked with your Google scanned books, though I personally find I get better results with pdflrf (http://www.mobileread.com/forums/showthread.php?t=13135) for scans.

rasbadar
01-26-2010, 06:35 PM
Have either of you tried the GUI I made?
You can find it here. (http://www.mobileread.com/forums/showpost.php?p=375895&postcount=63)
It would be nice to get Nathan's working, but this might help narrow down the problems.

Works like a charm!

Thanks a lot,

Ras

Sebl
01-27-2010, 04:13 AM
Thanks Frabjous.

I'll give PDFLRF a try.

ziegl027
02-03-2010, 10:45 AM
The "fit height" does what I want it to do, Hooray :D

It still bugs me to no friggin' end that I can't do this simple task with Acrobat, only a mock-crop. It's not like it's (Acrobat) a cheap program (even if I'm not the one paying for it).

frabjous
04-29-2010, 11:54 PM
I finally got around to compiling Nathan's GUI for 32 bit linux systems. It's attached. Just extract and drop both files into your searched path for executable files. (E.g., ~/bin) Run soPDF_Frontend for the GUI, or just sopdf for the commandline tool.

I'm just including the binaries, since the source code is identical to that for the 64 bit linux version, posted above.

Let me know if this works for you.

luma
06-03-2010, 08:49 AM
Great job! Have you considered uploading the soPDF + soPDF GUI Linux source to SourceForge? Then others can build packages. Such a useful tool should be in Ubuntu repos IMO.

$ sudo aptitude search sopdf
sopdf - A tool for resizing PDFs to half size for use with e-book readers.

Nathan Campos
11-04-2011, 08:45 PM
I'm working on the Mac OS X version right now. Since I got myself a Macbook Pro 17" in January but I was busy since then working on iOS applications. Now I'll try to make more desktop programs :)