GithubHelp home page GithubHelp logo

Comments (6)

JorjMcKie avatar JorjMcKie commented on June 10, 2024

You did not provide the reproducing file.

from pymupdf.

charosen avatar charosen commented on June 10, 2024

You did not provide the reproducing file.

sorry, i could not upload mypdf file for some reason.

However, it is pretty clear that 'to' point in toc is based on bottom-left origin, not top-left origin.

i simply want to convert 'to' points to top-left coordinates.

from pymupdf.

JorjMcKie avatar JorjMcKie commented on June 10, 2024

It is not all clear:
What are we even looking at? Where do the "**" come from?
The TOC entries seem to point to named destinations - are there errors in the PDF? Or in our code?
Did the PDF creator want to point to the bottom left point πŸ€·β€β™‚οΈ?
Have you tried to look at the PDF's names dictionary?

Again: without the file in question we are already wasting time.

from pymupdf.

JorjMcKie avatar JorjMcKie commented on June 10, 2024

Maybe you simply had a question and just wanted to know how to do coordinate transformation?
In that case you shouldn't have submitted an error report but a post in Discussions.

from pymupdf.

charosen avatar charosen commented on June 10, 2024

It is not all clear: What are we even looking at? Where do the "**" come from? The TOC entries seem to point to named destinations - are there errors in the PDF? Or in our code? Did the PDF creator want to point to the bottom left point πŸ€·β€β™‚οΈ? Have you tried to look at the PDF's names dictionary?

Again: without the file in question we are already wasting time.

Sorry for the "**" signs, i just want to get bolded fonts, and i already delete them.

my question is:

get_toc(simple=False) returns a Point(0.0, 761.8583) for 1.1 Hello World, and a Point(0.0, 731.8583) for 1.1.1. first step to hello world.

1.1 Hello World is above 1.1.1. first step to hello world, however, Point(0.0, 761.8583) is greater than Point(0.0, 731.8583), which is not based on pymupdf top-left coordinates.

from pymupdf.

JorjMcKie avatar JorjMcKie commented on June 10, 2024

Ok - to make some progress, I transferring this thread to Discussions, and we can continue 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.