Forum How do I...?

run prince multiple times

alyda
hi, i am attempting to run prince up to 3 times within the same php file, it seems to be working fine, unless i check to see whether the prince command has executed properly, i am using the following code to see if it worked


            if ($prince->convert_files_to_pdf($xmlPaths, $pdfPath) === TRUE) { 
					echo "PDF created! click <a href=".$pdfPath.">here</a> to download MedicalRecords.pdf<br/>"; 
				} else { 
					echo "i could not make MedicalRecords.pdf for you at this time.<br/>";
				}



and this in fact does, work, unless i run a very taxing script which combines about 20 xml files; in which case it does not run the second or third prince command. if i comment out the lines above (for only the first call to prince), then it will make all 3 pdfs, but the if then statement returns false for the second two calls. i need a way to check to see if the pdfs have been made, and return true even in the case of combining around 20 xml files.
mikeday
That's strange, the presence of an if test should not affect anything. Can you check the Prince log and see if any error messages are being emitted?