1


Should be possible to print pages with embedded scripts?
Tried to create the functions o_SCRIPT and c_SCRIPT that just returned true/false - but no go.

Regards

Sigurd

2

have you read the examples ??? (like js1, js2, js3) ...
Ancien pseudo : lolo

3

there is no javascript source in the html output
So the examples cannot be used.
but the pdf output is ok.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Restitution HTML</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" >
	</head>
	<body style="padding: 10px; font-size: 10pt;font-family:	Arial;">
<hr>PAGE : <hr><div>
	<h1>Test de JavaScript 3</h1><br>

	<br>
	Normalement une valeur devrait vous être demandée, puis affichée
</div><hr>

	</body>
</html>

4

Yes - but I don't think they applies to this.

example:

<html>
<head>
<script type="text/javascript" src="/some_path/some_script.js"></script>
</head>
<body>
actual content to transform
</body>
</html>


I probably got it wrong - seems like only the content of the BODY is subject to conversion.

5

the javascript and pdf's script are different : a javascript can not works on a pdf, because all the specifics objects like document, windows and others, does not exists
Ancien pseudo : lolo

6

BTW there's a support for javascript on PDF documents. There may be a way to convert simple javascript operations from HTML jS to PDF jS, but I think that there are major issues with that :
- not supported by FDPF (so Spipu would have to write several methods to extend the actual FPDF class - I think it's a very huge amount of work)
- will be very complicated to know how to convert the jS objects from HTML jS to PDF jS as users may have different desires (and what to do when scripts cannot be applicable, such as Ajax stuffs)
and that's only for the may difficulties...
avatar