Giter VIP home page Giter VIP logo

Comments (5)

JorjMcKie avatar JorjMcKie commented on June 22, 2024

We can only accept a bug report complete with an example file. I also noticed that you do not use the current version.

from pymupdf.

gxlj avatar gxlj commented on June 22, 2024

hi ,how to remove all CTM from the pdf page ? i saw some "cm" instruction left in existing page : (0.24,0,0,-0.24,0,840) and when i darw_rect it will mulitple that ctm with input rect.
or how to get the current CTM value from current page ? after get it , how to get a reverse one as the Morph ?

from pymupdf.

JorjMcKie avatar JorjMcKie commented on June 22, 2024

hi ,how to remove all CTM from the pdf page ? i saw some "cm" instruction left in existing page : (0.24,0,0,-0.24,0,840) and when i darw_rect it will mulitple that ctm with input rect. or how to get the current CTM value from current page ? after get it , how to get a reverse one as the Morph ?

This consideration will not resolve your problem. Please repeat using the current PyMuPDF version 1.24.3.

from pymupdf.

gxlj avatar gxlj commented on June 22, 2024

i am using 1.24.4 to reproduce this .
i know the previous cm is (0.24,0,0,-0.24,0,0 )
how to pass the morph param to generate
"4.16,0,0,4.16,0,0 cm" (the inverse of above cm ) instruction ? (thus before draw , the two matrix multipy equal to 1)

from below code seems it depends the start point and a matrix , how to decide them ?

in shape.finish there is :

if pymupdf.CheckMorph(morph):
m1 = pymupdf.Matrix(
1, 0, 0, 1, morph[0].x + self.x, self.height - morph[0].y - self.y
)
mat = ~m1 * morph[1] * m1
self.draw_cont = _format_g(pymupdf.JM_TUPLE(mat)) + " cm\n" + self.draw_cont

from pymupdf.

JorjMcKie avatar JorjMcKie commented on June 22, 2024

First of all, this seems to be no bug report any longer.
I am therefore going to move this thread to the Discussions tab. We can pick up questions there.

from pymupdf.

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.