poppler

How to display PDF with python-poppler-qt4?

孤者浪人 提交于 2019-12-22 12:17:09
问题 I have downloaded and installed python-poppler-qt4 and I am now trying out a simple Qt application to display a PDF page. I've followed what I've been able to get from the web, i.e. convert the PDF to a QImage, then to a QPixMap, but it doesn't work (all I get is a small window with no visible content). I may have failed at some point ( QImage.width() returns the width I have input, QPixMap.width() returns 0). Here is the code: #!/usr/bin/env python import sys from PyQt4 import QtGui, QtCore

Can a PDF document contain images with different DPI?

我的未来我决定 提交于 2019-12-21 05:37:10
问题 the question says it all. Are there PDF documents that contain images with different dpi (Dot Per Inch) ? Or is it assumed that if I know the dpi of one image, I know it of the whole document? 回答1: I upvoted @ypnos' answer, which is completely correct. But I'd like to complement it by showing a very recent, new feature of the pdfimages utility. pdfimages was previously known to be able to extract images from PDF files (and that was its only useful purpose). However, now you can also use it to

Extracting text from highlighted annotations in a PDF file

我的梦境 提交于 2019-12-20 15:24:17
问题 Since yesterday I'm trying to extract the text from some highlighted annotations in one pdf, using python-poppler-qt4. According to this documentation, looks like I have to get the text using the Page.text() method, passing a Rectangle argument from the higlighted annotation, which I get using Annotation.boundary(). But I get only blank text. Can someone help me? I copied my code below and added a link for the PDF I am using. Thanks for any help! import popplerqt4 import sys import PyQt4 def

Extracting text from highlighted annotations in a PDF file

戏子无情 提交于 2019-12-20 15:23:17
问题 Since yesterday I'm trying to extract the text from some highlighted annotations in one pdf, using python-poppler-qt4. According to this documentation, looks like I have to get the text using the Page.text() method, passing a Rectangle argument from the higlighted annotation, which I get using Annotation.boundary(). But I get only blank text. Can someone help me? I copied my code below and added a link for the PDF I am using. Thanks for any help! import popplerqt4 import sys import PyQt4 def

How to install poppler in ubuntu 15.04?

匆匆过客 提交于 2019-12-20 12:26:53
问题 Poppler is a PDF rendering library based on the xpdf-3.0 code base. I have already downloaded the tar.xz file from the official site http://poppler.freedesktop.org/ But I do not know what to do with this file Is there any command to install or run? P.S. - I am new to linux, so I don't know a lot about it yet.. 回答1: What you downloaded from poppler site is source code and you may not be expert enough to install it yourself. For such situations, Ubuntu and other linux distros manage packages of

How to install poppler in ubuntu 15.04?

白昼怎懂夜的黑 提交于 2019-12-20 12:26:44
问题 Poppler is a PDF rendering library based on the xpdf-3.0 code base. I have already downloaded the tar.xz file from the official site http://poppler.freedesktop.org/ But I do not know what to do with this file Is there any command to install or run? P.S. - I am new to linux, so I don't know a lot about it yet.. 回答1: What you downloaded from poppler site is source code and you may not be expert enough to install it yourself. For such situations, Ubuntu and other linux distros manage packages of

Install Poppler for Python on Mac

大城市里の小女人 提交于 2019-12-19 09:19:10
问题 I need to extract pdf annotations in Python. All my searches indicate I need Poppler to do this e.g. to run this But I am having a lot of trouble installing Poppler. I'm using Python 3.4 on OS X (Yosemite). Here's what I've tried so far: 1. pip pip3 install python-poppler-qt4 which gives ImportError: No module named 'sipdistutils' 2. Next I tried pip3 install pypoppler And got NameError: name 'file' is not defined 3. Next I tried downloading from here Same error as 1. I searched for

Cannot install python-poppler-qt5 on windows 8.1

旧时模样 提交于 2019-12-18 07:12:55
问题 I got this error when trying to install python-poppler-qt5 on windows 8.1 "Failed to determine Qt version ([WinError 2] The system cannot find the file specified)" I have googled the whole day but still couldn't find the solution to that. What's the problem? 回答1: Run the following command in cmd: pip install python-qt5 Your problem should be solved now. 来源: https://stackoverflow.com/questions/50311856/cannot-install-python-poppler-qt5-on-windows-8-1

How to place the python packages to be install (using apt-get) in requirements.txt in GCP app engine

最后都变了- 提交于 2019-12-13 17:32:58
问题 I am trying to run my app in GCP App engine. My Requirements.txt file looks like below: pillow==5.1.0 pybase64==0.4.0 poppler-utils==0.68.0 Poppler-utils can be installed only using sudo apt-get in GCP command line tool. How can I give it in requirements.txt so that the app installs that package alone using sudo apt-get command ? 回答1: The requirements.txt file is specific to pip and can only include Python packages. If you need to install an OS-level package (with apt-get), you'll need to use

Why does pdftoppm poppler-utils have no jpeg option?

久未见 提交于 2019-12-13 15:19:02
问题 On Ubuntu 10.04, I've installed the poppler-utils package to be able to run pdftoppm. My goal is to convert PDFs to jpegs, however I don't have that option/flag available. The only rasterizer I seem to have is PNG support. Could someone please advise how I can get jpeg support? Many thanks. (See my options list below after running: pdftoppm --help): pdftoppm version 0.12.4 Copyright 2005-2009 The Poppler Developers - http://poppler.freedesktop.org Copyright 1996-2004 Glyph & Cog, LLC Usage: