403Webshell
Server IP : 81.2.241.106  /  Your IP : 216.73.216.165
Web Server : Apache/2.4.67 (Debian)
System : Linux tranq-f.bakta.org 5.10.0-45-amd64 #1 SMP Debian 5.10.259-1 (2026-07-02) x86_64
User : lisky ( 1002)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/bin/prn2ps
#!/usr/bin/perl
# $Id$
$VERSION{'PUBLIC'} = '2.000';
$VERSION{''.__FILE__} = '$Revision$';
#
# >>Title::     PostScript Conversion Utility
#
# >>Copyright::
# Copyright (c) 1992-1997, Ian Clatworthy (ianc@mincom.com).
# You may distribute under the terms specified in the LICENSE file.
#
# >>History::
# -----------------------------------------------------------------------
# Date      Who     Change
# 18-Jul-97 ianc    SDF 2.000
# -----------------------------------------------------------------------
#
# >>Purpose::
# {{CMD:prn2ps}} converts Windows PostScript to Unix PostScript.
# The input to this program is typically generated by printing
# to a PostScript printer connected to the FILE: logical device.
# The output can be converted to Encapsulated PostScript using
# GhostScript's {{CMD:p2epsi}} program.
#
# >>Description::
# !SDF_OPT_STD
#
# For each input file, the output is generated by:
#
# * deleting the {{PageSize}} information
# * deleting the control-D at the end of the file.
#
# >>Limitations::
# If {{CMD:ps2epsi}} doesn't like the output, you may need to
# use another printer driver to generate the input.
# On Windows NT 4.0, the {{Canon PS-IPU Color Laser Copier v52.3}}
# driver works most of the time.
#
# >>Examples::
# To generate an Encapsulated PostScript file from Windows PostScript:
#
# >  prn2ps -ops myfig.prn
# >  ps2epsi myfig.ps
#
# >>Implementation::
#

require "sdf/app.pl";

########## Initialisation ##########

# define configuration
%app_config = (
    'libdir',   'sdf/home',
);

# define options
#push(@app_option, (
#    #'Name|Spec|Help',
#));

# handle options
&AppInit('prn_file ...', "convert Windows PostScript to Unix PostScript",
  'SDF') || &AppExit();

########## Processing ##########

sub argProcess {
    my($ARGV) = @_;
#   my();
    local($_);
    
    # Open the input
    unless (open(FILE, $ARGV)) {
        &AppMsg("abort", "failed to open '$ARGV'");
        return;
    }

    # Generate the output
    my $end = '';
    while (<FILE>) {
        if ($end) {
            $end = '' if /^\Q$end/;
            next;
        }
        elsif (index($_, '%%BeginFeature: *PageSize') == 0) {
            $end = '%%EndFeature';
            next;
        }
        next if /^\004/;    # Ignore the terminating ^D
        print;
    }
    close(FILE);

}

&AppProcess('argProcess');
&AppExit();

Youez - 2016 - github.com/yon3zu
LinuXploit