| Summary: | Allow to save selected pages from documents | ||
|---|---|---|---|
| Product: | poppler | Reporter: | Marek Kasik <mkasik> |
| Component: | glib frontend | Assignee: | poppler-bugs <poppler-bugs> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | medium | CC: | ajohnson, bugzilla, mkasik, rishi.is |
| Version: | unspecified | ||
| Hardware: | Other | ||
| OS: | All | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
| Attachments: |
glib: Add poppler_documents_save_pages()
Add PDFBuilder class |
||
|
Description
Marek Kasik
2013-09-30 13:53:22 UTC
Any chance you can share the code instead of copying it by moving it up to somewhere in poppler/* ? (In reply to comment #1) > Any chance you can share the code instead of copying it by moving it up to > somewhere in poppler/* ? Sure, I'll look for a place where it fits well. Comment on attachment 86849 [details] [review] glib: Add poppler_documents_save_pages() This looks very complex API to me. I haven't looked at the patch in detail, but I would go with something more like: poppler_document_writer_new (); poppler_document_writer_add_page (writer, page, &error); poppler_document_writer_add_page (writer, page, &error); .... poppler_document_writer_write (writer, uri, &error); Or something similar. Created attachment 87030 [details] [review] Add PDFBuilder class I've created a new class PDFBuilder for the creation of PDFs. It has two methods addPage() and saveAs(). The first one adds a "Page" to an internal list and the saveAs() saves all such pages to the given filename. This is quite similar to the PDFWritter class in bug #71213, maybe we could use a common code in the core, and use it both, for printing and for saving specific pages. Looking at the PDFBuilder class the main difference is it allows pages from different documents. It should be easy to add this functionality to PDFWriter. (In reply to comment #5) > This is quite similar to the PDFWritter class in bug #71213, maybe we could > use a common code in the core, and use it both, for printing and for saving > specific pages. I'll try to look at this next week. Thank you Marek So should this be discarded in favour of https://bugs.freedesktop.org/show_bug.cgi?id=71213 ? (In reply to comment #8) > So should this be discarded in favour of > https://bugs.freedesktop.org/show_bug.cgi?id=71213 ? Yes, you are right. I'm closing this as duplicate of the #71213. Regards Marek *** This bug has been marked as a duplicate of bug 71213 *** |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.