imalhasaranga / PDFLib

Current Release provide you methods to convert PDF to Images as well as Images to PDF, future releases will included more functions to interact with PDF files
MIT License
58 stars 37 forks source link

Configurable convert options #9

Open arildm opened 6 years ago

arildm commented 6 years ago

Resolves #8

imalhasaranga commented 6 years ago

are all the tests are passing ?

imalhasaranga commented 6 years ago

I would like if you can make this an optional parameter which user can set if he want, so code should look like this

        $pdfLibConfigurar = new PDFLibConfigurar();
        $pdfLibConfigurar->setNumRenderingThreads(4);
        $pdfLib = new PDFLib($pdfLibConfigurar);

so users who want to configure the library can create a configurar object and pass it to the constructor of the PdfLIb(); and others who do not want any advance configurations they can use the library the same old way

what do you think ?

arildm commented 6 years ago

That would perhaps be slightly better, yes. Because then we don't need to add new public methods to PDFLib. I don't recognize that pattern, but it looks almost like the Builder pattern.

To answer your old question: I never managed to get phpunit running, so I couldn't test it.

imalhasaranga commented 6 years ago

Sorry could not reply to you... it is just an example if you could implement builder pattern that would be great!!