// Merge with other PDF files. pdfSettings.SetValue('MergeFile', mergeBeforeFileName + '|.|' + mergeAfterFileName);I use for the path
i := 1; rFilePath.SETRANGE(Path, PathParam); rFilePath.SETRANGE("Is a file", TRUE); IF rFilePath.FINDSET THEN BEGIN REPEAT FileNames[I] := PathParam + rFilePath.Name; i += 1; END; UNTIL rFilePath.NEXT = 0;
pdfSettings.SetValue('MergeFile', PDFFinalRoute + '|.|' + FileNames[i]);
Answers
As you're testing, you might also want to utilize the status file, just to make sure that everything goes fine.
Added this as you mention, but it seems like there is some error creating the file as i'm getting the "ELSE" error.
I've been checking for the "ini" file to be created on the path file but it does not create, if this add any insight.
In case anyone in the future has the same problem. You HAVE to print something to merge with.
I couldn't use it as a tool to merge N existing pdfs. So I solved it by creating a white sheet report to merge in between the ones I wanted to merge.
I hope someone finds that usefull!