I am trying to append two PDF pages. I am grabbing the PDF’s from a network drive. I wanted to know if it is possible to append without using a container field to hold the PDF's.
It just seems a bit slow with 300 records to loop through...
EDIT: I completely spaced on your original question specifics, sorry, I'll leave this here but I don't think it directly answers your specific question
if your files are stored in external storage containers you can get the path to the container file with GetContainerAttribute ( MyTable::pdfField1 ; "externalFiles" ), and use those paths as inputs. Be careful not to write to this same location as the pdftk output. I recommend using Get(TemporaryPath) & "output.pdf"
Note, when constructing paths to use in an external system command, you want to convert them to OS-style paths like this ConvertFromFileMakerPath ( $fmpathformat ; WinPath ) (assuming windows in this case)
Finally, to get that combined pdf into fm, you can use Insert From URL (Insert File won't work on FMS), or the Data file script steps.
Go to Record/Request/Page [ First ]
Set Variable [ $pdf ; Value: MBS( "PDFKit.NewPDFDocument" ) ]
Loop
Set Variable [ $r ; Value: MBS( "PDFKit.AppendPages"; $pdf; Merge PDFs::InputPDF) ]
Set Variable [ $r ; Value: MBS( "PDFKit.AddEmptyPage"; $pdf; 700; 500) ]
Go to Record/Request/Page [ Next ; Exit after last: On ]
End Loop
Set Field [ Merge PDFs::FinalPDF ; MBS("PDFKit.GetPDFDocument"; $pdf) ]
Set Variable [ $r ; Value: MBS("PDFKit.Release"; $pdf) ]