This is an old revision of the document!
During a period of one year I have experimented a lot with scanning sheetmusic and converting that fast into high quality pdf files. The experiments resulted in following useful software:
This program is useful for autonomously and accurately converting any pdf or tiff file to a compact pdf file containing only black and white bitmaps and fitting exactly to a4. It extensively analyzes all pdf pages within the source file before any processing is done to compensate for possible rasterization rounding errors. This will guarantee that an a4 sized page in a pdf file with a bitmap raster of 2480×3508 pixels will remain the same size. If one or more page(s) are larger, it will be reduced to a4, in such a manner that the largest page determines the scale factor for all pages. Smaller bitmaps are centered on a page, with whitespace around it. So called portrait and landscape sizes are also automatically recognized. The output resolution is per default 300dpi but can be set to any other value. See the code for instructions.
Another useful purpose of this software is to combine layers within a pdf to a single layer, which happen when annotating has been done into the pdf. An extra layer makes the file larger in size, which can be merged into one layer with this software.
This program is useful for accurately converting a pdf file to a series of tiff files (one file for each page), at a resolution which is specified in the filename and compensate for possible rasterization rounding errors. The format of the generated tiff files are specially encoded to be used with the program scantailor
. (So a fix dpi can be omitted).
My experience to scan sheetmusic at a fast rate and convert that into a4 sized pdf files (ready to print) is:
Acquire a fast and good scanner (I had an Epson GT-10000, later on succeeded with an Epson GT-30000 which was even much faster. The GT-30000 is faster than I can turn pages, so I don't have to wait for that device.)
to scan automatically each 6 seconds a single a3 tiff page at 300 dpi 8-bit grayscale. Alternatively, if I receive from someone an unprocessed pdf file, I use pdf2tif_300dpi
to convert it to single tiff pages with proper resolution and grayscaled.
to rotate, straighten, remove borders, filter and convert to black and white bitmaps. I tested extensively other software like unpaper
but I found that scantailor performs way faster and much more accurate then unpaper. Alternatively I have also experimented a lot with using the image processing features of Neuratron Photoscore
controlled externally by a script
, but found that scantailor is still much faster and gives better handling to fine-tune the output.
to autonomously resize and/or convert the previously generated tiff files to an a4 sized pdf file with exactly 2480×3508 (or 3508×2480) pixels with g4 encoding1)
. Select the tiff files, drag and drop them onto the exe file. The encoding results in pdf pages with an average of 60 kB per page.
The FlattenANDCompactPDF_A4Size program accepts apart from tiff files also pdf files. This can be very useful if you have to convert one or more pdf file(s) with pages which are too small or too large for a pdf file with a4 sized pages.
To correct wrong placing of odd and even pages, you can enable the -q option (by renaming the FlattenANDCompactPDF_A4Size.exe to FlattenANDCompactPDF_A4Size -q.exe). What it will do is add at the end of the document as many pages as necessary to create a document with a multiple of 4 pages. This can specifically be practical if your target format is a booklet. As a last step, empty pages need to be moved manually to the right location.
Annotations: Use PDF Annotator
with a pen tablet2)
to write instructions (like bowings) directly into the pdf file. Afterwards use FlattenANDCompactPDF_A4Size
a second time to merge these annotations with the music into one bitmap and produce again a compact pdf file.
Please see here for a webcast, using the workflow from above.