如何使用tkdocviewer旋转PDF文件?

2024-04-19 13:31:33 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试旋转一个显示在tkinter上的PDF文件。你知道吗

Link here to module我还必须安装ghoscript,以便在tkinter窗口上显示PDF文件。你知道吗

我的当前代码(来自模块文档):

from tkinter import *
from tkdocviewer import *

# Create a root window
root = Tk()

# Create a DocViewer widget
v = DocViewer(root)
v.pack(side="top", expand=1, fill="both")

# Display some document
v.display_file("test.pdf")

# Start Tk's event loop
root.mainloop()

垂直向右显示图像。我需要把它顺时针旋转90度,这样显示出来。你知道吗

这可能吗?或者这个模块不是这个场景的最佳模块?你知道吗


Tags: 模块文件tofromimportherepdftkinter