Icon

KNIME_​join_​pdf_​using_​r_​with_​variables

KNIME_join_pdf_using_r_with_variables
Workflow to demonstrate using R snippet for joining two pdf files.This workflow is based on my proof of concept workflow but now takes the file detailsFilePath1, FilePath2 and JoinedFilePath from the File Details in the Table Creator.This converts the three supplied values into table variables which are then fed to the Rsnippet. The R Snippet does not make use of the File Details table, but this is passedbecause it does require an input data flow.The R Snippet uses the qpdf package which must be installed in your R environment forthis to work. You (may) also need to install the pdftools package in your R environment. 17 April 2021 @takbb Brian Bates Prior to running this workflow, ensure that you have two pdf filesavailable. Either name them document1.pdfdocument2.pdfand place them in the following folder (that you manually create)c:\temp\pdfor alternatively edit Table Creator, and enter the full paths to twopdf files of your choice, plus the full file path to a (to be created)joined pdf file.Run the workflow, and the two files will be merged and output asthe file named in JoinedFilePathI have also supplied a pair of demo pdf files document1.pdf anddocument2.pdf in the "data" folder within this workflow that you canmanually find using your OS file explorer outside of Knime Joins the two filesinto the JoinedFilePath fileFile Path Details in tableManually edit this to set file paths for demonstrationCreate flow variables from table columnsFilePath1FilePath2JoinedFilePath R Snippet Table Creator Table Rowto Variable Workflow to demonstrate using R snippet for joining two pdf files.This workflow is based on my proof of concept workflow but now takes the file detailsFilePath1, FilePath2 and JoinedFilePath from the File Details in the Table Creator.This converts the three supplied values into table variables which are then fed to the Rsnippet. The R Snippet does not make use of the File Details table, but this is passedbecause it does require an input data flow.The R Snippet uses the qpdf package which must be installed in your R environment forthis to work. You (may) also need to install the pdftools package in your R environment. 17 April 2021 @takbb Brian Bates Prior to running this workflow, ensure that you have two pdf filesavailable. Either name them document1.pdfdocument2.pdfand place them in the following folder (that you manually create)c:\temp\pdfor alternatively edit Table Creator, and enter the full paths to twopdf files of your choice, plus the full file path to a (to be created)joined pdf file.Run the workflow, and the two files will be merged and output asthe file named in JoinedFilePathI have also supplied a pair of demo pdf files document1.pdf anddocument2.pdf in the "data" folder within this workflow that you canmanually find using your OS file explorer outside of Knime Joins the two filesinto the JoinedFilePath fileFile Path Details in tableManually edit this to set file paths for demonstrationCreate flow variables from table columnsFilePath1FilePath2JoinedFilePathR Snippet Table Creator Table Rowto Variable

Nodes

Extensions

Links