LATEST - If you had difficulty registering recently please try again now we have found and fixed the problem.

joinpdf: merge images with different extensions in one pdf

General discussion about software packages and releases, new software you've found, and threads by programmers and script writers.
Post Reply
User avatar
Posts: 110
Joined: 22 Jul 2010, 18:19
Number of books owned: 1000
Country: on the net
Location: on the net

joinpdf: merge images with different extensions in one pdf

Post by dingodog »

I discovered some time ago this interesting page: ... -size.html

regarding book scanning workflows

this page contained a snippet of C code based on leptonica library that makes able to build a binary utility able to merge together into ine pdf, files with different extension at once

Code: Select all

#include <leptonica/allheaders.h>
#include <stdio.h>

int main(int argc, char *argv[]){
    if (argc < 3) {
        printf("Not enough arguments specified!\njoinpdf <input_folder> <output_pdf>\n");
    if (argc > 3) printf ("Too many arguments!\nOnly the first two will be taken into account.\n");

    int r = convertFilesToPdf(argv[1], NULL, 0, 1, 0, 0, NULL, argv[2]);
    if (r == 0) printf ("%s successfully written!\n", argv[2]);
    else printf("Conversion failed");

for people unable to compile I compiled a binary (made portable with magicermine that I own a pro license) that hopefully is working into any linux environment that i attach to my post on forum

6a30df415fbc87ecc7fc2d56d9704ad0 joinpdf-portable.bz2
0ccbe40235120843318e72538344d19848eff637 joinpdf-portable.bz2

I compiled leptonica library with

jpeg, png, gif, tiff, jpeg-2000 support (via openjpeg2)

so my binary is able to put all these file extension in a pdf


Code: Select all

joinpdf <input_folder> <output_pdf>
(1.9 MiB) Downloaded 382 times
Post Reply