Bug 107599 - add API to create PopplerDocument from FD
Summary: add API to create PopplerDocument from FD
Status: RESOLVED MOVED
Alias: None
Product: poppler
Classification: Unclassified
Component: glib frontend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-16 21:03 UTC by Christian Persch (GNOME)
Modified: 2018-08-21 10:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch (24.57 KB, patch)
2018-08-16 21:03 UTC, Christian Persch (GNOME)
Details | Splinter Review

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.