Symfony2 serve open pdf file
Found a solution:
Add BinaryFileResponse before controller class declaration from example
use Symfony\Component\HttpFoundation\BinaryFileResponse;
In controller action return BinaryFileResponse
return new BinaryFileResponse('/file/path/file.pdf');