To convert HTML become PDF we can use HTMLDoc which is a powerful tools to convert HTML become PDF files. But, it will convert static HTML become PDF, the question is how about to convert dynamic HTML become PDF files ? Is it possible to do ? Ya, we can do it by a very simple technique. First, we have to convert dynamic HTML become static. We can do by execute script and give output as static HTML like:
system("/usr/bin/perl yourscript.pl > output.html");
it will give output.HTML that can be converted become PDF Files.
The other question is, how about if there is parameters in your script can we do like this ?
system("/usr/bin/perl yourscript.pl?id=1 > output.html");
Of course, wa can't.
We have to convert all parameters become argv, so we can execute them. So it will be like this.
system("/usr/bin/perl yourscript.pl 1 > output.html");
Then we can get output.HTML from script then converted it become PDF Files.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment