~ubuntu-branches/ubuntu/hardy/ghostscript/hardy

« back to all changes in this revision

Viewing changes to lib/pdf_sec.ps

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2007-11-22 12:17:43 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071122121743-cd70s3ypq0r243mp
Tags: 8.61.dfsg.1-0ubtuntu1
* New upstream release
  o Final 8.61 release
* debian/patches/09_ijs_krgb_support.dpatch: Adapted to upstream changes.
* debian/rules: Updated CUPS-related variables for "make install" calls.
* debian/rules: Remove /usr/include/ghostscript from the ghostscript
  package, they go into lings-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
% so long as modified versions are marked as such and copyright notices are
5
5
% not removed.
6
6
 
7
 
% $Id: pdf_sec.ps 7670 2007-02-02 18:54:09Z alexcher $
 
7
% $Id: pdf_sec.ps 8329 2007-10-28 17:17:47Z alexcher $
8
8
% Implementation of security hooks for PDF reader.
9
9
 
10
10
% This file contains the procedures that have to take encryption into
313
313
} bind def
314
314
 
315
315
% As .pdfrun, but decrypt strings with key <key>.
 
316
/PDFScanRules_true << /PDFScanRules true >> def
 
317
/PDFScanRules_null << /PDFScanRules null >> def
316
318
/.decpdfrun                     % <file> <keystring> <opdict> .decpdfrun -
317
319
 {      % Construct a procedure with the file, opdict and key bound into it.
318
 
   2 index cvlit mark mark 5 2 roll
 
320
   2 index cvlit mark
 
321
   /PDFScanRules .getuserparam //null eq {
 
322
     //PDFScanRules_true { setuserparams } 0 get % force PDF scanning mode
 
323
     mark 7 4 roll
 
324
   } {
 
325
     mark 5 2 roll
 
326
   } ifelse
319
327
    { .pdftoken not { (%%EOF) cvn cvx } if
320
328
      dup xcheck
321
329
       { PDFDEBUG { dup == flush } if
374
382
      ifelse
375
383
    }
376
384
   aload pop .packtomark cvx
377
 
   /loop cvx 2 packedarray cvx
378
 
    { stopped /PDFsource } aload pop
379
 
   PDFsource
 
385
   { loop } 0 get 2 packedarray cvx
 
386
    { stopped } 0 get
 
387
   /PDFScanRules .getuserparam //null eq {
 
388
     //PDFScanRules_null { setuserparams } 0 get % reset PDF scannig mode if it was off
 
389
   } if
 
390
   /PDFsource PDFsource
380
391
    { store { stop } if } aload pop .packtomark cvx 
381
392
   /PDFsource 3 -1 roll store exec
382
393
 } bind def
 
394
currentdict /PDFScanRules_true undef
 
395
currentdict /PDFScanRules_null undef
383
396
 
384
397
% Run the code to resolve an object reference.
385
398
/pdf_run_resolve