... |
... |
@@ -41,7 +41,7 @@ else
|
41 |
41 |
close(writefile)
|
42 |
42 |
endif
|
43 |
43 |
|
44 |
|
-Version$="0.5"
|
|
44 |
+Version$="0.6"
|
45 |
45 |
BuildDate$="2020-09-04"
|
46 |
46 |
Developer$="Christian Albrecht (Lelldorin)"
|
47 |
47 |
|
... |
... |
@@ -394,23 +394,19 @@ while(inloop)
|
394 |
394 |
option set "SL:LastPage", "enabled", false
|
395 |
395 |
OutputFilename$=TEXTCONTROL GET$ "TC:FilenameSplit"
|
396 |
396 |
ClearTemp()
|
397 |
|
- print "pagcount: "+pagecount$
|
398 |
|
- print "firstpage: "+str$(FirstPage)
|
399 |
|
- print "lastapge: "+str$(LastPage)
|
400 |
|
- pagecount=LastPage-FirstPage
|
401 |
|
- print "pagcount: "+str$(pagecount)
|
402 |
|
- if(pagecount<10)then
|
|
397 |
+
|
|
398 |
+ if(val(pagecount$)<10)then
|
403 |
399 |
output$=system$("gs -dNOPAUSE -dBATCH -sOutputFile=\"/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%d.pdf\" -sDEVICE=pdfwrite -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" "+SelectedPath$+SelectedItem$ )
|
404 |
|
- print output$
|
405 |
|
- elseif(pagecount>=10 and pagecount<100)then
|
|
400 |
+ //print output$
|
|
401 |
+ elseif(val(pagecount$)>=10 and val(pagecount$)<100)then
|
406 |
402 |
output$=system$("gs -dNOPAUSE -dBATCH -sOutputFile=\"/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%02d.pdf\" -sDEVICE=pdfwrite -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" "+SelectedPath$+SelectedItem$)
|
407 |
|
- print output$
|
408 |
|
- elseif(pagecount>=100 and pagecount<1000)then
|
|
403 |
+ //print output$
|
|
404 |
+ elseif(val(pagecount$)>=100 and val(pagecount$)<1000)then
|
409 |
405 |
output$=system$("gs -dNOPAUSE -dBATCH -sOutputFile=\"/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%03d.pdf\" -sDEVICE=pdfwrite -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" "+SelectedPath$+SelectedItem$)
|
410 |
|
- print output$
|
411 |
|
- elseif(pagecount>=1000 and pagecount<10000)then
|
|
406 |
+ //print output$
|
|
407 |
+ elseif(val(pagecount$)>=1000 and val(pagecount$)<10000)then
|
412 |
408 |
output$=system$("gs -dNOPAUSE -dBATCH -sOutputFile=\"/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%04d.pdf\" -sDEVICE=pdfwrite -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" "+SelectedPath$+SelectedItem$)
|
413 |
|
- print output$
|
|
409 |
+ //print output$
|
414 |
410 |
endif
|
415 |
411 |
|
416 |
412 |
|
... |
... |
@@ -435,33 +431,33 @@ while(inloop)
|
435 |
431 |
print "in alpha"
|
436 |
432 |
if(val(pagecount$)<10)then
|
437 |
433 |
output$=system$("gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" -sOutputFile=/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%d.png "+SelectedPath$+SelectedItem$)
|
438 |
|
- elseif(val(pagecount$)<100)then
|
|
434 |
+ elseif(val(pagecount$)>=10 and val(pagecount$)<100)then
|
439 |
435 |
output$=system$("gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" -sOutputFile=/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%02d.png "+SelectedPath$+SelectedItem$)
|
440 |
|
- elseif(val(pagecount$)<1000)then
|
|
436 |
+ elseif(val(pagecount$)>=100 and val(pagecount$)<1000)then
|
441 |
437 |
output$=system$("gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" -sOutputFile=/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%03d.png "+SelectedPath$+SelectedItem$)
|
442 |
|
- elseif(val(pagecount$)<10000)then
|
|
438 |
+ elseif(val(pagecount$)>=1000 and val(pagecount$)<10000)then
|
443 |
439 |
output$=system$("gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" -sOutputFile=/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%04d.png "+SelectedPath$+SelectedItem$)
|
444 |
440 |
endif
|
445 |
441 |
elseif(OutputImageFormat$="png gray")then
|
446 |
442 |
print "in gray"
|
447 |
443 |
if(val(pagecount$)<10)then
|
448 |
444 |
output$=system$("gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pnggray -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" -sOutputFile=/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%d.png "+SelectedPath$+SelectedItem$)
|
449 |
|
- elseif(val(pagecount$)<100)then
|
|
445 |
+ elseif(val(pagecount$)>=10 and val(pagecount$)<100)then
|
450 |
446 |
output$=system$("gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pnggray -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" -sOutputFile=/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%02d.png "+SelectedPath$+SelectedItem$)
|
451 |
|
- elseif(val(pagecount$)<1000)then
|
|
447 |
+ elseif(val(pagecount$)>=100 and val(pagecount$)<1000)then
|
452 |
448 |
output$=system$("gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pnggray -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" -sOutputFile=/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%03d.png "+SelectedPath$+SelectedItem$)
|
453 |
|
- elseif(val(pagecount$)<10000)then
|
|
449 |
+ elseif(val(pagecount$)>=1000 and val(pagecount$)<10000)then
|
454 |
450 |
output$=system$("gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pnggray -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" -sOutputFile=/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%04d.png "+SelectedPath$+SelectedItem$)
|
455 |
451 |
endif
|
456 |
452 |
elseif(OutputImageFormat$="jpeg")then
|
457 |
453 |
print "in gray"
|
458 |
454 |
if(val(pagecount$)<10)then
|
459 |
455 |
output$=system$("gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=jpeg -r144 -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" -sOutputFile=/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%d.jpg "+SelectedPath$+SelectedItem$)
|
460 |
|
- elseif(val(pagecount$)<100)then
|
|
456 |
+ elseif(val(pagecount$)>=10 and val(pagecount$)<100)then
|
461 |
457 |
output$=system$("gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=jpeg -r144 -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" -sOutputFile=/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%02d.jpg "+SelectedPath$+SelectedItem$)
|
462 |
|
- elseif(val(pagecount$)<1000)then
|
|
458 |
+ elseif(val(pagecount$)>=100 and val(pagecount$)<1000)then
|
463 |
459 |
output$=system$("gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=jpeg -r144 -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" -sOutputFile=/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%03d.jpg "+SelectedPath$+SelectedItem$)
|
464 |
|
- elseif(val(pagecount$)<10000)then
|
|
460 |
+ elseif(val(pagecount$)>=1000 and val(pagecount$)<10000)then
|
465 |
461 |
output$=system$("gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=jpeg -r144 -dFirstPage="+str$(FirstPage)+" -dLastPage="+str$(LastPage)+" -sOutputFile=/boot/home/.besly/ghostscriptGUI/temp/"+OutputFilename$+"%04d.jpg "+SelectedPath$+SelectedItem$)
|
466 |
462 |
endif
|
467 |
463 |
endif
|