X-ray in-line outline imaging (XILOI) attracts much attention in recent years, for its simple setup compared with other approaches. Unfortunately, scattering effect cannot be removed directly, which restricts seriously the applications of this method to fields like biomedical radiography. The scattering effect in XILOI was investigated by digital simulation, in which the sample-detector distance (SDD) was changed step by step. The results show that there is a best imaging distance for the direct outline imaging and it is impossible to eliminate the scattering by arbitrarily changing the distance in this case. This difficulty could be overcome by quantitative phase contrast imaging(QPCI), in which SDD can be adjusted freely using a reconstruction algorithm. According to the investigation using QPCI, the scattering effect can be reduced to a minimum by increasing the SDD to a critical value, at which distinct improvement of the image quality can be achieved.