html button convert pdf

drifters086

Member
Joined
Mar 16, 2007
Messages
10
Programming Experience
Beginner
hi guys,how do i make my current html button to asp button.

my intention is to create a button and once clicked on it,it will convert the 'report' in html to pdf file.

my main problem is i added reference of adobe distiller,but i dun noe what is the other codes needed.currently im using this trial converter which is not suppose to be in my project.

need ur help urgently.:( thanks in advance.

my codes:

HTML:
<scripttype="text/javascript"language="JavaScript1.2">
function launchPrint(printURL,strOutPDFFile) 
{
if (window.pdfProcessor == null) 
{ 
try
{ 
window.pdfProcessor = new ActiveXObject("PdfOut.PdfCreator"); 
} 
catch(e) 
{ 
}
} 
if (window.pdfProcessor != null) 
{ 
try
{ 
var hh3 = window.pdfProcessor;
var version = hh3.getVersion;
 
hh3.html2PDF = printURL;
hh3.fileName = strOutPDFFile;
hh3.ViewPDF();
 
window.pdfProcessor = null; 
} 
catch (e)
{ 
}
} 
} 
</script>
 
 
<palign="center"><b><fontface="Verdana">Welcome
<br>
<br>
<br>
</font><fontface="Verdana">
<palign="left">
<inputtype="Button"value="Generate Report"onclick='launchPrint("http://localhost:3236/WebSite14/report.htm",
"C:/report_test2.pdf");'/></font> </p>
<p>
 </p>
<p>
<fontface="Verdana"></font> </p>
</form>
</body>
</html>
 
Last edited by a moderator:
thanks for the reply..i was told by my supervisor that i dont need to install any 3rd party pdf converters.just use the 'Add Reference'..actually my above code is the procedure i want,but it uses a third party converter and the 'Generate Report' button is in html not asp. :confused:
 
correct..right now my code used a 3rd party component call 'VeryPDF DocConverter COM'..but i wanna use the adobe itself to create pdf..izzit smth to do with 'Add Reference' with some coding will do?my supervisor says the coding should be around 5-6 lines.
 
Last edited:
Answer these questions:

1) Do you want to create the PDF client or server side?
2) What component are you going to use? - in post #4 you say "i was told by my supervisor that i dont need to install any 3rd party pdf converters" then you say in post #7 "i wanna use the adobe itself to create pdf". This is confusing for two reasons: adobe is a company, it would be difficult to create a pdf using a company :)) seriously though, what component from adobe?) and second because any component from adobe would be third party.
 
bro,sorry for da confusing part.
1)create on a server side.
2)sorry,i got confused with it.anyway,i got adobe reader & adobe distiller.can adobe distiller help in any way?
 
Back
Top