Untitled
unknown
plain_text
2 years ago
611 B
9
Indexable
@echo off
rem Source directory containing HTML files
set "source_directory=D:\Docs\ScriptReference"
rem Destination directory for saving PDFs
set "destination_directory=D:\PDFdocs"
rem Loop through all HTML files in the source directory and convert them to PDF
for %%f in ("%source_directory%\*.html") do (
if exist "%%f" (
rem Extracting the file name without extension
set "filename=%%~nf"
rem Convert HTML to PDF and save it in the destination folder
wkhtmltopdf --disable-javascript "%%f" "%destination_directory%\!filename!.pdf"
)
)
echo Conversion completed.
Editor is loading...