php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #72323 add pdf function
Submitted: 2016-06-03 08:29 UTC Modified: 2016-06-03 08:50 UTC
From: ross dot woods1954 at gmail dot com Assigned:
Status: Wont fix Package: Unknown/Other Function
PHP Version: Irrelevant OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
47 - 5 = ?
Subscribe to this entry?

 
 [2016-06-03 08:29 UTC] ross dot woods1954 at gmail dot com
Description:
------------
Could you please import one of the open source pdf programs into the php core and produce a simple php function. (This will be much better than using an external pdf program.) It would become a simple php function like:

pdf (“filename.txt”, “target location”);

Parameters
- The filename could be a variable. I.e. a user could generate an xml, html or txt file and make it into a pdf.
- If it is a file (not a variable), the target location would be optional because the pdf file would simply go into the same folder as the source file.

The next obvious development would be to enclose the pdf as an email attachment, using a similar syntax to the current email function.

emailpdf( etc…)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-03 08:50 UTC] requinix@php.net
-Status: Open +Status: Wont fix
 [2016-06-03 08:50 UTC] requinix@php.net
Sorry but there's no way that will happen. It's far too complicated to include in PHP directly like that and would take a lot of time and effort for the devs to maintain. The most likely methods would be as an (optional) extension or userland PHP library. Plus, a single function like that isn't nearly powerful enough to handle all the possible requirements for generating PDFs.

There are already options out there and some of them don't require an external program.
https://www.google.com/search?q=generate+pdf+with+php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 01:01:28 2024 UTC