Skip to content
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

Fix missing moveTos in SVG paths #10590

Merged
merged 1 commit into from
Mar 2, 2019

Conversation

janpe2
Copy link
Contributor

@janpe2 janpe2 commented Feb 26, 2019

When OperatorList splits page contents into chunks of 1000 operators, some paths may be divided into two OPS.contructPath operators. The canvas back-end has no problems but the SVG back-end produces two <svg:path> elements and the latter one doesn't start with a moveTo command. Firefox doesn't draw this kind of SVG paths and Chrome logs an error in the console.

My idea is to append path commands to the same <svg:path> element until the path is terminated by a painting operator, like f or S. It's the standard PDF behavior that painting operators finish and end the current path.

Fixes #9167
Fixes #10522

Also issue #10282 seems to have this problem. Now a missing line segment is easily visible in the top-right corner of the page
kuva

@Snuffleupagus
Copy link
Collaborator

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/2764d70a583bf5f/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/2764d70a583bf5f/output.txt

Total script time: 1.96 mins

Published

@timvandermeij timvandermeij merged commit c43396c into mozilla:master Mar 2, 2019
@timvandermeij
Copy link
Contributor

Thank you for fixing this!

@janpe2 janpe2 deleted the svg-missing-moveto branch March 10, 2020 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants