jviereck / pdfListView

A simple list view to render a PDF document using PDF.JS
Apache License 2.0
17 stars 6 forks source link

getUppermostVisibleCanvasOffset does not account for pdf rotation #9

Open PabloK opened 10 years ago

PabloK commented 10 years ago

Hi I have been having trouble with getPdfPosition, It returns null on several occasions although the entire pdf is in view. This might be because the pdf is rotated to the side. I have tried tracing the error back and it seems getUppermostVisibleCanvasOffset does not account for rotation and thus returns null for situations where some content actually is visible.

jviereck commented 10 years ago

@PabloK, thanks for reporting this! Can you share a link or the document with me that fails for you? Then I am more than happy to take a look at what is going wrong.

PabloK commented 10 years ago

Hey thanks for a quick response. I think it actually works for rotated pdfs the problem is rather a different one I have located two things that are strange I left comments in those commits so you should see it. I can fork and do the changes in my fork. But I would need a confirmation that I dint break something some how.

jviereck commented 10 years ago

@PabloK do you have a working example such that I can play with the changes you have proposed in #10? Otherwise it's hard for me to judge what is the right thing todo in the situations.