rguedes / pdfmerger Goto Github PK
View Code? Open in Web Editor NEWPDFMerger compatible with PHP5 for laravel
PDFMerger compatible with PHP5 for laravel
Hello there,
I am using this extension and I am grateful that you did it.
Could you please create a version tag? I would like to avoid use "dev-master" on my composer.json.
Thank you.
Using on Lumen 6.0
´´´php
$pdfMerger = new \PDFMerger;
$pdfMerger->addPDF(storage_path('pdf.pdf'), 'all');
$pdfMerger->merge('browser');
´´´
Causes Error:
Trying to access array offset on value of type bool
PHP in Browser 7.4
What am I doing wrong? Any ideas?
Tested merge('file', 'test.pdf');
as well as string.
$pdfMerger = new PDFMerger();
$pdfMerger->addPDF($public->path($path1), 'all');
$pdfMerger->addPDF($public->path($path2), 'all');
$pdfName = '例名';
$pdfMerger->merge("download", $pdfName);
Download Pdf Name is showing weird characters...
Latest release is still 1.0.3 which doesn't work on PHP7.2 due to the each depreaction. This is fixed in master but there's no release. Can you please release it?
Thanks
PHP 7.2 not supporting each function..which is in your package...do u have any solution for that
probably uses a compression technique which is not supported by the free parser shipped with FPDI.
It works with some PDF but most of the PDF will throw the error above
I need to merge pdf file and create new pdf file but i get below exception
{
"message": "Unable to find xref table.",
"exception": [
{
"type": "Exception",
"code": 0,
"message": "Unable to find xref table.",
"file": "\/var\/www\/app\/vendor\/rguedes\/pdfmerger\/Classes\/fpdi\/pdf_parser.php",
"line": 330
}
]
}
my composer.json file is below
"require": {
"php": ">=5.6",
"ext-gd": "*",
"composer/installers": "^1.4.0",
"symfony/console": "^3.3",
"wikimedia/composer-merge-plugin": "dev-master",
"onelogin/php-saml": "^2.12",
"fpdf/fpdf": "^1.81",
"rguedes/pdfmerger": "dev-master"
},
my php code is below
use PDFMerger;
$pdfMerger = new PDFMerger();
$pdfMerger->addPDF('test1.pdf');
$pdfMerger->addPDF('test2.pdf');
$pdfMerger->addPDF('test.pdf');
$pdfMerger->merge('merged.pdf');
let me know how to solve this exception?
I will use PDFMerger with elybyy/TCPDF.
can you help me?
On live server this package is giving error
in /var/www/html/coldxlogistics/vendor/rguedes/pdfmerger/Classes/fpdi/pdf_parser.php:675
itwork for some pdf but for most it is not working as expectations
i have uploaded 10 mb docx file but can not merge to final pdf and process is stuck. not throw error.
Please help Me
Sometimes we have the following message :
Unable to find "startxref" keyword. at /var/www/vendor/rguedes/pdfmerger/Classes/fpdi/pdf_parser.php:287
Any idea why ?
I am trying to fetch PDF from S3 Bucket. It gives me an error
Could not locate PDF on 'https://s3-ap-southeast-1.amazonaws.com/---mypath---.pdf' Please help. Thanx in advance.
Can you please update FPDF and FPDI libraries?
The principal issue I have is that FPDI just make a 'die' when an error occurs instead of throwing an exception.
This was solved in the latest FPDI version.
Instead of including them in your repository you may add them to the composer dependency:
{
"require": {
"setasign/fpdi-fpdf": "1.6.1"
}
}
ErrorException
Function get_magic_quotes_runtime() is deprecated
in Lavavel 7 and php 7.4
Please add in PDFMerger.php in line 77
$fpdi->setPrintHeader(false); // added to fix line on top of concatenated PDF's
bellow
$fpdi = new FPDI;
This is to fix the undesired header line that comes form default header in fpdi.
Thanks,
Danniel Perez
Hello,
I have a problem with some PDFs when merging : an exception error is returning "Unable to find object (4,0)".
What can you do to ignore this message ?
Some sites are telling that it appears when a file is corrupted :
https://stackoverflow.com/questions/26874989/fpdi-fatal-error-uncaught-exception-exception-with-message-unable-to-find-ob
Thanks for solving this issue.
I'm try to use PDFMerge with symfony5.2 (composer require rguedes/pdfmerger)
The folowing error append :
Trying to access array offset on value of type bool
in vendor/rguedes/pdfmerger/Classes/fpdi/fpdi_pdf_parser.php (line 308)
in vendor/rguedes/pdfmerger/Classes/fpdi/fpdi_pdf_parser.php -> _getPageRotation (line 284)
in vendor/rguedes/pdfmerger/Classes/fpdi/fpdi.php -> getPageRotation (line 234)
in vendor/rguedes/pdfmerger/Classes/PDFMerger.php -> importPage (line 88)
PDFMerger->merge('file', 'fusion.pdf')
Hi,
I just bought https://www.setasign.com/products/fpdi-pdf-parser/manual/ to use newer versions of PDF, but unfortunately PDFMerger is using is own version of FPDI :
public function __construct()
{
if(!class_exists("FPDF")) {
require_once('fpdf/fpdf.php');
}
if(!class_exists("FPDI")) {
require_once('fpdi/fpdi.php');
}
}
If I comment out these lines, it doesn't work anymore. My composer.json
is looking like:
"require":
{
"setasign/fpdi-fpdf": "^2.0.0",
"setasign/fpdi_pdf-parser": "^2.0",
"rguedes/pdfmerger": "dev-master",
...
}
I thought it should work because I'm loading setasign's librairies before your library, but no :-/
Thanks a lot,
Stéphane
Since you have updated partially FPDF, PDFMerger is not working anymore.
When testing the sample.php script, multiple PHP errors are shown.
I just create a pull request to make a full update of FPDF and FPDI which solve this issue:
#3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.