tcolorbox package example, from: article inside beamer

MWE
\documentclass[a4paper]{article}
\usepackage[skins,listings,raster]{tcolorbox}
\begin{document}
\begin{figure}
\begin{tcblisting}{
enhanced,oversize,lower separated=false,
colframe=red!50!black,colback=yellow!10!white,
interior style={top color=yellow!5!white,bottom color=yellow!20!white},
% listing side comment,
comment only,
listing options={style=tcblatex,texcsstyle=*\color{red!70!black}},
pdf comment,
comment style={drop lifted shadow},
compilable listing,
run xelatex,
raster columns=1}
\documentclass[a4paper]{article}
\usepackage{xcolor}
\pagecolor{blue!1}
\usepackage{fancyhdr} %for a header
\usepackage{amssymb} %for the $\Box$
\usepackage{tabularx}
\setlength{\headheight}{30pt}
\newcommand*{\SignatureAndDate}[1]{%
\par\noindent\makebox[5cm]{\hrulefill} \hfill\makebox[4cm]{\hrulefill}%
\par\noindent\makebox[5cm][l]{#1} \hfill\makebox[4cm][l]{Date}%
}
\pagestyle{fancy}
\fancyhf{}
\chead{PROJECT name: here goes the title for the project that is in the header\\ Participant Information on the study}
\begin{document}
\section*{Introduction}
You have been invited to participate in a study of the Faculty xx of the University of yy in
the scope of the zz project. This information sheet describes the study and your
participation in it. The researcher will answer any question or doubt regarding this study.
\noindent Your participation is voluntary, and you are free to decide not to enrol or abandon your
participation at any moment without prejudice of any relation with the project or your
institution.
\noindent Please carefully read this information sheet before signing the following informed
consent.
\section*{Aim of the study}
The goal of this study is to...
{\centering \section*{Informed Consent}}
\noindent\begin{tabular}{@{}p{12cm}p{3cm}@{}}
I declare that I have read the information above and that I understood the aim of
the study, as well as the risks and benefits of my participation in the study.& $\Box$\\[5ex]
I had the time and opportunity to place all the questions I had about the study and
the experimental protocol and all my questions were answered.& $\Box$\\[5ex]
All the information, oral or written, and discussion about the study were provided
to me either in English or in another language in which I am also proficient.& $\Box$\\[5ex]
I was informed that my participation in this study is voluntary and the refusal to
participate will not involve any punitive action of any sort.& $\Box$\\[5ex]
I was informed that all the information collected during this study would be
treated with confidentiality.& $\Box$\\[5ex]
Finally, I declare that I participate willingly in this study.& $\Box$
\end{tabular}
\vspace{2cm}
\noindent\begin{tabular}{ll}
\makebox[7cm]{\hrulefill} &\\
Participant’s name &\\[5ex]
\makebox[7cm]{\hrulefill} & \makebox[3cm]{\hrulefill}\\
Participant’s signature & Date\\[5ex]
\makebox[7cm]{\hrulefill} & \makebox[3cm]{\hrulefill}\\
Researcher’s signature & Date\\
\end{tabular}
\end{document}
\end{tcblisting}
\caption{The Consent Form}
\end{figure}
\end{document}
Original suggestion:
Try some experiments with latexdemo package.



MWE
\documentclass[a4paper]{article}
\usepackage{xcolor}
\usepackage{graphicx}
\pagecolor{blue!2}
\usepackage{latexdemo}
\usepackage{fancyhdr} %for a header
\usepackage{amssymb} %for the $\Box$
\usepackage{tabularx}
\setlength{\headheight}{30pt}
\newcommand*{\SignatureAndDate}[1]{%
\par\noindent\makebox[5cm]{\hrulefill} \hfill\makebox[4cm]{\hrulefill}%
\par\noindent\makebox[5cm][l]{#1} \hfill\makebox[4cm][l]{Date}%
}
\pagestyle{fancy}
\fancyhf{}
\chead{PROJECT name: here goes the title for the project that is in the header\\ Participant Information on the study}
\begin{document}
\begin{filecontents}[overwrite,nosearch,noheader]{\democodefile}
\section*{Introduction}
You have been invited to participate in a study of the Faculty xx of the University of yy in
the scope of the zz project. This information sheet describes the study and your
participation in it. The researcher will answer any question or doubt regarding this study.
\noindent Your participation is voluntary, and you are free to decide not to enrol or abandon your
participation at any moment without prejudice of any relation with the project or your
institution.
\noindent Please carefully read this information sheet before signing the following informed
consent.
\section*{Aim of the study}
The goal of this study is to...
%\begin{figure}
\fbox{\includegraphics[scale=0.2]{formshrink_read}}
%\caption{The Consent Form}
%\end{figure}
{\centering \section*{Informed Consent}}
\noindent\begin{tabular}{@{}p{12cm}p{3cm}@{}}
I declare that I have read the information above and that I understood the aim of
the study, as well as the risks and benefits of my participation in the study.& $\Box$\\[5ex]
I had the time and opportunity to place all the questions I had about the study and
the experimental protocol and all my questions were answered.& $\Box$\\[5ex]
All the information, oral or written, and discussion about the study were provided
to me either in English or in another language in which I am also proficient.& $\Box$\\[5ex]
I was informed that my participation in this study is voluntary and the refusal to
participate will not involve any punitive action of any sort.& $\Box$\\[5ex]
I was informed that all the information collected during this study would be
treated with confidentiality.& $\Box$\\[5ex]
Finally, I declare that I participate willingly in this study.& $\Box$
\end{tabular}
\vspace{2cm}
\noindent\begin{tabular}{ll}
\makebox[7cm]{\hrulefill} &\\
Participant’s name &\\[5ex]
\makebox[7cm]{\hrulefill} & \makebox[3cm]{\hrulefill}\\
Participant’s signature & Date\\[5ex]
\makebox[7cm]{\hrulefill} & \makebox[3cm]{\hrulefill}\\
Researcher’s signature & Date\\
\end{tabular}\end{filecontents}
\PrintDemo {style=stacked}
\end{document}
pdfpagespackage. – CarLaTeX Jun 04 '20 at 05:24\documentclassper document. – Cicada Jun 05 '20 at 10:58\fboxin a float:(figure(fbox(minipage(content))) (caption))(obviously this is not code, but a scheme of what is inside what) where "content" could be the fake Word text with a generous\fboxsep(to simulate margins) and a smaller font, or if you want to preserve headers, footers, title, etc. that cannot be generated "as is" inside the minipage, make the "content" in PDF (i.e.,pdflatex MWE.tex) and include the PDF as an image (i.e.\includegraphics[page=1, width=\linewidth]{MWE}) . – Fran Jun 07 '20 at 08:43