Closed kickmyassp closed 6 years ago
In order to help you here, as small test-case would be very helpful: can you come up with a very small svg that exhibits the problem- we need the original svg in order to diagnose this.
Thanks for your reply. Attached is a html file with an svg tag included. The svg description was actually created by another Javascript(abcjs) and hence may not be as small (or readable) as you would like.
I hope this would be useful to you. test_svg2pdf.txt
Thanks for the example. The reason is that there are
As a workaround you could try to find out what creates those invisible rects.
I just added support for stroke-opacity. It will come with the next release.
hello
I tried the new version(1.2.0) with the html/svg file I sent previously. Those rects with fill-opacity and stroke-opacity set to zero are invisible in svg but still become VISIBLE in pdf.
Is this what you meant when you say "stroke-opacity" is supported?
As far as this thing is concerned, the new version acts the same way as the old one.
Hi, are you sure you use the latest release? Unfortunately, the latest version on npm is still 1.1.2 . Right now you'll have to download/clone it from GitHub or use Bower in order to get 1.2.0.
Hello,
I am sure I did use 1.2.0. I used git to pull the latest one.
The file header says:
/**
Modules in this bundle
@license
svg2pdf.js:
license: MIT (http://opensource.org/licenses/MIT)
author: yFiles for HTML Support Team yfileshtml@yworks.com
version: 1.2.0
svgpath:
license: MIT (http://opensource.org/licenses/MIT)
version: 2.2.1
This header is generated by licensify (https://github.com/twada/licensify )
*/
On Wed, Dec 27, 2017 at 11:01 PM, Lukas Holländer notifications@github.com wrote:
Hi, are you sure you use the latest release? Unfortunately, the latest version on npm is still 1.1.2 . Right now you'll have to download/clone it from GitHub or use Bower in order to get 1.2.0.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yWorks/svg2pdf.js/issues/36#issuecomment-354118116, or mute the thread https://github.com/notifications/unsubscribe-auth/AGfIlr8e7rYgzQoTaid5A9qNFv2n5APrks5tEk3KgaJpZM4Qv8po .
Mmh, thats funny: I did a clean download from GitHub and ran your test above and I cannot see any boxes.
It turned out that I was using an old version of jsPDF(1.2.70). It wasn't obvious to me I needed to update jsPDF as well as svg2pdf. I switched to the latest one (1.3.0) and those annoying boxes are now gone. Thanks!!!
On Sat, Dec 30, 2017 at 12:32 AM, Lukas Holländer notifications@github.com wrote:
Mmh, thats funny: I did a clean download from GitHub and ran your test above and I cannot see any boxes.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yWorks/svg2pdf.js/issues/36#issuecomment-354460224, or mute the thread https://github.com/notifications/unsubscribe-auth/AGfIloW_pEJvQFfEVDQzQmKmj5gmjxt6ks5tFQXygaJpZM4Qv8po .
Ah, that makes sense. Sorry, forgot about that...
Hello, I am working on converting musical notations in SVG to PDF. Considering that I am a novice to both SVG and PDF as well as JS, svg2pdf.js has been a huge help for me. One problem I face now is unwanted rectangular boxes around all the graphic elements. See this PDF file for example.
Any help would be greatly appreciated.