I compile the below file:

%my main file is named `document .tex`.
    سلام و درود بر شما
 ادامه‌ی متن

With xelatex --shell-escape compile and this output:

enter image description here

And with this eror:

Package filemod Error: Required command \pdffilemoddate is not defined!. ...date\space is not defined!}{\filemod@help}
As you can see, the labels can not replacement properly.

But we know the pstool package use the catchfile,color,ifpdf,ifplatform,filemod,graphicx,psfrag,shellesc,suffix,trimspaces,xkeyval and expl3 packages too. At the begining of the filemod package .pdf we read: This package will work with LATEX and plain ε-TEX as long pdf(LA)TEX (in PDF or DVI mode) or Lua(LA)TEX is used. XETEX is not supported because it does not provide \pdffilemoddate. why? Who smells rat?:)) can this define the \pdffilemoddate command (or the same command) in xetex engine too? My eps file is here. Thanks.

Second edit about David's advice: I completely update my texlive. My above pstools error has been fixed. But my problem is still persist.
This is my log file and my font.
Compile With: xelatex --shell-escape %.tex
Editor: TeX studio

Third edit: With xelatex -shell-escape I have the below warning:

No file "02.tex" or "02-psfrag.tex" can be found that may contain macros for "02.eps".

My eps file name is 02.eps and I don't have 02.tex file or 02-psfrag.tex in my folder.
The above warning with pdflatex -shell-escape (without persian script and xepersian package) is existing too. But 02.pdf file at the below would add to my folder.

enter image description here

If I add the above file (02.pdf) to my folder, my xelatex's compile will have a correct output.
My question clearly is:
why with xelatex -shell-escape processing, 02.pdf not formed?
This is my log file dropbox link.


1 Answer 1


\filemoddate was added to xetex in the 2019 release, so if you have an up to date system the example runs without error (although I tested with a different font and eps file).

It may be possible to avoid the use of filemod on older systems, but updating is probably easiest.

On older systems it probably works to define it to return a fixed date, so


for example.

  • Thanks a lot. let me update my texlive as soon as and test it. Jan 1, 2020 at 12:01
  • My problem is still persist. Please see me second edit. Thanks Jan 3, 2020 at 10:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .