raykolbe / DOMPDFModule

A Zend Framework module for Dompdf
MIT License
61 stars 62 forks source link

Problems on installation #18

Closed vinigarcia87 closed 7 years ago

vinigarcia87 commented 10 years ago

My composer.json:

"require": {
    "php": ">=5.3.3",
    "zendframework/zendframework": "2.2.*",

    "dino/dompdf-module": "dev-master"
}

Command executed: $ php composer.phar update

Problem 1
   - Installation request for dino/dompdf-module dev-master -> satisfiable by dino/dompdf-module[dev-master].
   - dino/dompdf-module dev-master requires dompdf/dompdf dev-master#1abb9117a50c2854761bacaaff4b8a08257a1e8e -> no matching package found.

Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
  see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Take this opportunity to ask that the installation of the module dino/dompdf not depend on git. I don't use git on my environment, and only composer should be enough.

Thanks! Waiting your answer to keep using this excellent module! :)

vinigarcia87 commented 10 years ago

Tried to install as the follow:

"require": {
    "dompdf/dompdf": "dev-master#1abb9117a50c2854761bacaaff4b8a08257a1e8e",
    "dino/dompdf-module": "dev-master"
}

And it installed! But I got an error executing the example code on readme. This is the error:

Warning: require_once(C:\wamp\www\ZendSkeletonApplication\vendor\dino\dompdf-module\src\DOMPDFModule\Service/../../../../../dompdf/dompdf/lib/html5lib/Parser.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in C:\wamp\www\ZendSkeletonApplication\vendor\dino\dompdf-module\src\DOMPDFModule\Service\DOMPDFFactory.php on line 111

What I have to do to get this module working?

Thanks!

raykolbe commented 10 years ago

Hi @vinigarcia87. I apologize for not responding to your issues sooner. For some reason I was not receiving notifications of issues on this project.

In your composer.json file you should only have to put dino/dompdf-module and not have to specify dompdf/dompdf.

After looking into this a bit I'm not sure why this is broken as it worked before.

The specific commit used for dompdf does not include the html5lib directory and I'm not sure why. I will try to get to this today and add regression tests.

raykolbe commented 10 years ago

I have not had a chance to work on this. It appears that the directory does not exist. A different commit of dompdf should be used with DOMPDFModule. The composer.json file should be changed to reflect this.

I don't have the time right now to fix/test this unfortunately and I apologize. If you get to it before me, just send me a pull request with the fix and any applicable tests.

vinigarcia87 commented 10 years ago

Hi, @raykolbe ! Thanks for your response!

I only could install this module by doing the following:

"require": {
    "php": ">=5.3.3",
    "zendframework/zendframework": "2.2.*"

    ,"dompdf/dompdf" : "dev-master"
    ,"dino/dompdf-module": "dev-master"
}

Your work is great! I really glad you made this module. :)

raykolbe commented 10 years ago

@vinigarcia87 I finally had a chance to look into this.

Your initial issue was due to not having minimal-stability set to dev in your composer.json file. Even though I have this set in the dino/dompdf-module composer file, only the root composer.json file is listened to (e.g. I can't override your root config option). Change your minimum stability option, then you can remove explicitly calling dompdf/dompdf as a dependency.

Your second issue was my fault, not caught during testing either :-(. The specific commit for dompdf I was relying on does not contain the directory html5lib directory. I have fixed this in a hotfix. If you don't mind testing it out for me that would be great.

Just update your composer.json file to use: "dino/dompdf-module": "dev-hotfix-18"

I have asked for dompdf to update their version so that we are not relying on a "dev" version every time (https://github.com/dompdf/dompdf/issues/703).

shashankphp commented 10 years ago

Hi,

I am also facing the same issue while installing it as below: ==============START=============== Problem 1

Potential causes:

Read http://getcomposer.org/doc/articles/troubleshooting.md for further common problems. ================END=============

I updated the composer file to require: "dino/dompdf-module": "dev-master", "dino/dompdf-module": "dev-hotfix-18"

Please put all required steps from scratch in one post for installation rather than suggesting/discussing that in multiple posts.

raykolbe commented 10 years ago

This should only affect you if you are installing hotfix right now. Not sure what you are referring to about information from scratch.

raykolbe commented 10 years ago

If you are talking about those links, those are auto generated by composer, not me. Again, this hotfix is a hotfix. If you are trying to install this module, please follow readme in the root of the project.

raymondelferink commented 10 years ago

Hey Raymond, great stuff!

In our case the module works really well in a xampp dev environment, but there was no output at all on our ubuntu production environment. Even with all dependencies set.

I'm still not sure what the problem was, but after many hours of searching I found this answer

We got it to work by setting both of the following lines in our composer file: "dompdf/dompdf": "dev-master", "dino/dompdf-module": "dev-hotfix-18",

When I ommit the dompdf/dompdf line, the update fails with the same error as vinigarcia87.

When will that hotfix become part of the dev-master?

shashankphp commented 10 years ago

Hi,

Well thanks for your response. I have been able to install and use this library and create PDF. Can you please confirm if this library supports SVG tags. (http://www.w3.org/2000/svg ) (Please refer http://en.wikipedia.org/wiki/Scalable_Vector_Graphics for more information.)

I am trying to generate PDF Report files for charts generated by ExtJs which uses SVG tags. I am able to render simple html tags like(P with css styles) but unable to render SVG tags. It comes blank. Thanks, Shashank

raykolbe commented 10 years ago

@Shashankphp you will want to refer to romped as that is the project that actually handles rendering.

raykolbe commented 10 years ago

@raymondelferink I will try to make time to merge tonight. You should be able to run hotfix without specifying dolled version. Just make sure your composer file has minimum-stability set to dev.

shashankphp commented 10 years ago

@raykolbe: Well I could not understand what you meant by "refer to romped as that is the project that actually handles rendering." Please explain or provide any link so that I can refer what you said. Also, please confirm if this library supports SVG tags as per your knowledge.

raykolbe commented 10 years ago

Sorry @shashankphp I was on my phone...autocorrect :-/ You are asking about functionality that is part of the DOMPDF project, not DOMPDFModule. Please check out that project https://github.com/dompdf/dompdf

raykolbe commented 10 years ago

@shashankphp That's not to say what you're looking for won't work. It's just something I am not familiar with enough.

raykolbe commented 10 years ago

@raymondelferink Please try using hotfix-18, remove the dompdf/dompdf declaration you have, set your minimum-stability to dev, and perform an update. Once you can confirm that works, then I can merge the hotfix into master and tag it with a minor release.

shashankphp commented 10 years ago

@raykolbe: Thanks a lot for your response. I will try to go through the main link and figure out the solution.

mamont77 commented 10 years ago

Hello everyone, For historical reasons, I do not use composer in one my project, i'am use gitmodules. Who can either write workers hashes for: https://github.com/dompdf/dompdf and https://github.com/PhenX/php-font-lib? I tried to switch to "hotfix-18", Unfortunately it does not work for me. Thanks.

mamont77 commented 10 years ago

This is resolved my problem. https://github.com/mamont77/DOMPDFModule/commit/1dedf740d1039fd1056fdff8bc06ccdd3e34c925 Thanks.

raykolbe commented 10 years ago

@mamont77 Your first question related to gitmodules deserves its own issue. Please open a new issue. However, please note that dompdf and php-font-lib are not my projects. Please consult with the project maintainers.

What exactly does not work in the hotfix? Do you receive an error message? If so, please post.

FabianKoestring commented 10 years ago

Why is this module dependend of an development branch?

"dompdf/dompdf": "dev-master#1abb9117a50c2854761bacaaff4b8a08257a1e8e"

Why you aint use the newest stable release ?

"dompdf/dompdf": "v0.6.0",
vinigarcia87 commented 9 years ago

Hey, once again I'm trying to update project and it's not working. :( Any of the fixes listed here works... Can you please fix this? Your module is great! but it's kinda hard that I can update it easily. :S Thanks!

vinigarcia87 commented 9 years ago

I now getting this error:

[RuntimeException] Failed to execute git status --porcelain --untracked-files=no 'git' n?o ? reconhecido como um comando interno ou externo, um programa operável ou um arquivo em lotes.

raykolbe commented 7 years ago

Hi @vinigarcia87,

As you've noticed DOMPDFModule hasn't received the time and attention it deserves. I understand how frustrating this is and I'm sorry you've had to deal with this frustration 😢

I'm currently taking steps to stabilize DOMPDFModule which includes code updates as well as creating a backlog that will ensure its continued success.

You can follow project Phoneix to see what immediate work is being prioritized.

Thank you for your understanding and patience.

raykolbe commented 7 years ago

@FabianKoestring v0.4.0 resolves what you have observed.

@vinigarcia87 I do not know what your error message is about. This does not seem to be a DOMPDFModule specific error message. Please try updating your composer.json file to use v0.4.0. If you are still having trouble please open a new issue with detailed error information 👍

Closing issue due to age and proposed solution(s).