# px in pdflatex to xelatex

I have document with many figures as following:

\begin{figure}
\begin{subfigure}[b]{0.48\textwidth}
\includegraphics[width=\textwidth, trim = 0px 200px 100px 30px,clip]{A.png}
\end{subfigure}
\begin{subfigure}[b]{0.48\textwidth}
\includegraphics[width=\textwidth, trim = 83px 210px 150px 115px,clip]{B.png}
\end{subfigure}
\caption{Caption text}
\end{figure}


Document were compiled by pdflatex therefore px unites were used. How this can be compiled by xelatex where px unit are not supported. What is the simplest modification to preserve the same visual impression?

• Using px is wrong to begin with, see tex.stackexchange.com/questions/33370/… – egreg Sep 19 '16 at 10:39
• @egreg this aroused my curiosity a bit. Do you know if XeTeX's definition of pt is different than PdfLaTeX? (I compiled the OP's example with both and the results are tremendously different) – Guilherme Zanotelli Sep 19 '16 at 10:49
• Of course 1pt is the same for both engines – egreg Sep 19 '16 at 10:53
• If you don't change \pdfpxdimen as explained in the linked answer, the value of 1px is the same as 1bp (and XeTeX knows bp units). – egreg Sep 19 '16 at 10:55