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

[PDF Viewer] Cannot select text in landscape pages #4414

Closed
3 of 4 tasks
LinqLover opened this issue Oct 1, 2024 · 0 comments · Fixed by #4417
Closed
3 of 4 tasks

[PDF Viewer] Cannot select text in landscape pages #4414

LinqLover opened this issue Oct 1, 2024 · 0 comments · Fixed by #4417

Comments

@LinqLover
Copy link

Please fill the following fields with a star (*) and provide as much related information as possible.

Pre-checks*

Please change the following [ ] to [x] for confirmation.

  • The issue has not been reported in this repository.
  • The issue remains after disabling all other extensions and restarting Visual Studio Code.
  • The FAQ cannot address the issue.
  • The issue is not related to compiling a document, or the document can be successfully compiled in the OS terminal but not in Visual Studio Code with this extension.

Environment*

Please write exact version numbers instead of descriptors such as latest.

  • Operating System: Linux x64 6.5.0-45-generic (Ubuntu 22)
  • Visual Studio Code Version: 1.93.1
  • LaTeX Workshop Version: v10.4.1
  • TeX Distribution Version: TeX Live 2022

The Issue*

Please briefly describe the issue you come across.

  • Text selection in landscape pages does not work using internal PDF viewer

Reproduction Steps

Please list out the steps to reproduce your bug. Include relevant environmental variables or any other configuration.

  1. MWE:
    % !TeX root = test.tex
    
    \documentclass{article}
    \usepackage{pdflscape}
    
    \begin{document}
    
    Hello, portrait!
    
    \begin{landscape}
    Hello, landscape!
    \end{landscape}
    
    \end{document}
  2. Save
  3. Command latex-workshop.view or latex-workshop.viewInBrowser
  4. Try to select the words "portrait" or "landscape" with the mouse

Expected Behavior

What were you expecting to see? Include any relevant examples or documentation links.

  • Selecting "portrait" works, but selecting "landscape" does not work
  • Pressing Ctrl + A reveals that the selectable text is offset to the displayed one

Logs

LaTeX Workshop Output*

Please paste the whole log messages below, not parts of ones. The log should start with New log placeholder %WS1% registered.

[20:00:36.594][Commander] VIEW command invoked.
[20:00:36.595][Root] Current workspace folders: ["file://%WS1%"]
[20:00:36.596][Root] Try finding root from magic comment.
[20:00:36.596][Root] Found magic root %WS1%/test/test.tex
[20:00:36.646][Root] Found looped magic root %WS1%/test/test.tex .
[20:00:36.647][Root] Keep using the same root file: %WS1%/test/test.tex
[20:00:36.647][Event] ROOT_FILE_SEARCHED
[20:00:36.648][Event] STRUCTURE_UPDATED
[20:00:37.452][Viewer][Panel] Internal PDF viewer at http://127.0.0.1:43815/viewer.html?file=pdf..ZmlsZSUzQSUyRiUyRiUyRmhvbWUlMkZjaHJpc3RvcGglMkZnaXQlMkZzZW1leHAtdGhlc2lzJTJGdGVzdCUyRnRlc3QucGRm .
[20:00:37.453][Cacher][Watcher] Watched file://%WS1%/test/test.pdf by the .pdf watcher.
[20:00:37.455][Event] FILE_WATCHED: "file://%WS1%/test/test.pdf"
[20:00:37.996][Viewer] Open PDF tab for file://%WS1%/test/test.pdf
[20:00:38.721][Viewer] Handle data type: open
[20:00:39.125][Server] Preview PDF file: file://%WS1%/test/test.pdf
[20:00:39.493][Viewer] Handle data type: loaded
[20:00:39.499][Event] VIEWER_PAGE_LOADED

Developer Tools Console

Please paste the whole log messages below, not parts of ones. This console logs can sometimes be very important in many cases. To access the log, click Help -> Toggle Developer Tools -> Console.

console.ts:137 [Extension Host] stack trace: TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:189:42)
    at Timeout._onTimeout (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:162:13)
mainThreadExtensionService.ts:78 [James-Yu.latex-workshop]Cannot set properties of undefined (setting 'size')
mainThreadExtensionService.ts:79 TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (vscode-file://vscode…e/watcher.js:189:42)
    at Timeout._onTimeout (vscode-file://vscode…e/watcher.js:162:13)
console.ts:137 [Extension Host] rejected promise not handled within 1 second: TypeError: Cannot set properties of undefined (setting 'size')
console.ts:137 [Extension Host] stack trace: TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:189:42)
    at Timeout._onTimeout (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:162:13)
mainThreadExtensionService.ts:78 [James-Yu.latex-workshop]Cannot set properties of undefined (setting 'size')
mainThreadExtensionService.ts:79 TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (vscode-file://vscode…e/watcher.js:189:42)
    at Timeout._onTimeout (vscode-file://vscode…e/watcher.js:162:13)
console.ts:137 [Extension Host] rejected promise not handled within 1 second: TypeError: Cannot set properties of undefined (setting 'size')
console.ts:137 [Extension Host] stack trace: TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:189:42)
    at Timeout._onTimeout (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:162:13)
mainThreadExtensionService.ts:78 [James-Yu.latex-workshop]Cannot set properties of undefined (setting 'size')
mainThreadExtensionService.ts:79 TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (vscode-file://vscode…e/watcher.js:189:42)
    at Timeout._onTimeout (vscode-file://vscode…e/watcher.js:162:13)
console.ts:137 [Extension Host] rejected promise not handled within 1 second: TypeError: Cannot set properties of undefined (setting 'size')
console.ts:137 [Extension Host] stack trace: TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:189:42)
    at Timeout._onTimeout (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:162:13)
mainThreadExtensionService.ts:78 [James-Yu.latex-workshop]Cannot set properties of undefined (setting 'size')
mainThreadExtensionService.ts:79 TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (vscode-file://vscode…e/watcher.js:189:42)
    at Timeout._onTimeout (vscode-file://vscode…e/watcher.js:162:13)
console.ts:137 [Extension Host] rejected promise not handled within 1 second: TypeError: Cannot set properties of undefined (setting 'size')
console.ts:137 [Extension Host] stack trace: TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:189:42)
    at Timeout._onTimeout (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:162:13)
mainThreadExtensionService.ts:78 [James-Yu.latex-workshop]Cannot set properties of undefined (setting 'size')
mainThreadExtensionService.ts:79 TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (vscode-file://vscode…e/watcher.js:189:42)
    at Timeout._onTimeout (vscode-file://vscode…e/watcher.js:162:13)
console.ts:137 [Extension Host] rejected promise not handled within 1 second: TypeError: Cannot set properties of undefined (setting 'size')
console.ts:137 [Extension Host] stack trace: TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:189:42)
    at Timeout._onTimeout (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:162:13)
mainThreadExtensionService.ts:78 [James-Yu.latex-workshop]Cannot set properties of undefined (setting 'size')
mainThreadExtensionService.ts:79 TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (vscode-file://vscode…e/watcher.js:189:42)
    at Timeout._onTimeout (vscode-file://vscode…e/watcher.js:162:13)
console.ts:137 [Extension Host] rejected promise not handled within 1 second: TypeError: Cannot set properties of undefined (setting 'size')
console.ts:137 [Extension Host] stack trace: TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:189:42)
    at Timeout._onTimeout (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:162:13)
mainThreadExtensionService.ts:78 [James-Yu.latex-workshop]Cannot set properties of undefined (setting 'size')
mainThreadExtensionService.ts:79 TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (vscode-file://vscode…e/watcher.js:189:42)
    at Timeout._onTimeout (vscode-file://vscode…e/watcher.js:162:13)
console.ts:137 [Extension Host] rejected promise not handled within 1 second: TypeError: Cannot set properties of undefined (setting 'size')
console.ts:137 [Extension Host] stack trace: TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:189:42)
    at Timeout._onTimeout (/home/christoph/.vscode/extensions/james-yu.latex-workshop-10.4.1/out/src/core/watcher.js:162:13)
mainThreadExtensionService.ts:78 [James-Yu.latex-workshop]Cannot set properties of undefined (setting 'size')
mainThreadExtensionService.ts:79 TypeError: Cannot set properties of undefined (setting 'size')
    at Watcher.handlePolling (vscode-file://vscode…e/watcher.js:189:42)
    at Timeout._onTimeout (vscode-file://vscode…e/watcher.js:162:13)

(seems unrelated though? In web browser, developer console is empty)

Anything Else?

Add any other context about the problem below.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant