我有使用tabula-py读取pdf的python代码以提取文本,然后通过tabula-py将其更改为表格形式。但这给了我一个警告。
Nov 15, 2017 3:40:23 PM org.apache.pdfbox.pdmodel.font.PDSimpleFont toUnicode
WARNING: No Unicode mapping for .notdef (9) in font Helvetica
Run Code Online (Sandbox Code Playgroud)
此警告是tabula-py,并且Tabula-py用Java编写。因此,我不能简单地使用-W ignore抑制上述警告。
有什么方法可以消除或抑制以上警告。
我想从 url 加载图像并将其绘制在画布上。我的画布占据整个窗口大小,我只希望图像以 100x100 的大小显示在鼠标位置上。下面是我的代码:
drawImage(imageUrl) {
const ctx = this.canvas.getContext('2d');
ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
const image = new Image();
image.onload = () => {
ctx.imageSmoothingEnabled = false;
ctx.drawImage(image, this.state.mousePos.x, this.state.mousePos.y,
100, 100);
};
image.src = 'https://cdn.sstatic.net/stackexchange/img/logos/so/so-icon.png';
}
Run Code Online (Sandbox Code Playgroud)
图像可以在网页上绘制,但质量很低。以下是来自上述链接的原图:
下面是我的画布上显示的图像:
您可以比较两个图像,它们的质量有很大不同。如何在画布上绘制高质量的图像?