import mlreportgen.dom.*

% Create a new PDF document
d = Document('merged_output', 'pdf');

% Append the first PDF
append(d, ExternalDocument('Test.pdf'));

% Append the second PDF
append(d, ExternalDocument('Test2.pdf'));

% Close and generate the merged PDF
close(d);
rptview(d.OutputPath);