RE: Text flow in PDF
Not really - all the PDF modules I've seen seem to allow me to place text on the page, but only at co-ordinates. I'd rather be able to place say four paragraphs, and have the module flow them so that they fit defined margins, that widows and orphans are controlled, page breaks nicely set out, y'know BTW, my ISP (BusinessServe.co.uk) have decided to charge all their customers £80 to access their accounts via the internet: obviously it's a point of principle, I'm not paying, no I'm not getting pop3 atm. Grrr.! cheers, lee --- Lee Goddard: LBLtd: Perl/XML/Java/C Internet AI --- It is true, I never assisted the sun materially in his rising, but, doubt not, it was of the last importance only to be present at it. - Thoreau, *Walden* -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Oliver Manickum Sent: 10 October 2001 10:28 To: [EMAIL PROTECTED] Subject: RE: Text flow in PDF Hey Lee, Are you talking about Editing the PDF to format it ?.. - Olly -- From: Lee Goddard [mailto:[EMAIL PROTECTED]] Subject: Text flow in PDFI know about Formatting Object and don't have time to set up the servers - is there another way to flow text in a PDF doc? Auto-paragraphing, etc? I've looked at all the PDF::* pods, and seen nothing - is it my job to write them for CPAN...? TIA lee ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Perlscript
I have a question. I wrote a perl script and included it into an ASP page using Perscript with no problem. The thing is that when I hit the refresh button of the web explorer the page doesnt come out. It comes out only the first time I load it. What could be the reason? Unless there's some known problem with refreshes, it could be any number of things. Could some state-management code in your page be causing the response to end early? On the other hand, I've seen PerlScript (or maybe it's IIS?) do some very annoying things when error conditions occur, and I wouldn't be surprised if a blank page was one of them. Some code would help. jpt ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
why does @array[$num, $num] have *two* elements?
Presumably affects all versions of perl -- but how come if you run: @array = ('a', 'b', 'c'); print join( , @array[0,0]), \n; you get an array with *two* elements, i.e. the script prints a a? @array[0,0] ought to return an array with *one* element, with that element being $array[0]. This would be consistent with the properties of arrays that are returned for @array[x,y] when y x -- i.e., the number of elements is y - x + 1. I guess it's up to the language designers, but I think it was a bad decision. It's one more special case that you have to check for, because it's inconsistent behavior. -Bennett [EMAIL PROTECTED] http://www.peacefire.org (425) 649 9024 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Perl Win32 - disable cmd dialog popups?
I don't know a way to actually disable the popup, but you can at least hide it. I did this in win2k, but there should be a similar method in other versions. Make a shortcut to your script. When you run the shortcut the first time, position and size the cmd dialog so that it's behind your GUI. Then go into the properties for the cmd shell, and uncheck 'let system position window'. When you hit ok, make sure that you check off 'apply settings to shortcut'. The next time you run the shortcut, the cmd dialog will pop up briefly, but then be covered by your script. In my own Perl distribution, there's an executible file in the ./bin directory right alongside perl.exe which is called wPerl.exe. If you use that one instead of Perl.exe to run your script, it runs without a cmd window. Make sure to log your output to a file, 'cause you'll never see it! The reason wPerl runs without a console is because it is marked as a WINDOWS application instead of a CONSOLE application. This setting can be manipulated using the EDITBIN.exe program that comes with Visual C++. So you could create your own non-windowing perl by copying perl.exe and then running EDITBIN on it to set its subsystem to WINDOWS. The good news is that it looks like someone has already done this for you. jpt ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: why does @array[$num, $num] have *two* elements?
You are confused. @array[$x,$y] returns and array of the two elements of @array with indexes $x an $y. @array[$x..$y] returns and array of the elements between index $x and $y, includive. -- Simon Oliver Bennett Haselton wrote: Presumably affects all versions of perl -- but how come if you run: @array = ('a', 'b', 'c'); print join( , @array[0,0]), \n; you get an array with *two* elements, i.e. the script prints a a? @array[0,0] ought to return an array with *one* element, with that element being $array[0]. This would be consistent with the properties of arrays that are returned for @array[x,y] when y x -- i.e., the number of elements is y - x + 1. I guess it's up to the language designers, but I think it was a bad decision. It's one more special case that you have to check for, because it's inconsistent behavior. -Bennett [EMAIL PROTECTED] http://www.peacefire.org (425) 649 9024 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: why does @array[$num, $num] have *two* elements?
Yep. Oops. :) -Bennett At 12:01 PM 10/12/2001 +0100, Simon Oliver wrote: You are confused. @array[$x,$y] returns and array of the two elements of @array with indexes $x an $y. @array[$x..$y] returns and array of the elements between index $x and $y, includive. -- Simon Oliver Bennett Haselton wrote: Presumably affects all versions of perl -- but how come if you run: @array = ('a', 'b', 'c'); print join( , @array[0,0]), \n; you get an array with *two* elements, i.e. the script prints a a? @array[0,0] ought to return an array with *one* element, with that element being $array[0]. This would be consistent with the properties of arrays that are returned for @array[x,y] when y x -- i.e., the number of elements is y - x + 1. I guess it's up to the language designers, but I think it was a bad decision. It's one more special case that you have to check for, because it's inconsistent behavior. -Bennett [EMAIL PROTECTED] http://www.peacefire.org (425) 649 9024 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users [EMAIL PROTECTED] http://www.peacefire.org (425) 649 9024 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Downloading file.
Hello all, I have a problem about sending file to user. I made one zip file containing one text file and send this file to user. User only receives the file but no content in it. What's wrong I made to this script? my script: $file=test.zip; print HeaderSent; Content-Type: application/octet-stream; name=$file Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=$file Expires=0 HeaderSent TIA. Krung ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Embedding Perl
About two years ago I had heard that there were methods for embedding VB in Perl. At that time, though, I was unable to find any information on how to do it. Since that time, I have a desire to embed Perl in VB, using VB just for GUI creation. Can it be done? And, if it can be done, does anyone know of the sources for instructions on how to do it? Thanks in advance. Brad Smith ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Downloading file.
Hi, Krung, Apparently you didn't sent the actual file, only the header. You need to read it from the file handle and print it out to your output stream. I assume this must be: use constant BUFFERSIZE = 65536; binmode $filehandle; binmode OUTPUT; # This is your OUTPUT stream while ( read ( $filehandle, $buffer, BUFFERSIZE ) ) { print OUTPUT, $buffer; } HTH, Alexei -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Krung Saengpole Sent: Friday, October 12, 2001 3:34 PM To: [EMAIL PROTECTED] Subject: Downloading file. Hello all, I have a problem about sending file to user. I made one zip file containing one text file and send this file to user. User only receives the file but no content in it. What's wrong I made to this script? my script: $file=test.zip; print HeaderSent; Content-Type: application/octet-stream; name=$file Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=$file Expires=0 HeaderSent TIA. Krung ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: Embedding Perl
MATA Tech wrote: About two years ago I had heard that there were methods for embedding VB in Perl. At that time, though, I was unable to find any information on how to do it. Since that time, I have a desire to embed Perl in VB, using VB just for GUI creation. Can it be done? You can create ActiveX objects in Perl with the PDK from ActiveState (look for PerlCtrl): http://www.activestate.com/Products/Productivity/Perl_Dev_Kit/index.html#features Or maybe you can access the Windows Scripting Host somehow, then write your stuff using PerlScript. Please report back to the list if you succeed. /J -- --- -- -- -- - - --- Johan LindströmBoss Casinos Sourcerer [EMAIL PROTECTED] http://www.bahnhof.se/~johanl/ If the only tool you have is a hammer, everything tends to look like a nail ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Downloading file.
My script works!!! but have to modify a little. Thank you very much. Krung. -- Original Message -- From: Alexei Danchenkov [EMAIL PROTECTED] Date: Fri, 12 Oct 2001 15:54:51 +0400 Hi, Krung, Apparently you didn't sent the actual file, only the header. You need to read it from the file handle and print it out to your output stream. I assume this must be: use constant BUFFERSIZE = 65536; binmode $filehandle; binmode OUTPUT; # This is your OUTPUT stream while ( read ( $filehandle, $buffer, BUFFERSIZE ) ) { print OUTPUT, $buffer; } HTH, Alexei -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Krung Saengpole Sent: Friday, October 12, 2001 3:34 PM To: [EMAIL PROTECTED] Subject: Downloading file. Hello all, I have a problem about sending file to user. I made one zip file containing one text file and send this file to user. User only receives the file but no content in it. What's wrong I made to this script? my script: $file=test.zip; print HeaderSent; Content-Type: application/octet-stream; name=$file Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=$file Expires=0 HeaderSent TIA. Krung ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Text flow in PDF
From: Morse, Richard E [mailto:[EMAIL PROTECTED]] Sent: 12 October 2001 13:16 To: 'Lee Goddard' Subject: RE: Text flow in PDF As I understand it, PDF does not define the concept of a paragraph -- PDF works with characters, and it is up to the program to use the font metrics That's exaclty my point! - is there a perl mod that does this?! to determine how wide the characters are, and thus where the line should break. If you can determine how to do a flowed paragraph, it would be way cool -- I wanted to do some layout stuff, but I couldn't figure out how to access the font metrics from Perl, so I wound up doing ugly guessing games and tricks with monospaced fonts... Ugh! Formatting Objects and XSLT is a better way to go but I guess I'll end up doing the font metric stuff one day - if you don't beat me to it (please, beat me to it!). cheers lee ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Embedding Perl
I guess your first port of call should be the VB SDK help files and documentation. Although I don't have the answer to your exact (current) question, here are some pointers that might prove somewhat helpful : You can have a look at WSH (the Windows Script Host), that allows you, via XML tags, to have VBScript, PerlScript and Javascript coexisting in the same script. Have a look at this archive too : http://www.cygwin.com/ml/cygwin/2000-07/msg00975.html http://www.cygwin.com/ml/cygwin/2000-07/msg00975.html And more generally, try your luck on this and other archives as well as google. And while we are at it, here are two small examples of Vbscript embedded in Perl. + # List Network Domains use strict; use Win32::OLE; my $vbscript = Win32::OLE-new('ScriptControl'); $vbscript-{Language} = 'VBScript'; $vbscript-AddCode(VBS); Function List(Arg) Dim NameSpace Dim Domain List = Arg Set NameSpace = GetObject(WinNT:) For Each Domain in Namespace List = List Domain.Name vbCrLf Next End Function VBS my $res=$vbscript-Run('List', List of domains found :\n*** \n), \n; print $res ; + + # List files in root of C: drive use strict; use Win32::OLE; my $vbscript = Win32::OLE-new('ScriptControl'); $vbscript-{Language} = 'VBScript'; $vbscript-AddCode(VBS); Function List(Arg) set fs = CreateObject(Scripting.FileSystemObject) set drivec = fs.GetDrive(C:\) set root = drivec.RootFolder List = Arg for each file in root.files List = List file.name vbCrLf next End Function VBS my $res=$vbscript-Run('List', Files found in C:\\ \n** \n); print $res ; + _ Bruno Bellenger Sr. Network/Systems Administrator -Original Message- From: MATA Tech [SMTP:[EMAIL PROTECTED]] Sent: Friday, October 12, 2001 1:43 PM To: [EMAIL PROTECTED] Subject:Embedding Perl About two years ago I had heard that there were methods for embedding VB in Perl. At that time, though, I was unable to find any information on how to do it. Since that time, I have a desire to embed Perl in VB, using VB just for GUI creation. Can it be done? And, if it can be done, does anyone know of the sources for instructions on how to do it? Thanks in advance. Brad Smith ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: Advice on posting .....
On Thursday 11 October 2001 1:14 pm, Jackson, Vic wrote: Hi, I posted my first query a week ago, but have not heard from anyone(sob!) What is more important than this query is for me to understand the right way of doing things. So, this separate posting is asking for advice/opinions on this dearth of interest in my little problem :-) Wrong group? Problem poorly defined? Answer not obvious? .. ? AFAIK, this group is for generic discussion and help of people using perl on windows systems. Your question doesn't have to be windows specific, but also shouldn't be specific to some non-windows platform (i.e. Linux posts are out). Your question was well phrased - basically it wasn't a Can someone tell me how to do this because I can't be bothered to look in the docs question, it was more a I've tried this, it doesn't work, here's the code kind of question. The above is my personal opinion. I've tried your FTP script from linux to linux and from windows 95 to another linux server, and it worked both times so I think the problem may lie with the specific server you are trying it on (try running an anonymous FTP to some public site such as ftp.kernel.org). ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
RE: Text flow in PDF
Not really - all the PDF modules I've seen seem to allow me to place text on the page, but only at co-ordinates. I'd rather be able to place say four paragraphs, and have the module flow them so that they fit defined margins, that widows and orphans are controlled, page breaks nicely set out, y'know I believe I used Text::Wrap for this situation. At the time, I used PDF::Create (I hope that's the correct name). Still had to position the start of the text to coordinates, but the Text::Wrap helped. Not the prettiest solution, but as I was creating PDFs from a fixed DB, I queried the DB for appropriate fields to see what the longest possible filed was. From this, I could determine the maximum number of lines and thus how much space on the coordinate system to allow. For what I was doing, this worked out fairly good, though the coordinate-free solution you describe sounds nicer. Dealing with fixing text to coodinates was a pain. Note that there are some newer PDF modules out that really sound nice. - Eric ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
Re: why does @array[$num, $num] have *two* elements?
On Fri, 12 Oct 2001, Bennett Haselton wrote: Presumably affects all versions of perl -- but how come if you run: @array = ('a', 'b', 'c'); print join( , @array[0,0]), \n; you get an array with *two* elements, i.e. the script prints a a? @array[0,0] ought to return an array with *one* element, with that element being $array[0]. This would be consistent with the properties of arrays that are returned for @array[x,y] when y x -- i.e., the number of elements is y - x + 1. I guess it's up to the language designers, but I think it was a bad decision. It's one more special case that you have to check for, because it's inconsistent behavior. Its not inconsistnet at all if you understand what the semantic are rather than what you think they ought to be. What do you get if you do: print join( , @array[0,1,2,2,1,0]), \n; ? You are not accessing an array element but rather an array slice. The stuff between the [] becomes the list of elements that are to be returned. [EMAIL PROTECTED] Carl Jolley All opinions are my own and not necessarily those of my employer ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users