Posts: 9
Threads: 3
Joined: Mar 2022
Reputation:
0
Gimp version: 2.10
04-02-2022, 10:03 PM
(This post was last modified: 04-02-2022, 10:36 PM by billalmasum93.)
I have a pdf of over 400 pages. I am using the following script to convert the pdf into another pdf with fonts looking old.
https://ideone.com/8uerbj
Now, for pdf of <200 pages, the script worked properly. But for this one, it's only producing only around 60 pages. Any idea what might cause that?
Already tried importing pdf in a lower resolution so RAM doesn't act up. Didn't help
Posts: 6,275
Threads: 271
Joined: Oct 2016
Reputation:
559
Operating system(s):
Gimp version: 2.10
If you have a single input PDF, why have you got so many images? Normally this would import as a single image with multiple layers, you then apply your edit to each layer in turn, and then export a single image.
Then as I said elsewhere, Gimp is creating an undo history for each image. Technically you get a copy of each layer for each operation (so, at least four copies). There are API calls to disable the undo stack... (also makes the code somewhat faster).
Also wondering why you do both randomize-pick and spread, since from their descriptions they are the same thing.
Posts: 9
Threads: 3
Joined: Mar 2022
Reputation:
0
Gimp version: 2.10
(04-03-2022, 08:12 PM)Ofnuts Wrote: If you have a single input PDF, why have you got so many images? Normally this would import as a single image with multiple layers, you then apply your edit to each layer in turn, and then export a single image.
Then as I said elsewhere, Gimp is creating an undo history for each image. Technically you get a copy of each layer for each operation (so, at least four copies). There are API calls to disable the undo stack... (also makes the code somewhat faster).
Also wondering why you do both randomize-pick and spread, since from their descriptions they are the same thing.
The pick and spread have a little different effect, specially for different parameters. I thought about using layers but importing as images seemed more natural. Will try using layers and see if I can apply the same effect on all layers automatically.
Posts: 9
Threads: 3
Joined: Mar 2022
Reputation:
0
Gimp version: 2.10
04-05-2022, 02:19 AM
(This post was last modified: 04-05-2022, 02:39 AM by billalmasum93.)
(04-03-2022, 08:12 PM)Ofnuts Wrote: If you have a single input PDF, why have you got so many images? Normally this would import as a single image with multiple layers, you then apply your edit to each layer in turn, and then export a single image.
Then as I said elsewhere, Gimp is creating an undo history for each image. Technically you get a copy of each layer for each operation (so, at least four copies). There are API calls to disable the undo stack... (also makes the code somewhat faster).
Also wondering why you do both randomize-pick and spread, since from their descriptions they are the same thing.
The layer suggestion worked very nicely. Thank you. Although, I have yet to try it on the 400+ page file
Posts: 9
Threads: 3
Joined: Mar 2022
Reputation:
0
Gimp version: 2.10
(04-05-2022, 02:19 AM)billalmasum93 Wrote: (04-03-2022, 08:12 PM)Ofnuts Wrote: If you have a single input PDF, why have you got so many images? Normally this would import as a single image with multiple layers, you then apply your edit to each layer in turn, and then export a single image.
Then as I said elsewhere, Gimp is creating an undo history for each image. Technically you get a copy of each layer for each operation (so, at least four copies). There are API calls to disable the undo stack... (also makes the code somewhat faster).
Also wondering why you do both randomize-pick and spread, since from their descriptions they are the same thing.
The layer suggestion worked very nicely. Thank you. Although, I have yet to try it on the 400+ page file
Yes, the layer method and then using the "Export as" work for 400+ pages pdf also.
Posts: 6,275
Threads: 271
Joined: Oct 2016
Reputation:
559
Operating system(s):
Gimp version: 2.10
(04-05-2022, 07:50 AM)billalmasum93 Wrote: (04-05-2022, 02:19 AM)billalmasum93 Wrote: (04-03-2022, 08:12 PM)Ofnuts Wrote: If you have a single input PDF, why have you got so many images? Normally this would import as a single image with multiple layers, you then apply your edit to each layer in turn, and then export a single image.
Then as I said elsewhere, Gimp is creating an undo history for each image. Technically you get a copy of each layer for each operation (so, at least four copies). There are API calls to disable the undo stack... (also makes the code somewhat faster).
Also wondering why you do both randomize-pick and spread, since from their descriptions they are the same thing.
The layer suggestion worked very nicely. Thank you. Although, I have yet to try it on the 400+ page file
Yes, the layer method and then using the "Export as" work for 400+ pages pdf also.
Good to know, though I expected it.
|