hello dear Python-friends,
added an update below ...
first of all - i hope youre well and all goes okay at your hometown.
i have a collection of 330 pages ( a copy of a book) with mupdf i have separated the pages. But unfortunatly the pages are not in a linear order - i need to reorder in order to get a right setting for printing the stuff
the question: how to achieve this!?
Should i take a pdf-programme and cut the pdf-pages or should i stick to a pythonic way:
i heard about pikepdf: It provides a Pythonic wrapper around the C++ PDF content transformation library, QPDF. Python + QPDF ... Extract content from a PDF such as text or images.
PDFDocEncoding
PDFDocEncoding
https://github.com/pikepdf/pikepdf
pikepdf.readthedocs.io/
https://pypi.org/project/pikepdf/
Released: May 21, 2021
version: pikepdf 2.12.1
well this sound very good . do you think that i can solve my issues with that!?
update: the background:
to explain all a bit more: i run into these issues while applying Mutool and MuP
running this on MX-Linux: I'm tried to work with the latest release of MuPDF library.
my findings: if i a the document into pieces (A 5) then i get fancy results: the number of the pages (the pagination) does fully get lost..
1,4,3,2,5, and so forth - and this is awful
btw: see the commands i run:
The cutting axis is accordingly in the middle from top to bottom, so that two equal sides are created on the left and right.
You can split a document into individual pages with pdftk
what goes wrong here!?
see the datset - https://www.file-upload.net/download-142...7.pdf.html
what is wanted: i want to cut this into A5 :: note: the A5-Formate is 148 mm width and 210 mm height
i use the commands from these ressources:
https://www.mankier.com/1/mupdf
https://mupdf.com/docs/
any ideas?
added an update below ...
first of all - i hope youre well and all goes okay at your hometown.
i have a collection of 330 pages ( a copy of a book) with mupdf i have separated the pages. But unfortunatly the pages are not in a linear order - i need to reorder in order to get a right setting for printing the stuff
the question: how to achieve this!?
Should i take a pdf-programme and cut the pdf-pages or should i stick to a pythonic way:
i heard about pikepdf: It provides a Pythonic wrapper around the C++ PDF content transformation library, QPDF. Python + QPDF ... Extract content from a PDF such as text or images.
PDFDocEncoding
Quote:The PDF specification defines PDFDocEncoding, a character encoding used only in PDFs. This encoding matches ASCII for code points 32 through 126 (0x20 to 0x7e). At all other code points, it is not ASCII and cannot be treated as equivalent. If you look at a PDF in a binary file viewer (hex editor), a string surrounded by parentheses such as (Hello World) is usually using PDFDocEncoding.
When pikepdf is imported, it automatically registers "pdfdoc" as a codec with the standard library, so that it may be used in string and byte conversions. cf. https://pikepdf.readthedocs.io/en/latest...oding.html
https://github.com/pikepdf/pikepdf
It provides a Pythonic wrapper around the C++ PDF content transformation library, QPDF. Python + QPDF ... Extract content from a PDF such as text or images.
PDFDocEncoding
Quote:The PDF specification defines PDFDocEncoding, a character encoding used only in PDFs. This encoding matches ASCII for code points 32 through 126 (0x20 to 0x7e). At all other code points, it is not ASCII and cannot be treated as equivalent. If you look at a PDF in a binary file viewer (hex editor), a string surrounded by parentheses such as (Hello World) is usually using PDFDocEncoding.
When pikepdf is imported, it automatically registers "pdfdoc" as a codec with the standard library, so that it may be used in string and byte conversions. cf. https://pikepdf.readthedocs.io/en/latest...oding.html
https://github.com/pikepdf/pikepdf
pikepdf.readthedocs.io/
https://pypi.org/project/pikepdf/
Released: May 21, 2021
version: pikepdf 2.12.1
well this sound very good . do you think that i can solve my issues with that!?
update: the background:
to explain all a bit more: i run into these issues while applying Mutool and MuP
running this on MX-Linux: I'm tried to work with the latest release of MuPDF library.
my findings: if i a the document into pieces (A 5) then i get fancy results: the number of the pages (the pagination) does fully get lost..
1,4,3,2,5, and so forth - and this is awful
btw: see the commands i run:
mutool poster -x 2 input.pdf output.pdf..states that the document should be divided into two parts in the X axis.
The cutting axis is accordingly in the middle from top to bottom, so that two equal sides are created on the left and right.
You can split a document into individual pages with pdftk
pdftk input.pdf burstwe can find the output files in the same directory as pg_0001.pdf, pg_0002.pdf etc
what goes wrong here!?
see the datset - https://www.file-upload.net/download-142...7.pdf.html
what is wanted: i want to cut this into A5 :: note: the A5-Formate is 148 mm width and 210 mm height
i use the commands from these ressources:
https://www.mankier.com/1/mupdf
https://mupdf.com/docs/
any ideas?
Wordpress - super toolkits a. http://wpgear.org/ :: und b. https://github.com/miziomon/awesome-wordpress :: Awesome WordPress: A curated list of amazingly awesome WordPress resources and awesome python things https://github.com/vinta/awesome-python