Bug 107599

Summary: add API to create PopplerDocument from FD
Product: poppler Reporter: Christian Persch (GNOME) <chpe>
Component: glib frontendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: patch

Description Christian Persch (GNOME) 2018-08-16 21:03:24 UTC
Created attachment 141154 [details] [review]
patch

There is API to create PopplerDocument from a filename, GFile, GInputStream, but not a simple FD. While one could wrap a FD into a GUnixInputStream, that's not as convenient or performant.

The attached simple patch adds the necessary API; and while I was at it, also the  corresponding to-fd variants of the save APIs.

The use case for this is FDs pointing to an already unlinked tempfile (which means that one cannot use the open-by-filename APIs).
Comment 1 Albert Astals Cid 2018-08-17 16:47:28 UTC
I'm really not happy when we get workarounds in our code because we collide with other repos type names, why should we be the ones adding workarounds and not the other codes?

Also it's much easier for me if you split the patches that are not glib based since i can review and land those but i don't have enough knowledge to review glib/ stuff so if you put glib and not glib stuff  together in a patch i can't help
Comment 2 Christian Persch (GNOME) 2018-08-17 19:42:08 UTC
(I moved the GDir conflict to bug 107608. Reviewers of the attached patch can ignore [PATCH 1/3] in attachment 141154 [details] [review] and just review the rest.)
Comment 3 GitLab Migration User 2018-08-21 10:34:59 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/271.

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.