To do it the "correct" way, you would have to create a /components/com_content/views/article/view.pdf.php file and generate the PDF there (using a layout is optional). This file will be loaded using the URL parameter &format=pdf.
$mydate = $item->displayDate; simply refers to the date string, therefore $mydate is not an object and you cannot format() it.
You'll need to pass the date string through JHtmlDate like so:
echo JHtml::_('date', $item->displayDate, 'j M Y');
You could accomplish this in your component's route.php file. The particulars would depend on how your routing in route.php is done so I can't give you an exact answer but I think you'd need to update your parse() method to include something like this the beginning:
public function parse(&$segments)
if(count($segments)==1 && $segments=='...
You could create a language override for the Persian language. The Joomla documentation shows you how to do that: https://docs.joomla.org/J3.x:Language_Overrides_in_Joomla
You could copy the following English language strings from /language/en-GB/en-GB.ini to your Persian language override:
DATE_FORMAT_LC="l, d F Y"
DATE_FORMAT_LC1="l, d F Y"
The basic issue is that sql datetime field format is this: 'YYYY-MM-DD HH:MM:SS'. You can only save a date in this format when you save a date/time value (in MySQL at least). If you have a calendar html input field (a DatePicker) and because of a language (country) you have to change the format of the date (for example to this: 'DD-MM-YYYY HH:MM:SS'), then ...
There is JHtmlNumber class but it only has a method for converting bytes.
Because Joomla! does not use INTL extension, formatting there is done using simple number_format() with language strings (THOUSANDS_SEPARATOR and DECIMALS_SEPARATOR) acting as separators. So formatting would depend on user's language.