[Poppler-bugs] [Bug 99717] New: Add StdOut piping for PdfToCairo
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Feb 9 06:02:08 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=99717
Bug ID: 99717
Summary: Add StdOut piping for PdfToCairo
Product: poppler
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: medium
Component: utils
Assignee: poppler-bugs at lists.freedesktop.org
Reporter: todd.hubers at alivate.com.au
It already supports StdIn, but not StdOut piping. There's a reason for this:
PdfToCairo may output many files. But there is a workable design.
The design:
- Packaging multiple files in a single stream
-- A) Tar/Zip (or other) file container set to store-only compression; OR
-- B) A serialisation protocol delimit files in a stream
- When this packaging option is used, allow StdOut
Packaging with [A] or [B]?
A) Would be most difficult to develop. Most of the work would be involved with
Tar/Zip, being an extra layer of abstraction to work with, and probably a new
external library required. With publishing of the protocol, consumption of the
packaged stream will be simple enough, but not standard (like tar or zip)
B) No need to add new external libraries, and can be designed to work best with
the existing architecture.
i) A delimiter could be used (eg. hex 0x00 repeated 10 times - which no
jpg/png/svg output would ever do).
ii) However, the safest first option, is to cache the file in memory, then send
the file size first, then the file bytes. A final 0 byte length indicates there
are no more files. This option better aligns with the concept of file streams,
where a virtual memory stream has a matching close function, which triggers the
packaged stream output.
Note: I try to keep the ideas of Packaged Stream, and StdOut separate. Packaged
Stream could be saved directly to file, or redirected over StdOut.
Why:
- I'm using this mainly on Windows - see [blog.alivate.com.au/poppler-windows/]
- I use StdIn, to save on writing a temporary file to disk ( Need a name, need
a folder, need to delete after using, need to periodically clean )
- Being forced to output to files, means I still have some annoyance
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20170209/642d5b03/attachment.html>
More information about the Poppler-bugs
mailing list