Is it possible to load a page from one PDF and safe it in another? Simple use case would be to split PDFs into single pages, or merge several pages into one document.
I did not find anything in the documentation how to do this.
addPage and insertPage only create empty pages.
Any hints?
Copy a page from document to another
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Copy a page from document to another
I'm afraid that's not possible currently. But some editing capabilities are planned for the future.
Re: Copy a page from document to another
Thank you for the answer. In python I have also not found a framework so I am combining pypdf2 and pdfminer to achieve that feature.
An alternative could be to remove the unwanted pages. If that would be possible in future, would be great. Then I could simply create a copy of the document and remove pages to implement the split functionality. But no hurry if you have other priorities, I have a solution with python3 now.
Thank you for the many updates you provide.
An alternative could be to remove the unwanted pages. If that would be possible in future, would be great. Then I could simply create a copy of the document and remove pages to implement the split functionality. But no hurry if you have other priorities, I have a solution with python3 now.
Thank you for the many updates you provide.
Re: Copy a page from document to another
Hiho!
Is there any progress in this part??
I need to copy pages of a pdf-file, too.
I tried to get pages with pdf.GetBrushfFromPage() and insert them with doc.CreateImageFromBrush().
pdf.GetBrushFromPage() creates VecotrBrushes, but doc.CreateImageFromBrush() seems to need Rasterised Brushes.
Of course, as workaround I could convert the Vectorbrush. But this needs some upscaling, as the target-file should be printed on paper, and though leads to heavy systemslowdown.
Is there any other solution, or am I totally wrong (again)??
Best regards
George
Is there any progress in this part??
I need to copy pages of a pdf-file, too.
I tried to get pages with pdf.GetBrushfFromPage() and insert them with doc.CreateImageFromBrush().
pdf.GetBrushFromPage() creates VecotrBrushes, but doc.CreateImageFromBrush() seems to need Rasterised Brushes.
Of course, as workaround I could convert the Vectorbrush. But this needs some upscaling, as the target-file should be printed on paper, and though leads to heavy systemslowdown.
Is there any other solution, or am I totally wrong (again)??
Best regards
George
Re: Copy a page from document to another
The progress so far is that now you can copy-extract text from pages
Otherwise transofrm it to image is the only solution afaik
Some "workaround" is to use free external command line tools that give posibility to move-merge-exteaxt text and images and in rurn work with "extracted images"
Some of these tools are PDFtk. And ghostscript
Otherwise transofrm it to image is the only solution afaik
Some "workaround" is to use free external command line tools that give posibility to move-merge-exteaxt text and images and in rurn work with "extracted images"
Some of these tools are PDFtk. And ghostscript
Christos
Re: Copy a page from document to another
Well, PDFtk is not available for AmigaOS, and GhostScript does not have the corresponding features (afaik).
GhostScript can Create single pages from a larger PDF-File, but I want to create pages with more than one page on it, eg. brochures.
So far, it seems for me to use the workaround mentioned above...
Best regards
George
GhostScript can Create single pages from a larger PDF-File, but I want to create pages with more than one page on it, eg. brochures.
So far, it seems for me to use the workaround mentioned above...
Best regards
George
Re: Copy a page from document to another
Yes ghostscript has merge pdf's ability and many more
E.g. gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf
E.g. gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf
Christos
Re: Copy a page from document to another
But this only merges them one after another, doesn't it? I want to Create brochures, which have to print 2 pages on one paper (on one side...) for example...
Also i'd like to print more pages on one side of a paper than 2... For example 4 or eight pages on one page.
Also i'd like to print more pages on one side of a paper than 2... For example 4 or eight pages on one page.
Re: Copy a page from document to another
On Whoosh777.com I found some interesting descriptions for GhostScript870.
Also Printing books and brochures seems to be possible with them. But It uses outdatet techniques...
You have to print a paper two times on the same side, to get two pages on it...
Would be great, If some pdf.CopyPage(), pdf.InsertPage() would get alive... At least inserting Vectorimages would help a lot..
Best regards
George
Also Printing books and brochures seems to be possible with them. But It uses outdatet techniques...
You have to print a paper two times on the same side, to get two pages on it...
Would be great, If some pdf.CopyPage(), pdf.InsertPage() would get alive... At least inserting Vectorimages would help a lot..
Best regards
George
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact: