Comments (2)
Would you mind describing your process?
Sure, I'm working on a data visualisation project where I prepare the data in Python, run it using Processing on the Terminal, but in order to run it in headless mode, I need to export it to PDF as that's the only case where I can automate the process (I'm working on macOS, there are better solutions for Linux OS). I need to use pdf2image
to convert these PDFs back to JPEGs as I'd like to put these together sequentially in a video editor.
Thus, naming them correctly is crucial.
You can access the filename using
Image.filename
and every image has a_X
suffix where X is the page number.
Thank you. I realised I was making the silly error of accessing the list itself, and not the element of the list.
Here's the code for anyone facing a similar issue:
img = convert_from_path(pdf_path = proc_path[0], output_folder = out_path, fmt = 'jpg') img.filename
#gives an error: 'list' object has no attribute 'filename'
img[0].filename
does the trick.
from pdf2image.
Would you mind describing your process? You can access the filename using Image.filename
and every image has a _X
suffix where X is the page number.
Don't get me wrong, I am not completely closed to the idea, I simply have trouble picturing a legitimate scenario.
from pdf2image.
Related Issues (20)
- convert_from_bytes has wrong argument name or docstring
- Missing characters like "Ε Δ ΔΎ δ»" when converting a fillable pdf form to image HOT 6
- Missing py.typed file HOT 4
- Wrong image converted HOT 2
- No source release on pypi for 1.16.3 HOT 1
- Inconsistent results between servers with the same code and PDF file HOT 2
- Problem converting from Image coordinates to PDF coordinates
- Invalid SOS parameters for sequential JPEG
- Adding conda poppler to PATH HOT 1
- Lossless conversion HOT 3
- weird CMYK and text at top of output image
- Missing optional arguments in pdfinfo_from_bytes and pdfinfo_from_path HOT 2
- `Page rot` metadata and `size` param interact incorrectly in convert_from_path() HOT 5
- When a pdf is converted to a picture, it takes up a very small part of the picture
- Add an option to start counter generator at index 0 HOT 1
- FileNotFoundError with poppler_path HOT 1
- Is there way to control rotation?
- Some missing words from converting PDF to Image
- OSS-Fuzz Integration HOT 3
- Feature: Specific pages to convert.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdf2image.