-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows support #70
Comments
Thanks for your detailed report! You are right that the test suite is part of a an archived release, but will not be "installed" in the main package, which is kind of standard, I believe. You can run the test suite when following the instructions in About the airbus example: I'll have a look, again. It was among the first examples I used for no particular reasons, and it's likely not the best one for any good reason, anymore. Apart from that, Windows is "not supported" in the sense that I as the original author and maintainer have no Windows machines around to test Given your report and vague memories of others by @replabrobin saying it does run on Windows I'm happy to add a comment to the README if some of you can investigate a bit more about the results of running the entire test suite. |
Hi, I can run all the tests on windows in the standard way using a virtual environment. However, I do see errors.
|
If nobody volunteers within a week to provide something like regular windows support I'll just cloae this issue, soon. |
I'm not able to debug Windows issues. However I think the issue should still stay open in the case someone will step up. That way, people encountering issues with Windows can come here and see "Oh, Windows issues are already reported". |
Ok, agreed. |
Hi, I tried again with an installation test; I see errors related to using px; unfortunately px is not supported by reportlab and it's unlikely it should be. Traditionally 1px==1pt, but the conversion ratio is screen dependent ie dots per inch comes into the definition somewhere, but that cannot be known to the PDF unless we start some serious laziness ie get javascript to look at the screen (I'm not even sure that's possible in PDF) and then render the SVG dynamically.
|
I'm sorry for the px regression. Should be fixed by #80 |
Hi, First for all thanks for all your work on this package! I'm building a conda version of this package for conda-forge and it seems to work fine except for two failing tests:
This happens for both py27 and py35. The tests seem simple to solve, but I notice there's no continuous integration for Windows and Travis actually on the repository. @deeplook is this something you would be interested to add to this project? |
Recipe submitted: conda-forge/staged-recipes#3033 |
Please, open a separate ticket for CI setup. |
I started working on the ticket with the mentality of "tests on Windows failed", but that changed midway when I noticed the failed tests were simple to solve, and ended up changing the subject to "CI setup" in the end. My apologies. Done: #86. |
Now I think only the README needs updating. |
@claudep If you want see if you can give it an update! But just don't let people expect Windows support will be anytime anywhere at par with Unix. 😸 |
Sure, but as far as the test suite passes, I think we can claim Windows support, even if I don't have access to Windows machines either. |
@claudep indeed, we use |
I noted the "pure python" and "no windows support" and wondered why.
On Windows, I did pip install svglib and it wasn't blocked, and also installed lxml.
Didn't find any tests after the install, which the readme had sort of hinted might be installed that way, but wouldn't be the second way...
Downloaded the whole shebang as a ZIP from github, which doesn't include the wikipedia samples, I guess, but there were some in "misc". Firefox complained about some of them having syntax errors, and some not having style, so just displayed the XML tree. GNU Emacs on Windows actually showed the graphic form of the .svg which surprised me, I hadn't discovered that feature of Emacs before, but it worked well enough, except didn't scale the images to fit the window, so had to maximize the window to see some of them in full.
Didn't find pyTest, so did a loop over *.svg to run svg2pdf.py (copy of svg2pdf so Windows Python launcher would be happy with it) and while there were some messages on the screen, it seems that .pdf files were generated, and they displayed fine (within the limits of my understanding of what "fine" should look like, based on what I could see in emacs, and cursory visual inspection) except for the airbus.pdf showed up with the fuselage all filled with black. The log of messages appears at the end.
It seems Firefox might not like the ones that don't start with <svg> with full DTD specified, which might be reasonable, but there were a couple, one of which was airbus, that gave a syntax error (pasted below). Not sure if the error is for the or the prior , or the combination.
So I never heard of svglib until the recent "revival" messages on reportlab-users mailing list, so I clearly don't know what I am doing, or how to interpret the errors, and I'm pretty much a novice with SVG, but trying to learn for a project, so I can't presently say much more about all this. But svg2pdf looks like it could be useful for my Windows-based project, if it goes in certain directions... and it seems that a fair bit of the code works fairly well on Windows...
So why isn't there Windows support? :)
==== syntax error from Firefox for airbus.svg ====
XML Parsing Error: undefined entity
Location: file:///D:/downloads/svglib/tests/samples/misc/airbus.svg
Line Number 889, Column 3: <g id="0" name="0" style="&st0;" onclick="displayAttributes(evt)">
==== messages from conversion loop ====
`
D:\downloads\svglib\tests\samples\misc>for %v in (*.svg) do py "C:\program files\Python36\Scripts\svg2pdf.py" %v
D:\downloads\svglib\tests\samples\misc>py "C:\program files\Python36\Scripts\svg2pdf.py" airbus.svg
D:\downloads\svglib\tests\samples\misc>py "C:\program files\Python36\Scripts\svg2pdf.py" arcs01.svg
D:\downloads\svglib\tests\samples\misc>py "C:\program files\Python36\Scripts\svg2pdf.py" arcs02.svg
D:\downloads\svglib\tests\samples\misc>py "C:\program files\Python36\Scripts\svg2pdf.py" car.svg
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
Ignoring unit: px
D:\downloads\svglib\tests\samples\misc>py "C:\program files\Python36\Scripts\svg2pdf.py" logo_a3.svg
D:\downloads\svglib\tests\samples\misc>py "C:\program files\Python36\Scripts\svg2pdf.py" newlion.svg
Ignoring unit: px
Ignoring unit: px
D:\downloads\svglib\tests\samples\misc>py "C:\program files\Python36\Scripts\svg2pdf.py" python221imap.svg
D:\downloads\svglib\tests\samples\misc>py "C:\program files\Python36\Scripts\svg2pdf.py" Python_logo_and_wordmark.svg
Can't handle color: url(#linearGradient1478)
Can't handle color: url(#linearGradient1475)
Ignoring unit: px
Can't handle color: url(#radialGradient1480)
D:\downloads\svglib\tests\samples\misc>py "C:\program files\Python36\Scripts\svg2pdf.py" rllogo.svg
D:\downloads\svglib\tests\samples\misc>py "C:\program files\Python36\Scripts\svg2pdf.py" tiger.svg
D:\downloads\svglib\tests\samples\misc>py "C:\program files\Python36\Scripts\svg2pdf.py" timezones.svg
D:\downloads\svglib\tests\samples\misc>`
The text was updated successfully, but these errors were encountered: