Recherche dans le site/ Search this Blog:

Login



Linux KDE skanlite has trouble changing paper size. Cropping a PDF file from legal size to letter size with pdfcrop. Imprimer

As noted on this forum, it seems rather hard to change the paper format when scanning with KDE skanlite. Here is the work around I have come up with:

Note that I use a scanner with document feeder, allowing to scan multiple pages automatically.

1) Set skanlite to save in tiff format.

2) Join your multiple files, 1 per scanned page,  produced by skanlite in one big file with tiffcp:

~$ tiffcp Image-0001.tiff  Image-0002.tiff  Image-0003.tiff all.tiff

This will produce the file: all.tiff.

3) Convert into a PDF file:

~$ tiff2pdf all.tiff > all.pdf

This will produce the file: all.pdf

At this point, I have my scanned pages in a PDF but the pages are in legal format. The scanned pages were letter format but skanlite produced pages in legal format anyway.

4) Crop the PDF so it will contain letter format pages:

~$ pdfcrop --papersize letter --margins "0 0 0 -175" all.pdf

This will produce a PDF file with letter size pages, removing the blank space coming from letter size pages being copied into legal size pages by skanlite.

This works for me, play with the "-175" value if you need to adjust, raising or lowering the value as needed. The tiffcp, tiff2pdf and tiff2pdf command-line utilities are available in Slackware64 14 where this was tested. They should be easy to install on your system if you do not already have them installed.

 

 

 

Ajouter votre commentaire / Add your comment

Votre nom / Your name:
Sujet / Subject:
Commentaire:
SPAM: Ne pas inclure de lien ou utiliser le stratagème suivant: "yahoo.com slash mapage.html"     Nous utilisons un filtre qui bloque les commentaires suspects avec une erreur 403. De même, du code de programmation ou sql peut provoquer des erreurs 403. Veuillez utiliser un lien vers votre code tel que: "pastebin.com slash jVNqLieD"    Merci!
Comment:
SPAM: Do not include any links in your post or use the following construct: "yahoo.com slash mypage.html"    We are using a filter that denies suspicious posts with a 403 error. Programming language or SQL code may also cause a 403 error. Please provide a link to your code instead like: "pastebin.com slash jVNqLieD"    Thank you! :
  Lettres de vérification; lettres minuscules seulement, pas d
Retaper les lettres affichées / Word verification:
Mis à jour / Last updated ( samedi, 18 mai 2013 04:27 )
 



Consultez TOUS nos fils d'actualité ici. / View ALL our newsfeed here.