PDF Explorer > Ideas/Suggestions

PDF Creator

<< < (2/3) > >>

RTT:
It's working here, so it should work at your system too.
Try removing the @echo off line to see if any error is being fired. And to see the output, you should add a pause command at the end of the batch file, or better, open first the dos command line window, and execute your command from there.
You say you have your tiff's at c:\mytiff, but in your command line you typed MyTiffs, so check if the error is only in here, in your forum post.

Torschmied:
Hello

OK no wI found my Error

in the comandline I say *.tiff and not *.tif

a secend error was by the renaim in the code
ren %2blankA4.pdf %%~na.pdf
must be
ren %2\blankA4.pdf %%~na.pdf

ok mow it work with normal Tiff names like 0.001.955

but all my tiffs are scanned from a MIkrofilm and the name is like "0.001.955Aufh.syst.                         02                  DD"

I get a Syntax error also I see that in the shel tool is missing the filname fom the tif

thanks for the help

RTT:

--- Quote ---a secend error was by the renaim in the code
ren %2blankA4.pdf %%~na.pdf
must be
ren %2\blankA4.pdf %%~na.pdf
--- End quote ---
Yes, but only if you don't terminate the passed output folder with a backslash, e.g. c:\temp\image2pdf_output . Will work OK if c:\temp\image2pdf_output\

Regarding the syntax error because of the file names you have. As stated before, if path, or file name, has space characters, the entire command parameter must be double quoted, e.g. "FilesToInsertAppend=%%~fa". Also needed in the rename line, e.g. ren %2blankA4.pdf "%%~na.pdf"
In the above example I'm also adding the ~f substitution  (you can see what these substitutions mean typing, at the command prompt, call /?), to make sure passed file name expands to a full path. Not really needed, but if batch called at same folder where the tiff's are, and you only type *.tif, only the relative file name will be passed, and, because of a bug, PDF-ShellTools will not show the file name and path at the grid, but task will work even so, it's only a makeup bug.

So, here I leave the entire code, with these needed changes included.

--- Code: ---@echo off
::for each of the  image files, of the list passed in the first command line parameter, do
for %%a in (%1) do (
::convert and append image file to the dummy blank pdf and save new file to the output folder passed in the second batch command line parameter
Rundll32 "c:\Program Files\PDF-ShellTools\PDFShellTools.dll",Insert -s "FilesToInsertAppend=%%~fa" OutputPath=%2 c:\temp\blankA4.pdf
::rename created pdf, that is always created with the same name of the append-to file (in our case, blankA4.pdf), to the name of the processed image
ren %2blankA4.pdf "%%~na.pdf"
)
--- End code ---

Torschmied:
 :) perfrkt it works

now I must only install the autohotkey software

thank you

 

RTT:
And using the AutoHotKey more advanced scripting capabilities, you can use the PDF-ShellTools DLL interface to make the call even faster.
Check this forum topic, for a generic, not related, example:
http://www.rttsoftware.com/forum/index.php?topic=305.0

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version