Author Topic: PDF Creator  (Read 25520 times)

0 Members and 1 Guest are viewing this topic.

Torschmied

  • Newbie
  • *
  • Posts: 28
PDF Creator
« on: February 24, 2010, 01:40:33 PM »
Hello
is there a posibility to make a stapel converting

I have a lot off Tiff files and  want make it to PDF with the same name

regards

RTT

  • Administrator
  • *****
  • Posts: 918
Re: PDF Creator
« Reply #1 on: February 24, 2010, 05:09:19 PM »
I suppose "Stapel" is batch?

If yes, then no. The new PDF Creator tool can't batch process, or create individual PDF's for each of the opened images (but this one is a good idea to add into a next release ;) )

But using my other tool, PDF-ShellTools, command line interface, you can easily accomplish the task.

The merge command could do it, but there is a bug in the current version, preventing the possibility to submit other than PDF's when using the command line interface.

But, with a little trick, we can use the insert command

There is only the need to create a dummy PDF to use as append-to base of the tif images to convert.
So, in my next example, I'm assuming the existence of a, one page, c:\temp\blanka4.pdf file

Create a "c:\temp\image2pdf.cmd" batch file, and add the next commands to it

Code: [Select]
@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=%%a 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
)

Now you can invoke it this way:
C:\temp\image2pdf.cmd c:\MyTiffs\*.tif c:\tmp\image2pdf_output\

Just adapt the paths, and "double quote" if contain spaces, to the specificity of your system.
The silent mode, -s parameter, will work only with the registered version. There is just the need to manually confirm each conversion, if using the trial.

And let me know if you don't understand something, or this, fairly untested, example is not working for you.

Torschmied

  • Newbie
  • *
  • Posts: 28
Re: PDF Creator
« Reply #2 on: February 25, 2010, 09:12:18 AM »
Hello

Thanks for the idear with the PDF Shell but i have no licene for it and to confirm each is to much work becouse there are about 120000 Tiff Files
regards

RTT

  • Administrator
  • *****
  • Posts: 918
Re: PDF Creator
« Reply #3 on: February 25, 2010, 11:59:12 AM »
So, why not automate also the confirmation button click? Try google for "AutoHotKey".

Torschmied

  • Newbie
  • *
  • Posts: 28
Re: PDF Creator
« Reply #4 on: February 26, 2010, 07:53:08 PM »
Hello

OK I installed the pdf shell tool
I copy some tiff in the folder c:\mytiff
I make a blanka4.PDF and take it in the Folder c:\temp
I make a c:\temp\image2pdf.cmd and make your comandos in and change becouse its a german windows
"c:\Program Files\PDF-ShellTools\PDFShellTools.dll" to "c:\Programme\PDF-ShellTools\PDFShellTools.dll"

I open the windows shell and say  C:\temp\image2pdf.cmd c:\MyTiffs\*.tif c:\temp\image2pdf_output\


now I see only short a dos box where is the error ?
also I make the outputfolder :-\

RTT

  • Administrator
  • *****
  • Posts: 918
Re: PDF Creator
« Reply #5 on: February 26, 2010, 10:59:42 PM »
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

  • Newbie
  • *
  • Posts: 28
Re: PDF Creator
« Reply #6 on: February 27, 2010, 04:45:46 PM »
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

  • Administrator
  • *****
  • Posts: 918
Re: PDF Creator
« Reply #7 on: February 27, 2010, 07:43:14 PM »
Quote
a secend error was by the renaim in the code
ren %2blankA4.pdf %%~na.pdf
must be
ren %2\blankA4.pdf %%~na.pdf
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: [Select]
@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"
)

Torschmied

  • Newbie
  • *
  • Posts: 28
Re: PDF Creator
« Reply #8 on: February 28, 2010, 12:37:44 PM »
 :) perfrkt it works

now I must only install the autohotkey software

thank you

 

RTT

  • Administrator
  • *****
  • Posts: 918
Re: PDF Creator
« Reply #9 on: February 28, 2010, 12:50:52 PM »
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

Torschmied

  • Newbie
  • *
  • Posts: 28
Re: PDF Creator
« Reply #10 on: March 03, 2010, 02:09:53 PM »
Hello

Ok its work now with autohotkey
but now I have a new problem.

there a lot off big Tif files 19920x14157 and when I convert This I have a emty PDF.

what is the problem you have a Idear ?

RTT

  • Administrator
  • *****
  • Posts: 918
Re: PDF Creator
« Reply #11 on: March 03, 2010, 02:25:26 PM »
No idea! If possible, send me one of these tiff files, that fail to convert, so I can check for what's wrong.

RTT

  • Administrator
  • *****
  • Posts: 918
Re: PDF Creator
« Reply #12 on: March 03, 2010, 11:25:02 PM »
if by "empty" you mean blank page, and you are using Acrobat to see it, check if the PDF shows correctly on the Foxit PDF Reader or PDF Xchange Viewer. If yes, then what you are experiencing is the Acrobat 200x200 inches page size limit, when page uses the standard 72 DPI's. This is equivalent to a 14400x14400 pixels user space, so your image don't fit and Acrobat can't handle the bigger pages PDF-ShellTools is producing. Even so, it's a thing that can be address in the code, and I must implement, either changing the page DPI's (possible since PDF 1.6 specifications), or scaling down the image on a smaller PDF page.
As workaround you can resize these images to fit the 14400x14400 Acrobat max supported page size.

Torschmied

  • Newbie
  • *
  • Posts: 28
Re: PDF Creator
« Reply #13 on: March 04, 2010, 08:34:29 AM »
OK Thank you

with the PDFXchange is all OK and you are right

Torschmied

  • Newbie
  • *
  • Posts: 28
Re: PDF Creator
« Reply #14 on: June 16, 2010, 10:54:54 AM »
Hello

I have finnished this tiff to PDF converting for some weeks and use 7-pdf for it because we use mosttimes the Adobe reader in the Office.

 :)
Thanks for you help
regards Markus