Comments (15)
Aargh, that's another incompatible GS "improvement". They silently removed operator finddevice
in GS 10.02.1:
https://bugs.ghostscript.com/show_bug.cgi?id=707307
I guess I need to find a workaround for it. At the moment, I can only suggest to use an older GS.
from dvisvgm.
The reason that dvisvm-2.13 was working with the current gs library is that it was compiled against an older default libgs (9.53).
Anyway, the solution is to upgrade to dvisvgm 3.2.1:
vectorgraphics/asymptote#434
This issue can presumably now be closed.
from dvisvgm.
Well, John, I'm glad it works for you. I have not yet found the missing piece of the jigsaw. I tried dvisvgm-3.2.1 after raising this issue, no change. Then I looked at fedora and found two patches for ghostscript fixing issues there, one of which sounded relevant. My ghostscript was vanilla, but after patching it I still get the failure.
from dvisvgm.
I was comparing to the 10.03.0 prerelease of ghostscript but dvisvgm 3.2.1 also works for me with gs 10.02.1.
from dvisvgm.
Unfortunately, I can't reproduce the error here. Could you isolate the actual issue with dvisvgm and provide a corresponding DVI/EPS file? As I don't know much about the internals of asy, I can't really tell what might go wrong during the conversion.
from dvisvgm.
Here's an example comparing 3.0.3, which fails, and 3.2.1, which works (for me):
dvisvgm --version
dvisvgm 3.0.3
[wizard: ~/camp master] dvisvgm test.dvi
The old, written in PostScript, PDF interpreter has been removed entirely.
You should cease using -dNEWDPF as it has no effect npre-processing DVI file (format version 2)
processing page 1
graphic size: 100.876875pt x 100.876875pt (35.454167mm x 35.454167mm)
output written to test.svg
1 of 1 page converted in 0.388851 seconds
dvisvgm --version
dvisvgm 3.2.1
[wizard: ~/camp master] dvisvgm test.dvi
pre-processing DVI file (format version 2)
processing page 1
graphic size: 100.876875pt x 100.876875pt (35.454167mm x 35.454167mm)
output written to test.svg
1 of 1 page converted in 0.0585079 seconds
from dvisvgm.
Ok, thanks for the example file. As far as I can tell from the console output, both versions produce the same SVG file but dvisvgm 3.0.3 triggers the GS warning because it uses -dNEWPDF. This option was removed with GS 10.01.0 only after the release of dvisvgm 3.0.3. It shouldn't have any effect here, though, because there's nod PDF processing involved in this example. I suppose, Ken's issue seems to be something different.
from dvisvgm.
I see; the -dNEWDPF error message confused me.
As Ken reports, there still is an issue with dvisvgm 3.2.1:
[test.ps.gz](https://github.com/mgieseki/dvisvgm/files/14502394/test.ps.gz)
dvisvgm test.ps -E
processing EPS file
PostScript error: undefined in finddeviceOperand stack:
5 --nostringval-- --nostringval-- --nostringval-- imgdev jpeg
from dvisvgm.
I do have a sphere_.pdf, presumably created during asy's rendering stage which either eventually generates the error message, or else succeeds and is then followed by the error message.
My dvisvgm was initially 3.2, now 3.2.1. My ghostscript is now 10.02.1 patched with two patches from fedora, PostScript-Fix-selectdevice.patch which looked hopeful (gs bug 707310), and txtwrite-device-needs-to-countdown-the-device-on-tex.patch which merely suppresses a debug message - but since I was patching I figured I'd take both.
I see John has now posted test.ps which also shows a similar failure but without creating a test_.pdf file.
from dvisvgm.
Unfortunately, I currently have no idea how to work around this issue. When I was looking for ways to implement the bitmap extraction back then, I already noticed that PS operator setpagedevice
threw an error when called inside a redefinition of another operator. finddevice
, on the other hand, worked flawlessly, so I used that one.
As I don't know why setpagedevice
doesn't work here, I opened a ticket in the GS bug tracker:
https://bugs.ghostscript.com/show_bug.cgi?id=707645
Let's hope, they could provide some helpful feedback.
from dvisvgm.
I've implemented a workaround that works so far with my (few) tests. Could you please test the latest version from the master branch too? If there are no things missing, I'll create a new dvisvgm release.
from dvisvgm.
from dvisvgm.
That commit [https://github.com/mgieseki/dvisvgm/commit/40ff350d327d41f492beb1e9b0a88053822e5939] works nicely for me as well. Thank You so much to both of you.
from dvisvgm.
Great, thank you both for the feedback. I'm preparing a hotfix release and will upload it later today.
from dvisvgm.
I just uploaded dvisvgm 3.2.2 that contains the latest changes. If you find any further issues, please let me know.
from dvisvgm.
Related Issues (20)
- Baseline incorrect with Chinese characters HOT 15
- Ghostscript 10.01.0+ support HOT 6
- Hyphen character missing when using luatex with DVI output HOT 5
- PDF -> SVG: Pixels cut-off on right border HOT 4
- pstricks: PostScript error: undefined in NodeScale HOT 7
- Request for reduced information verbosity level/flag HOT 6
- TL build patch: potrace HOT 2
- TL build patch: main src/Makefile.am HOT 1
- InvalidDVIFileException in upTeX DVI only on Solaris HOT 2
- Deferred initialization of PS doesn't work HOT 4
- color gradient missing in svg file HOT 4
- 3D plots in PDFs generated with `interp` shading disappear from SVG HOT 1
- Unable to convert Japanese characters to SVG from DVI HOT 13
- Ghostscript sill not found (macOS) HOT 4
- Wrong clipping and viewport with multiple pages converted at once HOT 2
- element id overlap HOT 3
- [feature request] id and class attributes for nodes and paths HOT 3
- dvisvgm hangs when converting pdf with tikz pattern to svg HOT 10
- `transparency group=knockout` does not work HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dvisvgm.