mirror of
				https://github.com/johnwhitington/cpdf-source.git
				synced 2025-06-05 22:09:39 +02:00 
			
		
		
		
	Removed filename quoting for name of commmand (Windows does not like it)
This commit is contained in:
		
							
								
								
									
										6
									
								
								cpdf.ml
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								cpdf.ml
									
									
									
									
									
								
							| @@ -70,7 +70,7 @@ let find_cpdflin provided = | ||||
| of the cpdflin binary. Returns the exit code. *) | ||||
| let call_cpdflin cpdflin temp output best_password = | ||||
|   let command = | ||||
|     Filename.quote cpdflin ^ " --linearize " ^ " --password=" ^ best_password ^ " " ^ | ||||
|     cpdflin ^ " --linearize " ^ " --password=" ^ best_password ^ " " ^ | ||||
|     Filename.quote temp ^ " " ^ Filename.quote output  | ||||
|   in | ||||
|     match Sys.os_type with | ||||
| @@ -87,8 +87,8 @@ let call_cpdflin cpdflin temp output best_password = | ||||
|             Sys.command command | ||||
|         | _ -> | ||||
|             let command =  | ||||
|               "DYLD_FALLBACK_LIBRARY_PATH=" ^ Filename.quote (Filename.dirname cpdflin) ^ " " ^ | ||||
|               "LD_LIBRARY_PATH=" ^ Filename.quote (Filename.dirname cpdflin) ^ " " ^ | ||||
|               "DYLD_FALLBACK_LIBRARY_PATH=" ^ Filename.dirname cpdflin ^ " " ^ | ||||
|               "LD_LIBRARY_PATH=" ^ Filename.dirname cpdflin ^ " " ^ | ||||
|               command | ||||
|             in | ||||
|               if !debug then prerr_endline command; | ||||
|   | ||||
| @@ -2116,7 +2116,7 @@ let embed_missing_fonts fi fo = | ||||
|     exit 2 | ||||
|   end; | ||||
|     let gscall = | ||||
|       Filename.quote args.path_to_ghostscript ^ | ||||
|       args.path_to_ghostscript ^ | ||||
|       " -dNOPAUSE " ^ (if args.gs_quiet then "-dQUIET" else "") ^ " -sDEVICE=pdfwrite -sOUTPUTFILE=" ^ Filename.quote fo ^ | ||||
|       " -dBATCH " ^ Filename.quote fi | ||||
|     in | ||||
| @@ -2135,7 +2135,7 @@ let mend_pdf_file_with_ghostscript filename = | ||||
|   let tmpout = Filename.temp_file "cpdf" ".pdf" in | ||||
|     tempfiles := tmpout::!tempfiles; | ||||
|     let gscall = | ||||
|       Filename.quote args.path_to_ghostscript ^ | ||||
|       args.path_to_ghostscript ^ | ||||
|       " -dNOPAUSE " ^ (if args.gs_quiet then "-dQUIET" else "") ^ " -sDEVICE=pdfwrite -sOUTPUTFILE=" ^ Filename.quote tmpout ^ | ||||
|       " -dBATCH " ^ Filename.quote filename | ||||
|     in | ||||
| @@ -2734,7 +2734,6 @@ let write_image pdf resources name image = | ||||
|         close_out fh; | ||||
|       (* If pnmtopng is present, convert the pnm to a PNG. *) | ||||
|       begin match | ||||
|         (* FIXME: Use Filename.quote here *) | ||||
|         Sys.command ("pnmtopng -gamma 0.45 -quiet " ^ "\"" ^ name ^ ".pnm\"" ^ "> \"" ^ name ^ ".png\" 2>" ^ null_device) | ||||
|       with | ||||
|       | 0 -> Sys.remove (name ^ ".pnm") | ||||
| @@ -3044,7 +3043,6 @@ let startends_of_range x = | ||||
| (* Calculating margins *) | ||||
| let calculate_margins filename pdf (s, e) = | ||||
|   (* Call ghostscript *) | ||||
|   (* FIXME: Use Filename.quote here *) | ||||
|   let gscall = | ||||
|    args.path_to_ghostscript ^ | ||||
|    " -dSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox -r1200" | ||||
| @@ -4429,7 +4427,7 @@ let gs_malformed_force fi fo = | ||||
|     exit 2 | ||||
|   end; | ||||
|     let gscall = | ||||
|       Filename.quote args.path_to_ghostscript ^ | ||||
|       args.path_to_ghostscript ^ | ||||
|       " -dNOPAUSE " ^ (if args.gs_quiet then "-dQUIET" else "") ^ " -sDEVICE=pdfwrite -sOUTPUTFILE=" ^ Filename.quote fo ^ | ||||
|       " -dBATCH " ^ Filename.quote fi | ||||
|     in | ||||
|   | ||||
		Reference in New Issue
	
	Block a user