A Dimarts, 4 d'octubre de 2011, Glad Deschrijver vàreu escriure: > Hi, > > Thanks Albert for committing my previous patches. > > On Saturday 01 October 2011, Albert Astals Cid wrote: > > A Dijous, 29 de setembre de 2011, vàreu escriure: > > > I also want to be able to save a single page from a PDF file in a > > > new PDF file. I guess the cleanest way to do this will be to add a > > > function "savePageAs(const QString &exportFilePath, int page)" to > > > Poppler::Document. Is that OK? > > > > No, please add a void setPageList(const QList<int> &pageList); like we > > have in PSConverter. > > > > Also it would be great if instead of sending the patches to me directly > > you uses the poppler mailing list at > > http://lists.freedesktop.org/mailman/listinfo/poppler > > Following your request, I implemented setPageList(...) in PDFConverter. In > order to have a similar behavior as in PSConverter (i.e. saving the selected > pages to one file, and not to a file per page), I also added a function > savePagesAs(OutStream *outStr, std::vector<int> pagesList); to PDFDoc. > Since I have no PDF-hacking experience, I copied the code from pdfunite.cc > and adapted it to the new situation. So I hope that the code is decent. At > least it works perfectly on my PDF files.
I see there is quite a bit of code "copied" from the pdfunite sources, do you think you can make it a bit more generic so we only have one source and both functions use that same code? Albert > > Best regards, > Glad > > -- > Truth is stranger than fiction, but it is because fiction is obliged > to stick to possibilities. Truth isn't. > -- Mark Twain _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
