Skip to content

Instantly share code, notes, and snippets.

@SapioBeasley
Last active April 1, 2025 06:02
Show Gist options
  • Save SapioBeasley/030e18a958c3a715f9a7 to your computer and use it in GitHub Desktop.
Save SapioBeasley/030e18a958c3a715f9a7 to your computer and use it in GitHub Desktop.
RSS feed to PDF

rss2pdf

Simple php page where after submitting an rss feed from news.google.com it will grab the contents of the RSS and gernerate a PDF output with one article from the XML per page.

Functionality is specifically made to parse news.google.com rss, but other rss feeds may be input as well. Other inputs will only display the description and no other data without further edits.

Demo

Input rss/xml feed you would like to have parsed submit it. You will see a notice to view your pdf submission. Click to view. An example url that you can use is http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&output=rss.

Run a live demo: http://sapioweb.com/rss2pdf

Installation

Clone repo into the root of your project

git clone https://github.com/SapioBeasley/rss2pdf.git

Install dependencies cd rss2pdf/

composer install

Usage

require 'urlToPDF.php';

$pdf = new urlToPDF();
$pdf->displayPdf($url);

License

This software is open-sourced software licensed under the MIT license. For questions please email [email protected] or [email protected] or visit Sapioweb.com to learn more and get in contact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment