Open BillTheGoat opened 7 years ago
The CPDF library is currently based on the PDF 1.3 spec so we'd need to go about updating to a newer version of the spec before we start adding in enhancements like this. Unless there is similar functionality in the 1.3 spec, but I'd need to research that.
I searched through the PDF 1.3 Spec and there is nothing there, so obviously you guys will not be touching this.
I have a very newb question:
I went and declared the pdf asPDF-1.7
in CPDF, and it displays fine in Acrobat Reader. If I privately integrated that change, and tried to get video working, would the sky fall, or are the specs basically the same other than additions?
I haven't taken a good look at the changes between 1.3 and 1.7. I would imagine that for the most part things should work fine. But you may want to run your resulting PDF through a validator to see if any serious problems are found. I put together a list at one point in issue 517.
@BillTheGoat just curious but isn't the point of PDF cross-platform viewing, and, mostly, print? I'm struggling to see what place video has in PDF files
I know you can put them there with enough effort and time but why?
🤔 that is a good question. I've always been one for examining the challenge over the viability/need.
The dompdf team is focused on rendering static content to the PDF. And when you consider the many more urgent issues we need to address I don't know when/if we would get around to developing this feature.
The use cases vary. It was included in the spec because influential users wanted it there, as far as I know mainly in health care and to some extent finance. My use case is because people expect pdfs from me, but they also expect presentations, and I can't just send them to a web page (I certainly wish I could). Honestly, pdf has as many uses as there are users, and what it was first intended for is not what people use it for, so the spec grows organically to allow for at least some of the major desired uses. Obviously Adobe and other pdf display vendors go out of their way to ensure that things in the spec are supported cross-platform, and this has been in the spec for almost a decade. My fight is on the production side, not the display side, which I will happily let them work out.
@bsweeny, you skipped a word so I am not sure what you meant...
(edited my previous comment)
The PDF spec does allow for use cases like this and, though it may seem specious, there are reasons people use PDF documents for this kind of thing. Even if it's not something they would normally recommend.
If you scroll to the section titled "Embedded file streams and multimedia" on http://openpreservation.org/blog/2013/01/09/what-do-we-mean-embedded-files-pdf/, it seems not completely unreasonable to use the cpdf Xobject image method (/lib/Cpdf.php,
protected function o_image($id, $action, $options = '') ...
) as a basis (ie starting point) for writing a video object method.Does this seem like an extremely difficult task? I have never worked inside the pdf spec like this before...