Code Monkey home page Code Monkey logo

Comments (10)

mgieseki avatar mgieseki commented on July 28, 2024 1

Ok, thanks for the info. It seems, you have a buggy version of mutool installed.
Besides the hanging process, the output data is partly incorrect. The opening tile tag should look like this:

<tile id="0" area="-3.7859998 -3.7860013 32.5308 32.5308" view="0 0 8.50403 8.50403"
  xstep="8.50403" ystep="8.50403" transform="1 0 0 -1 0 28.745">

Especially, the ystep attribute must not be 0. Otherwise, there will be only a single row of tiles with the pattern graphic on it. The view values are in wrong order too.
If there's a more recent version available for your system, I suggest to update mutool.

Unfortunately my attempt to build dvisvgm failed.

No problem. Thanks for trying, nonetheless. As the issue seems to be mutool here, it's not necessary to get more debug information from dvisvgm for now.

from dvisvgm.

muzimuzhi avatar muzimuzhi commented on July 28, 2024

It worked for me.

$ dvisvgm --pdf dvisvgm-gh271-hang-with-tikz-pattern.pdf
processing PDF file
  graphic size: 28.852794pt x 28.852794pt (10.140597mm x 10.140597mm)
  output written to dvisvgm-gh271-hang-with-tikz-pattern.svg
1 of 1 page converted in 4.70509 seconds

dvisvgm-gh271-hang-with-tikz-pattern

My environment:

  • macOS 13.6.7
  • basicTeX 2024
  • dvisvgm -V1 gives
    dvisvgm 3.2.2 (x86_64-apple-darwin18.7.0)
    -----------------------------------------
    brotli:      1.1.0
    clipper:     6.2.1
    freetype:    2.13.2
    Ghostscript: 10.03.1
    kpathsea:    6.4.0
    mutool:      1.23.11
    potrace:     1.16
    xxhash:      0.8.2
    zlib:        1.3.1
    

Do you have mutool installed? If you use Homebrew then just check brew info mupdf.

from dvisvgm.

samcarter avatar samcarter commented on July 28, 2024

@muzimuzhi Thanks for testing!

I have mutool installed from homebrew:

==> mupdf: stable 1.23.11 (bottled), HEAD

dvisvgm -V1 gives

dvisvgm 3.2.2 (aarch64-apple-darwin20.6.0)
------------------------------------------
brotli:      1.1.0
clipper:     6.2.1
freetype:    2.13.2
Ghostscript: 10.03.1
kpathsea:    6.4.0
mutool:      1.23.11
potrace:     1.16
xxhash:      0.8.2
zlib:        1.3.1

from dvisvgm.

samcarter avatar samcarter commented on July 28, 2024

mutool itself seems to be able to access the file, something like mutool clean document.pdf works fine.

from dvisvgm.

mgieseki avatar mgieseki commented on July 28, 2024

I can't reproduce the issue at the moment either.
As the conversion usually seem to work and only hangs when using patterns, it's probably not an issue with mutool. However, without further insight it's difficult to find out what's causing this behavior.

from dvisvgm.

samcarter avatar samcarter commented on July 28, 2024

@mgieseki Thanks for taking a look!

It's not a very important problem as I have the dvi route as a workaround, but in case you can think of any further tests I could do to narrow down the problem, please let me know!

from dvisvgm.

mgieseki avatar mgieseki commented on July 28, 2024

@samcarter Thank you for the offer. Do you have a build environment available and could compile a version of dvisvgm with some additional debug statements in it? That could give me some further insights.

Could you please also post the output of mutool draw -F trace test.pdf 1 where test.pdf is the problematic file? Maybe it contains different things than mine.

from dvisvgm.

samcarter avatar samcarter commented on July 28, 2024

Could you please also post the output of mutool draw -F trace test.pdf 1 where test.pdf is the problematic file? Maybe it contains different things than mine.

If I try with

document.pdf

mutool hangs after the following output:

<?xml version="1.0"?>
<document name="document.pdf">
<page mediabox="0 0 28.745 28.745">
<set_default_colorspaces gray="DeviceGray" rgb="DeviceRGB" cmyk="DeviceCMYK" oi="None"/>
<clip_path winding="nonzero" transform="1 0 0 -1 .199 28.546002">
    <moveto x="0" y="0"/>
    <lineto x="0" y="28.3468"/>
    <lineto x="28.3468" y="28.3468"/>
    <lineto x="28.3468" y="0"/>
    <closepath/>
    <moveto x="28.3468" y="28.3468"/>
</clip_path>
    <tile id="1610859072" area="-3.7859998 -3.7860013 32.5308 32.5308" view="0 8.50403 8.50403 0" xstep="8.50403" ystep="0" transform="1 0 0 -1 0 28.745">
        <fill_path winding="nonzero" colorspace="DeviceRGB" color="0 0 0" ri="1" bp="1" op="0" opm="0" transform="1 0 0 -1 0 28.745">
            <moveto x="5.53061" y="3.71063"/>
            <lineto x=".13872" y="3.71063"/>
            <lineto x="4.50082" y=".54137"/>
            <lineto x="2.83466" y="5.66933"/>
            <lineto x="1.16849" y=".54137"/>
            <closepath/>
        </fill_path>
    </tile>
<pop_clip/>
<stroke_path linewidth=".3985" miterlimit="10" linecap="0,0,0" linejoin="0" colorspace="DeviceGray" color="0" ri="1" bp="1" op="0" opm="0" transform="1 0 0 -1 .199 28.546002">
    <moveto x="0" y="0"/>
    <lineto x="0" y="28.3468"/>
    <lineto x="28.3468" y="28.3468"/>
    <lineto x="28.3468" y="0"/>
    <closepath/>
    <moveto x="28.3468" y="28.3468"/>
</stroke_path>
</page>

It never seems to reach the final </document>.

from dvisvgm.

samcarter avatar samcarter commented on July 28, 2024

@samcarter Thank you for the offer. Do you have a build environment available and could compile a version of dvisvgm with some additional debug statements in it? That could give me some further insights.

Unfortunately my attempt to build dvisvgm failed. When I tried to run autoreconf -fi I get a pop-up with

The "m4" command requires the command line developer tools. Would you like to install the tools now?

even though I already have them installed. Even installing them again does not help. Based on similar reports on the internet, there seem to be a problem with the current version with the command line dev tools. I'll give this another try when after the next update.

from dvisvgm.

samcarter avatar samcarter commented on July 28, 2024

Thank you so much for narrowing down the problem! I'll try to reinstall mutool!

from dvisvgm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.