From: Ken Sharp Date: Tue, 21 Nov 2017 16:46:18 +0000 (+0000) Subject: PS interpreter - restore the flushpage operator PS interpreter - restore the flushpage operator Michael Katzmann, working at the Library of Congress, is using Ghostscript in a custom application, which also involves a barcode reader and an SQL database. Currently this resides in an RPM at: http://engineering.nlsbph.org/repo/fedora/fedora/updates/27/SRPMS/AddressCard-3.17-LoC.fc27.src.rpm but its not usable without the barcode reader and SQL database.... For reasons which are not completely clear to me, he wants to use flushpage to update the display part way through the operation. We suspect that it would be possible to avoid this, but it would probably require some programming effort on the users part, and since flushpage doesn't look like a likely candidate for abuse, we've decided just to restore it. https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=19ebb5f1f497b6f2d50fe13d17d3e627dfb6c868 --- diff -up ghostscript-9.07/Resource/Init/gs_init.ps.restore_flushpage ghostscript-9.07/Resource/Init/gs_init.ps --- ghostscript-9.07/Resource/Init/gs_init.ps.restore_flushpage 2018-11-28 14:07:09.976249454 +0100 +++ ghostscript-9.07/Resource/Init/gs_init.ps 2018-11-28 14:08:41.225078430 +0100 @@ -2144,7 +2144,7 @@ SAFER { .setsafe } if /.type1execchar /.type2execchar /.type42execchar /.setweightvector /.getuseciecolor /processcolors /.includecolorspace /.execn /.instopped /.stop /.stopped /.setcolorrendering /.setdevicecolorrendering /.buildcolorrendering1 /.builddevicecolorrendering1 /.TransformPQR_scale_WB0 /.TransformPQR_scale_WB1 /.TransformPQR_scale_WB2 /.currentoverprintmode /.copydevice2 -/.devicename /.doneshowpage /flushpage /.getbitsrect /.getdevice /.getdefaultdevice /.getdeviceparams /.gethardwareparams +/.devicename /.doneshowpage /.getbitsrect /.getdevice /.getdefaultdevice /.getdeviceparams /.gethardwareparams /makewordimagedevice /.outputpage /.putdeviceparams /.setdevice /.currentshowpagecount /.setpagedevice /.currentpagedevice /.knownundef /.setmaxlength /.rectappend /.initialize_dsc_parser /.parse_dsc_comments /.fillCIDMap /.fillIdentityCIDMap /.buildcmap /.filenamelistseparator /.libfile /.getfilename @@ -2162,6 +2162,15 @@ SAFER { .setsafe } if /.systemvmSFD /.settrapparams /.currentsystemparams /.currentuserparams /.getsystemparam /.getuserparam /.setsystemparams /.setuserparams /.checkpassword /.locale_to_utf8 /.currentglobal /.gcheck /.imagepath +% Used by a free user in the Library of Congress. Apparently this is used to +% draw a partial page, which is then filled in by the results of a barcode +% scanner and SQL database lookup. Its not clear to us exactly why this needs to be +% done as a partial page, but its easiest to restore the operator, and it seems like +% its a reasonably safe operator to restore, for the *very* few devices on which +% it will have any effect. Currently this uses the 'sync_outptu' device method +% to transfer the partial page, in future we may use a spec_op instead. +%/flushpage + % Used by our own test suite files %/.fileposition %image-qa.ps %/.makeoperator /.setCPSImode % gs_cet.ps