How to Convert a PHP File to a JPEG File

By Dave Wilson

Save time producing instructional PHP code examples by converting PHP to an image file.
i Pixland/Pixland/Getty Images

Open and save a PHP file to JPEG file format using an image file printer driver that operates as a virtual printer. PHP code files consist of formatted text that can be difficult to display correctly in documents such as Web pages. Converting a PHP file to a JPEG image file resolves the issue by capturing a picture of the formatted PHP code, so no formatting is required. Convert PHP files to JPEG format using an image file printer driver in Windows.

Step 1

Click the Windows “Start” button and type “notepad” into the “Search” box. Press the “Enter” key.

Step 2

Click the “File” menu and click “Open.” Navigate to the PHP file you want to convert.

Step 3

Click once on the PHP file and click “Open.”

Step 4

Click the “File” menu and then “Print.” Click the “ImagePrinter” icon and click “Print.”

Step 5

Click the Windows “Start” button. Click “Pictures” and then double-click on the “ImagePrinter” directory.

Step 6

Click the “Views” button arrow on the toolbar and click “Details.” Click the “Date Modified” column header.

Step 7

Click Double-click on the file at the top of the list displayed to view the converted PHP JPEG file.

×