7

With Xubuntu 15.10, Simple Scan 3.18.1, the default file type is, even for images, PDF. I would like to set it to PNG, is that possible?

There is a related, older question for changing from JPG to PDF with the solution, to switch the scanning from image (JPG) to text (PDF) Simple Scan - Changing the default output File Type to PDF and improving Compression? but I already have used image and JPG wouldn't be a solution either.

I don't find a config file in ~/.config which looks responsible for simple scan and the settings menu is very reduced.

5
+100

Simple Scan stores its settings in dconf database rather then in your profile. Its keys can be listed by the command:

gsettings list-keys $(gsettings list-schemas | grep -i 'simple' | grep -i 'scan')

As you can see, there's no mentioning about the preferable file format.

At the page of its developers I also found confirmation that there's no way of saving your preferred file format permanently: https://answers.launchpad.net/simple-scan/+question/273400
This info is pretty fresh. Maybe someday they'll add this functionality, but now default file type is PDF. Older versions of application were more adaptive - they used PDF as default file type for 'Text' and JPG as default file type for 'Image'. This behavior is hardcoded. Modifying the source and recompiling seems the single way to overcome that.

  • My version is 3.18.1 and it suggests always 'PDF', for text and images. – user unknown Mar 4 '16 at 4:00
  • I've got an older version of Simple Scan, it behaves right as I mentioned - it selects output document type depending on selector Text/Image. In the newer versions it defaults to PDF in both cases. I will update my answer appropriately. – whtyger Mar 4 '16 at 7:39
2

As @whtyger says, there is no way to do this but modifying the source code.


However you can use this workaround:

  1. Run this command to install imagemagick:

    sudo apt-get install imagemagick
    
  2. Run this script:

    #!/bin/bash
    
    read -p 'Please drag and drop the folder which has the PDFs here: ' FOLDER_PATH
    
    cd "$FOLDER_PATH"
    
    for pdf in *.pdf; do
        convert "$pdf" "${pdf%.pdf}.png"
    done
    
    echo "Check the folder. You should have now all the files converted into png"
    
    read -p "Do you want to delete the pdf files [no]? " delete_files
    
    if [[ "$delete_files" =~ ^[yY]+[eE]?[sS]?$ ]]; then
      rm *.pdf
    fi
    
  • Nice work. But... Changing the file type is just a few clicks, so starting a script is more effort. Secondly: Converting the pdf to an image reduces the resolution. A quick test: Save as PDF: 245k, as JPG: 244k, as PNG 2.3M. Converting the PDF to JPG: 42k, PNG: 166k. Resolution PDF: 404x355, converted: the same, saved by SimpleScan: 1684x1479. – user unknown Mar 4 '16 at 4:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.