Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Feature request) Extract pages and merge PDFs using text files (.txt or .json or .toml) #558

Open
bader-nasser opened this issue Sep 10, 2023 · 0 comments

Comments

@bader-nasser
Copy link

It would be nice to be able to extract some pages from a PDF using a file that looks like this:

6
# from 2 to 4
2-4
#from 11 to 10
19 10
# NO spaces are allowed before qualifiers and rotations
12 15odd
1south

# The following comment causes the program to create an extra file
# with "-share" in the name because it contains the word share
# share up to here
7- 4
3

# last page
end
# first page from the last!
r1

# but if you use "share" again in the comments, the last one wins!

and to be able to merge PDFs using .json or .yaml or .toml files, that looks like:

// comments are allowed!
{
	"$schema": "../../data.schema.json",
	"output": "../pdfs/output.pdf",
	"compress": true,
	"files": [
		"../pdfs/input-1.pdf",
		{
			"name": "../pdfs/input-3.pdf",
			"pages": 2
		},
		{
			"name": "../pdfs/input-3.pdf",
			"pages": [
				1,
				"3",
				" 4 -6",
				"end 12even",
				"8 - 11odd ",
				"end - r5",
				"2- 5even, 14"
			]
		},
		{
			"name": "../pdfs/input-3.pdf",
			"data": "data.txt"
		}
	]
}

Note: I created a cli that does these things but some people prefer to use a GUI, so I thought maybe it can be added to your program if you like the idea and find it beneficial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant