Does anyone know of a good IDE for developing Postscript?
Something with good syntax highlighting, debugging/viewing stack contents, as well as rendering to screen would be ideal.
Code completion would also be nice to have.
Thanks.
Two things:
1. First you will need to quote the file name so your shell knows that you are not trying to pipe test.pl's output:
./test.pl "fileOne|"
2. Second, you should use the 3 argument mode of open.
Something like:
open FILE, '<', $opF or die "$!";
I am creating a custom compressed bitmap font (class 2) and I need some clarification as to how the character data is represented.
Assuming the following character:
width - 8
height - 8
binary character data:
01000001
01000001
01000001
01000001
01000001
01000001
01000001
01000001
After...
I am using Active Perl 5.8.8.
I am trying to remove trailing zeros from floating point numbers.
I also want to remove the decimal point if there is no decimal component.
eg
1.100 => 1.1
2.020 => 2.02
3.003 => 3.003
4.000 => 4
This is what I have:
{
no warnings 'uninitialized';
$_ =~...
Printf will perform decimal to binary conversions without any extra code:
#!/usr/local/bin/perl
##open(DAT, "<", "datafile.txt") || die("Could not open file!\n$!\n"); # uncomment when ready
open(FILE, ">", "output.txt") || die("Could not open file!\n$!\n");
while (<DATA>) # change to 'DAT'...
What output are you expecting to the file?
Do you want to print the same text to the file as is printing to the console?
What does "datfile.txt" contain?
At first glance it looks like you are doing a lot of unnecessary work shifting bits when printf will convert the numbers to binary...
I am running Adobe Reader version 9.1.0 on Windows Vista Business SP1.
I am trying to convert several thousand pdf files into pcl macro overlays by printing to file with an HP LaserJet 4 driver.
According to Adobe's support documentation here and here I can run the following command at the...
Aha! I knew I was making a silly logic error somewhere!
Thank you for your help Annihilannic.
I changed peek() to the following, which works as expected:
sub peek {
my ($nextChar) = @_;
my ($pos, $nextRecord);
$pos = tell DATA;
$nextRecord = <DATA>;
seek (DATA, $pos, 0)...
Here is a commented version of the code.
This should (hopefully) be clearer.
(Please note that the offsets will be incorrect now).
#! /usr/bin/perl
use warnings;
use strict;
use constant OFFSET => 3_050;
{
local $/ = \1;
my ($pos, $line, $command, $value);
# dispatch table...
I am running perl v5.8.0 on Windows Vista via ActiveState perl build 824.
The following code parses HPGL commands out of a print stream and prints the command's offset in the file, the
command, and any parameters.
The code compiles without any errors or warnings when I run "perl -c hpgl2.pl"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.