|
-
Sep 18th, 2003, 04:08 PM
#1
Thread Starter
Lively Member
Creating PDF files from HTLM files
Is there a free tool somewhere that will take a HTML file and create PDF files? Thanks!
-
Sep 18th, 2003, 04:35 PM
#2
Sleep mode
-
Sep 18th, 2003, 04:38 PM
#3
Sleep mode
oh btw , this place only for code . You could've asked in General Software forum .
-
Sep 19th, 2003, 09:04 AM
#4
Thread Starter
Lively Member
Thanks, but actually I was looking for a tool that I could use in VB.Net code. Some kind of API or OCX? Any recommendations?
-
Sep 19th, 2003, 10:05 AM
#5
Sleep mode
Well , you could've mentioned that in your first question . Anyways , I've seen couple of threads dicussing this issue . Also , Acrobat site has some APIs with documentation . If you couldn't find them , let me know .
-
Sep 20th, 2003, 02:00 PM
#6
yay gay
there's at sourceforge an .net wrapper for pdf
look it there
\m/  \m/
-
Sep 20th, 2003, 04:10 PM
#7
Sleep mode
-
Sep 20th, 2003, 07:23 PM
#8
Lively Member
I just got done writting a program that takes a html and converts it to a PDF file then faxes or emails it to the recipeient, I can't post the code due to company regulations but heres what process I envoked...
Code:
I used adobe 5.0 PDF Writer...
use the navigate2 function to load the file into the browser..
use the readystate to see if it is loaded
set the adobe writer as the default printer if not already set.
set the reg settings for the adobe writer located here:
current user\Software\Adobe\Acrobat PDFWriter
the settings to add are these
bDocInfo = 0
bExecViewer = 0
PDFFileName = "c:\myfilelocation\myfile.pdf"
call the browsers ExecWB function to print the params are
OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER
then do a loop until a file is created.
this will print the browser without any user interaction, once the pdf writer has created your document the reg setting for the filename will dissaprear.
good luck
sorry that its not actually code, but it should help you get started. and this way you could write it in vb7, my code is in vb6
-
Jan 8th, 2007, 08:14 PM
#9
New Member
Re: Creating PDF files from HTLM files
Evad, this is brilliant, however does not work with later versions of Distiller. For those users out there on the pain-staking search for how to do it and came accross this thread only to find it describing Acrobat 5, here:
Assuming you have a handy-dandy function called:
"SetRegValue (KeyRoot, Path, sKey, NewValue)"
VB Code:
Dim sPath As String, sKey As String, sValue As String
sPath = "Software\Adobe\Acrobat Distiller\PrinterJobControl"
sKey = App.Path & "\" & App.EXEName & ".exe"
sValue = "C:\temp\test.pdf"
createAcroKey = SetRegValue(HKEY_CURRENT_USER, sPath, sKey, sValue)
Basically the registry folder specified includes a list of key names that specify location of EXEs that, when run from distiller, will use the specified key value (a filePath which can include a specific PDF file) as the default path -- once printed, the key is removed.
If the path can't be found, it will try to get as close as it can but will eventually give up and go to the desktop I think. Don't bother looking at the registry values in the directory, they're very misleading and if used in the format as the keys in there, you can specify the directory, but not filename...
Good luck to any and all
-Tyler
oh, one more thing... the registry values in:
HKEY_CURRENT_USER\Software\Adobe\Acrobat\PDFMaker\7.0\Global\Settings
- ViewPDFFile
- PromptForPDFFilename
- ConvertDocInfo
...don't seem to do anything, strangely enough. I haven't figured that out yet
-
Jan 9th, 2007, 10:45 AM
#10
Lively Member
Re: Creating PDF files from HTLM files
Yeah this was the quickest way that I could get a process up and running. And were still using this process at work. I do need to (when i find the time) move this process into .net.
Thanks for the feed back
If your post is resolved, mark it as such using the thread tools, Keep the forums tidy.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|