Bug 112426 - Proposal for a PDF import settings dialogue
Summary: Proposal for a PDF import settings dialogue
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.4.1.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Import-Draw Dialog
  Show dependency treegraph
 
Reported: 2017-09-16 10:16 UTC by OfficeUser
Modified: 2017-09-18 13:06 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
PDF_import_settings_proposal_v1.0.odg (119.42 KB, application/vnd.oasis.opendocument.graphics)
2017-09-16 10:21 UTC, OfficeUser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description OfficeUser 2017-09-16 10:16:25 UTC
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.)
Comment 1 OfficeUser 2017-09-16 10:21:25 UTC
Created attachment 136282 [details]
PDF_import_settings_proposal_v1.0.odg
Comment 2 Yousuf Philips (jay) (retired) 2017-09-17 12:10:12 UTC
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?
Comment 3 OfficeUser 2017-09-17 13:28:57 UTC
@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.
Comment 4 V Stuart Foote 2017-09-17 14:58:16 UTC
(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.
Comment 5 Yousuf Philips (jay) (retired) 2017-09-17 15:44:33 UTC
(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.
Comment 6 Cor Nouws 2017-09-17 18:05:37 UTC
(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.
Comment 7 Heiko Tietze 2017-09-18 08:54:16 UTC
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
Comment 8 Miklos Vajna 2017-09-18 09:59:14 UTC
(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.
Comment 9 OfficeUser 2017-09-18 13:06:28 UTC
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.