pdf to latex overleaf code example

Example 1: latex include pdf

\usepackage{pdfpages}

%To include all the pages in the PDF file:
%[pages=-] includes the whole file, range can be defined by [pages= 2-6]
\includepdf[pages=-]{myfile.pdf}

%To include just the first page of a PDF:
\includepdf[pages={1}]{myfile.pdf}

Example 2: latex pdf to eps

# from PDF to EPS
pdftops -eps filename.pdf filename.eps

# from PDF to EPS (just some pages)
pdftops -f num_first_page -l num_last_page -eps filename.pdf filename.eps

# from EPS to PDF
ps2pdf filename.eps filename.pdf

# check if fonts are embedded
pdffonts filename.pdf