[Tex/LaTex] create pdf figures from pdf_tex and pdf files

graphicspdf

I am writing an academic article and I saved all my figures in svg format. Then I converted (after a few cosmetic stuffs) it to pdf_tex/pdf so that they fit the paper . The problem is that my editor asks me the figures in pdf format. How can I convert all my pdf_tex/pdf files in selftcontained pdf figures so that the rendering when including the generated pdf will be the same ?

Best Answer

You can try

\documentclass{standalone}
\usepackage{color}
\usepackage{graphicx}

\begin{document}

    \input{Colors.pdf_tex}

\end{document}

EDIT:

To address the problem with objects outside the pdf, you could define the size of the resulting pdf. But I am afraid, the numbers have to be adjusted for each figure.

\documentclass{standalone}
\usepackage{color}
\usepackage{graphicx}

\begin{document}

    \parbox[c][30cm][c]{30cm}{
        \hspace*{1cm}
        \input{Colors.pdf_tex}
    }

\end{document}

SECOND EDIT:

In fact standalone itself is capable of adding desired margins. This can be done with

border={left right bottom top}

\documentclass[border={1cm 1cm 1cm 1cm}]{standalone}
\usepackage{color}
\usepackage{graphicx}

\begin{document}

    \input{Colors.pdf_tex}

\end{document}
Related Question