Coder Social home page Coder Social logo

Comments (13)

neocake avatar neocake commented on July 19, 2024 4
use PDFMerger\PDFMerger;
require_once 'PDFMerger.php';

$pdf = new PDFMerger();

Problem solved, thank you all guys.

from pdfmerger.

Lichtschalter-5000 avatar Lichtschalter-5000 commented on July 19, 2024

I suppose you are including 'PDFMerger.php' from your 'sample.php'-file.
Therefore, the 'PDFMerger.php' must be in the same directory. Is that the case?

from pdfmerger.

neocake avatar neocake commented on July 19, 2024

I suppose you are including 'PDFMerger.php' from your 'sample.php'-file.
Therefore, the 'PDFMerger.php' must be in the same directory. Is that the case?

'PDFMerger.php' is in the same directory with sample.php,
and ,
i have tried "use(or include) PDFMerger(or PDFMerger.php);" in sample.php ,
but the scripts just die in that fatal error.
i need some help, thank you guys

from pdfmerger.

aderahenry avatar aderahenry commented on July 19, 2024

Do this:

use PDFMerger\PDFMerger;
require_once 'PDFMerger.php';

on sample.php. Write that on the top of the file

from pdfmerger.

neocake avatar neocake commented on July 19, 2024

Do this:

use PDFMerger\PDFMerger;
require_once 'PDFMerger.php';

on sample.php. Write that on the top of the file

thank you! your advice works!
but new fatal error comes:
Fatal error: Class 'PDFMerger\TCPDI' not found in /www/wwwroot/mysite/myokyawhtun/PDFMerger.php on line 87

from pdfmerger.

aderahenry avatar aderahenry commented on July 19, 2024

You're welcome. For the subsequent Error, put a backslash before the class name TCPDI to make it a qualified name, like so:

$fpdi = new \TCPDI;

Do that for any subsequent Class not found error.

from pdfmerger.

attilaking avatar attilaking commented on July 19, 2024
use PDFMerger\PDFMerger;
require_once 'PDFMerger.php';

$pdf = new PDFMerger();

Problem solved, thank you all guys.

Nice, works fine. Had a lot of trouble before finding this simple solution. Thank you!

from pdfmerger.

bramanto avatar bramanto commented on July 19, 2024

Do this:

use PDFMerger\PDFMerger;
require_once 'PDFMerger.php';

on sample.php. Write that on the top of the file

Thank you so much @aderahenry . The code works perfectly.

from pdfmerger.

fi5ly avatar fi5ly commented on July 19, 2024

@aderahenry thank you very much

from pdfmerger.

googlebe avatar googlebe commented on July 19, 2024

`use PDFMerger\PDFMerger;
require_once 'PDFMerger.php';

$pdf = new PDFMerger();`

oh,i am sorry,how can i do?i used the code,but the error still appear Fatal error: Class 'PDFMerger\TCPDI' not found in D:\wnmp\nginx\www\pdfmerge\PDFMerger.php

from pdfmerger.

Lichtschalter-5000 avatar Lichtschalter-5000 commented on July 19, 2024

You're welcome. For the subsequent Error, put a backslash before the class name TCPDI to make it a qualified name, like so:

$fpdi = new \TCPDI;

Do that for any subsequent Class not found error.

As @aderahenry wrote...

from pdfmerger.

manduzu avatar manduzu commented on July 19, 2024

Fatal error: Uncaught Error: Class 'PDFMerger' not found in C:\xampp\htdocs\pdf\index.php:17 Stack trace: #0 {main} thrown in C:\xampp\htdocs\pdf\index.php on line 17

hey guys what cause this error ill be happy is you will help with this error

from pdfmerger.

myokyawhtun avatar myokyawhtun commented on July 19, 2024

@manduzu can you try like what neocake wrote before?

use PDFMerger\PDFMerger;
require_once 'PDFMerger.php';

$pdf = new PDFMerger();

from pdfmerger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.