Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
All open images not exported
#1
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
Reply
#2
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.
Reply
#3
(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.
Reply
#4
(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
Reply
#5
(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.
Reply
#6
(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.
Reply


Forum Jump: