Xenoage / Zong

Zong! Music Notation
GNU Affero General Public License v3.0
29 stars 12 forks source link

Problem in transfer large amount of musicxml files to PDF #6

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hi, sorry to bother again. I want to transfer a large amount of musicxml files to PDFs. So I changed the code in MinimalDemo.java to:
File file = new File("scores/"); String test[]; test = file.list(); for(int i = 0; i < test.length; i++) { File inFile = new File("scores/" + test[i]); ScoreDoc doc = DocumentIO.read(inFile, new MusicXmlScoreDocFileInput()); //convert to PDF File outFile = new File(test[i]+".pdf"); DocumentIO.write(doc, outFile, new PdfScoreDocFileOutput()); //finished. open the PDF file. //Desktop.getDesktop().open(outFile); }
however I found the programme can only handle less than 10 files a time. Is it possible to process large amount of files, say 100k ? Thanks a lot!

Xenoage commented 7 years ago

Hi, no problem, this is what this bug tracker is for :-) I tried to reproduce the problem and converted 1000 files without any problem. Can you explain the problem further? Do you get an error at the command line? Do you run out of memory? Can you maybe send me your files by mail, so I can test them, too?

ghost commented 7 years ago

Thanks a lot for your patience! I figured out the reason, as there are some invalid musicxml files in my datasets. I catch the IOException than it works perfectly.