I would like to join several files with the PDF-Tools and automatically insert bookmarks. However, the order specified by me should be strictly adhered to.
As I understand it, I am not allowed to select batch processing and it is mandatory to select several CPUs. Unfortunately, my setting doesn't work, only one file is used at a time.
What am I doing wrong?
Can someone tell me how to set the setting correctly?
Here my job:
Files with default sorting by name in windows explorer:
My sorted list:
"E:\Users\ama\Temp\PDFTools\Compress\Test_1.pdf E:\Users\ama\Temp\PDFTools\Compress\PDF_2.pdf E:\Users\ama\Temp\PDFTools\Compress\Test_WU.pdf E:\Users\ama\Temp\PDFTools\Compress\PDF_3.pdf E:\Users\ama\Temp\PDFTools\Compress\Test_QR.pdf"
The files should be merged exactly in this order (with Bookmarks).
I will do it in a VBNet-programm:
Code: Select all
Public Function JoinPDFBookmark(sourceFiles As List(Of String), sTargetFile As String) As Boolean
10: Dim p As New Process
20: Dim sSource As String = ""
'Dim sTargetPath As String = System.IO.Path.GetDirectoryName(sourceFiles(0))
'https://help.pdf-xchange.com/pdfxt9/index.html?command-line-options_t.html
200: For Each s As String In sourceFiles
210: sSource = sSource & Add_Qouted(s) & " "
220: Next
230: sSource.TrimEnd()
If File.Exists(sTargetFile) Then System.IO.File.Delete(sTargetFile)
240: Try
250: p.StartInfo.FileName = "C:\Program Files\Tracker Software\PDF Tools\PDFXTools.exe"
260: p.StartInfo.Arguments = "/RunTool {B404A7F2-BA30-46B9-865E493B71EC558D} " & sSource 'JoinPDFBookmark
270: p.Start()
280: p.WaitForExit()
290: p.Close()
300: Dim _Source() As String = System.IO.Directory.GetFiles(TmpPathTarget)
310: System.IO.File.Move(_Source(0), sTargetFile)
320: Return True
330: Catch
340: Return False
350: End Try
End Function
I hope anyone can help me.
Thanks.
Nimrod