Index: /main/trunk/greenstone2/bin/script/gsConvert.pl
===================================================================
--- /main/trunk/greenstone2/bin/script/gsConvert.pl	(revision 32208)
+++ /main/trunk/greenstone2/bin/script/gsConvert.pl	(revision 32209)
@@ -847,7 +847,9 @@
     # build up the path to the doc-to-html conversion tool we're going to use
     my $xpdf_pdftohtml = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "xpdf-tools");
-
-    if ($ENV{'GSDLOS'} =~ m/^darwin$/i) {
-	# TODO
+	
+	if($ENV{'GSDLOS'} =~ m/^windows$/i) { # For Windows, just use the 32 bit xpdf's pdftohtml as it works the same as the 64 bit
+		$xpdf_pdftohtml = &FileUtils::filenameConcatenate($xpdf_pdftohtml, "bin32");
+    } elsif ($ENV{'GSDLOS'} =~ m/^darwin$/i) {
+		# TODO
     } else { # unix or windows, use the appropriate bin folder for the bitness of the system
 		# In fact, when testing 3 different PDF docs, it doesn't seem to make a difference on
@@ -855,17 +857,15 @@
 		# However, maybe we'll use another xpdf-tool too in future where bitness will be relevant.
 	
-	# Don't use $ENV{'GSDLARCH'}, use the new $ENV{'BITNESS'}, since
-	# $ENV{'GSDLARCH'} is only (meant to be) set when many other 32-bit or 64-bit
-	# specific subdirectories exist in a greenstone installation.
-	# None of those locations need exist when xpdf-tools is installed with GS.
-	# So don't depend on GSDLARCH as forcing that to be exported has side-effects
-	if($ENV{'BITNESS'}) {
-	    $xpdf_pdftohtml = &FileUtils::filenameConcatenate($xpdf_pdftohtml, "bin".$ENV{'BITNESS'});
-	} else { # what if $ENV{'BITNESS'} undefined, fallback on bin32? or 64?
-	    $xpdf_pdftohtml = &FileUtils::filenameConcatenate($xpdf_pdftohtml, "bin32");
-	}
-    }
-
-	#print STDERR "@@@@ BITNESS: " . $ENV{'BITNESS'} . "\n";
+		# Don't use $ENV{'GSDLARCH'}, use the new $ENV{'BITNESS'}, since
+		# $ENV{'GSDLARCH'} is only (meant to be) set when many other 32-bit or 64-bit
+		# specific subdirectories exist in a greenstone installation.
+		# None of those locations need exist when xpdf-tools is installed with GS.
+		# So don't depend on GSDLARCH as forcing that to be exported has side-effects
+		if($ENV{'BITNESS'}) {
+			$xpdf_pdftohtml = &FileUtils::filenameConcatenate($xpdf_pdftohtml, "bin".$ENV{'BITNESS'});
+		} else { # what if $ENV{'BITNESS'} undefined, fallback on bin32? or 64?
+			$xpdf_pdftohtml = &FileUtils::filenameConcatenate($xpdf_pdftohtml, "bin32");
+		}
+    }
 	
     # We'll create the file by name $output_filestem during post-conversion processing.
Index: /main/trunk/greenstone2/setup.bat
===================================================================
--- /main/trunk/greenstone2/setup.bat	(revision 32208)
+++ /main/trunk/greenstone2/setup.bat	(revision 32209)
@@ -246,31 +246,22 @@
 :done
 
-:: Want to know bitness of machine for working out whether to use xpdftools' bin32 or
-::   bin64 directory to run Xpdf's pdftohtml.
-:: Googled: determine bit architecture windows command line
-::   techgenix.com/aquicktiptocheckoperatingsystemarchitecture/
-::   'Type "SET Processor" (without double quotes)
-::   You will see the output SIMILAR to below [among OTHER lines of output]:
-::   PROCESSOR_ARCHITECTURE=x86
-::   OR
-::   PROCESSOR_ARCHITECTURE=x64.'
-::   (In my case PROCESSOR_ARCHITECTURE=AMD64)
+:: COMMENTING OUT THE 2 LINES DETERMINING AND SETTING THE BITNESS (32/64) ON WIN MACHINES
+:: AS IT MAY BE USEFUL IN FUTURE AND IT TOOK ME SOME TIME TO GET THESE LINES WORKING RIGHT
+:: To know bitness (32 vs 64) of a Windows machine, the cmd is "SET Processor"
+::   and look through the lines of output for the line PROCESSOR_ARCHITECTURE=x86
+::   or PROCESSOR_ARCHITECTURE=x64. See techgenix.com/aquicktiptocheckoperatingsystemarchitecture/
 :: The following runs the cmd "set Processor". Then, among the multiline output, it finds the line
 ::   containing "PROCESSOR_ARCHITECTURE", splits this line on the delimiter "=" and stores the 2nd token in %%G
 ::   Based on the example "_ping_cmd" at https://ss64.com/nt/for_cmd.html
-for /f "tokens=2 delims==" %%G in ('set Processor ^|find "PROCESSOR_ARCHITECTURE"') do set BITNESS=%%G
-rem echo Processor architecture is %BITNESS%
-::   which will be something like "amd64" or "x64", or "x86" for 32 bit
+REM for /f "tokens=2 delims==" %%G in ('set Processor ^|find "PROCESSOR_ARCHITECTURE"') do set BITNESS=%%G
+::   BITNESS will now be "x86" for 32 bit or something like "amd64" or "x64" for 64 bit
 :: From https://ss64.com/nt/syntax-substring.html
 ::   "To do a string comparison, remove the SearchString and compare the result with the original
 ::   variable before removal. If both strings are the same, then SearchString was not found:"
-rem set example=amd64
-rem IF /i "%example:64=%" == "%example%" (echo Not 64 bit) ELSE (echo 64 bit)
-if /i "%BITNESS:64=%" == "%BITNESS%" (set BITNESS=32) else (set BITNESS=64)
-echo Bitness of machine: %BITNESS%
-
+REM if /i "%BITNESS:64=%" == "%BITNESS%" (set BITNESS=32) else (set BITNESS=64)
 
 popd
-endlocal & set PATH=%PATH%& set GSDLHOME=%GSDLHOME%& set GSDLOS=%GSDLOS%& set JRE_HOME=%JRE_HOME%& set JAVA_HOME=%JAVA_HOME%& set BITNESS=%BITNESS%
+endlocal & set PATH=%PATH%& set GSDLHOME=%GSDLHOME%& set GSDLOS=%GSDLOS%& set JRE_HOME=%JRE_HOME%& set JAVA_HOME=%JAVA_HOME%
+REM      & set BITNESS=%BITNESS%
 
 if not "%JAVA_HOME%" == "" echo JAVA_HOME: %JAVA_HOME%
