-dSAFER disables certain scary features of ghostscript
(like arbitrary file access). Its primarily about postscript
security, but enable it for pdfs to be safe.
Bug: T136402
Change-Id: I0ab37ddb5d134334e975bc07d3b9ba7bfc7a5659
Everything is properly escaped so it doesn't matter, but as an
extra bit of safety, cast width/height/page to int, in order to
ensure under no circumstances would something unexpected be fed
to ghostscript.
Change-Id: I961a3dae5801dd116e1cb6c93808d49268d1e81e
Pass the newly added param to the next function to get it passed to
FormatMetadata
Follow-Up: Ib1f5af01c13cd2a5a4570a4be411ae314a6fc541
Follow-Up: I92774e1a88f03d44967d1797c6c2b8a31c1b10fc
Change-Id: I6801939f8c3e985004f2d57ac6664e298a9996b6
This change causes wiki syntax like
[[File:Foo.pdf|thumb|Page 7 of document]]
to be interpreted as a caption instead, of saying select page 7
of the pdf. Previously it eventually ran intval( '7 of document' ),
so flipped to page 7.
Only possible downside I could see is this would cause things like
left-to-right marks and weird unicode spaces to no longer be ignored.
I don't think that's a big deal.
Change-Id: Ib98510a0473458fdc9cdecdb7f75676488b4c5c8
Ensure all shell arguments are escaped individually.
This relies on Ica8e37d1c1bea3b68c0165109aa7b9330fe9128a.
Bug: 60339
Change-Id: I80cdb459ebebe8fa480ab2ccad7faab29fcf78fe
This code was left over and forgotten about from my gsoc project
back in 2010 (made minor modifications)
(note about message named: they start with "exif-" to be compatible
built in metadata code, which uses that prefix to be compatible with
the older messages).
Change-Id: I9e546d9e6ae9a60604c9dd1633cb2225c9d1109d
* remove no longer accurate code comment
* set default values for the processor commands, otherwise it's totally confusing that not only doesn't it work, but it looks like it's just not installed
* added a comment about adding to $wgFileExtensions -- not doing it automatically since some wikis might want to *use* PDFs from a shared server without locally uploading them.... mebbe... dunno... keeping this one open for now. ;)
* Use a nice simple PHP array instead of constructing unnecessary XML. This removes the dependency on PHP 5.1.3 for a SimpleXML method.
* Tell pdfinfo to give us metadata encoded in UTF-8. If we start outputting title and creator info this will be nice!
* Tell pdfinfo to give us page size information for all pages (at least through page 99999 :) rather than just the first page
* Make use of that per-page size information so we can properly render pages of differing size. Without this, they get stretched or squooshed in interesting days.
* Rename the pdf_no_xml message to pdf_no_metadata (in English)