I often have to deal with PDF documents that have several hundreds or even thousands of pages. Often I need to import only a page or an element. Current PDF impport implementation ob Draw only allows to import complete documents. The problem I experience is that such big documents are very time and memory consuming and can even run the application out of memory. The attached proposal contains a mock-up that allows the user to change PDF import settings after opening the PDF file in Draw before the import progress starts. These settings settings allow the user to reduce the amount of data to be processed by the PDF import filter on a page as well as a object base. (It might be considered to implement page selection only in a first step and object selection in later versions.)
Created attachment 136282 [details] PDF_import_settings_proposal_v1.0.odg
Seems reasonable to me, but doubt we'd do it in the file open dialog, but more likely in the Insert > File dialog, which already has the facility to select which pages that you'd want to import, but doesnt have the ability yet to import from pdfs. @Heiko, @Cor, @Stuart: what's your take?
@Yousuf: My suggestion has nothing to do "Insert > File dialog". It is intended to be displayed after opening a PDF with file/open. At the moment always the complete document is imported into Draw.
(In reply to Yousuf Philips (jay) from comment #2) > Seems reasonable to me, but doubt we'd do it in the file open dialog, but > more likely in the Insert > File dialog, which already has the facility to > select which pages that you'd want to import, but doesnt have the ability > yet to import from pdfs. > > @Heiko, @Cor, @Stuart: what's your take? Sure it would be useful, but where it gets added to the UI is less of an issue than how the "preview" gets generated for use in a LO document. As LibreOffice is _not_ a PDF editor--this filtered opening can continue to be seen as now with import to Draw as Draw objects, except enhancing to select either the entire document or adding an ability to select pages or even elements from a source PDF. That would extend the pdfio filter. Or alternatively, as done for bug 89727, we insert a PDF as image to a document of any LibreOffice component--currently just the first page of a PDF document. Enhancement would add ability to select from any page of a source PDF. That would extend the ipdf filter. For either usage now, selection(s) from the source PDF must be external to LO. But it would _not_ be helpful to drag a full PDF through pdfio filter just to render a preview for use in page selection. That makes no sense and is clearly a WONTFIX when there are any number of external programs to do that with now. But I would defer to Miklos' sensibilities as I know he has more in mind with the ipdf (pdfium based filter) and that enhancement may provide better preview/selection of page(s) for insertion.
(In reply to OfficeUser from comment #3) > @Yousuf: My suggestion has nothing to do "Insert > File dialog". > > It is intended to be displayed after opening a PDF with file/open. I understand your suggestion, but having a dialog interrupt the opening of a file isnt something we do other formats, so doing it with opening a pdf isnt something i would be for and have suggested another means to achieve what you are hoping for.
(In reply to V Stuart Foote from comment #4) > But it would _not_ be helpful to drag a full PDF through pdfio filter just > to render a preview for use in page selection. That makes no sense and is > clearly a WONTFIX when there are any number of external programs to do that > with now. Indeed, for the moment I would start using those, officeuser.
There are plenty of PDF tools to merge or split files [1]. LibreOffice is not a PDF editor and this request is out of scope to me. [1] https://duckduckgo.com/?q=split+pdf
(In reply to V Stuart Foote from comment #4) > But I would defer to Miklos' sensibilities as I know he has more in mind > with the ipdf (pdfium based filter) and that enhancement may provide better > preview/selection of page(s) for insertion. I don't have a strong opinion on this. The long-term plan would be that LO provides a skia(-compatible) drawing surface and pdfium can draw on that, so pdfium would give vector output, and at that stage we can probably drop the poppler-based pdf import. But neither pdfium nor LO is ready for that today.
Hi guys, thanks for your comments. @V Stuart Foote: >> Sure it would be useful, but where it gets added to the UI is less of an issue than how the "preview" gets generated for use in a LO document. >> ... >> But it would _not_ be helpful to drag a full PDF through pdfio filter just to render a preview for use in page selection. >> ... >> But I would defer to Miklos' sensibilities as I know he has more in mind with the ipdf (pdfium based filter) and that enhancement may provide better preview/selection of page(s) for insertion. I agree that generating previews by "drag a full PDF through pdfio" makes no sense while the intention of my proposal is to REDUCE the date that needs to be processed by the filter. I cannot say something about "ipdf (pdfium based filter)". It would be great if it can be used for this purpose because especially on windows platform we cannot expect a ghostscript installation for every user. @ Yousuf Philips (jay) >> I understand your suggestion, but having a dialog interrupt the opening of a file isnt something we do other formats... I see your point. But PDF is a very complex format that can easily push LibreOffice and the hardware to it's limits. In addition I do not expect that there are many users that use LibreOffice as every-day PDD viewer. So I think most users should not have any problem with such a dialog. Please also consider that this doialog can be set to all pages by default so that the users just need to click OK to have the old behavior of a complete import. @Heiko: >> There are plenty of PDF tools to merge or split files [1]. LibreOffice is not a PDF editor and this request is out of scope to me. I don't agree. We are talking about convinience here. With your argument, LibreOffice would also need no PDF export. But PDF export has become a very appreciated feature of LibreOffice.
*** This bug has been marked as a duplicate of bug 114234 ***