From jcm at FreeBSD-uk.eu.org Fri Jan 13 14:49:31 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Fri, 13 Jan 2006 14:49:31 +0000 Subject: [cl-pdf-devel] Questions about porting php Cpdf code to cl-pdf Message-ID: <20060113144930.GA47933@dogma.freebsd-uk.eu.org> I have a few pages of php to generate a pdf report with charts. I'm looking to move to Lisp for the core app, but I'm not looking forward to porting the php. I noticed cl-pdf seems to have graphing support built in. Is this the case? Also, how well does it integrate with UCW or Araneida-served pages? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From marc.battyani at fractalconcept.com Sat Jan 14 08:34:39 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Sat, 14 Jan 2006 09:34:39 +0100 Subject: [cl-pdf-devel] Questions about porting php Cpdf code to cl-pdf References: <20060113144930.GA47933@dogma.freebsd-uk.eu.org> Message-ID: <061301c618e5$5c0a3cb0$0a02a8c0@marcxp> "Jonathon McKitrick" wrote: > > I have a few pages of php to generate a pdf report with charts. I'm looking > to move to Lisp for the core app, but I'm not looking forward to porting the > php. > > I noticed cl-pdf seems to have graphing support built in. Is this the case? Yes. See chart.lisp > Also, how well does it integrate with UCW or Araneida-served pages? Very well. Just generate the PDF in memory and then use it to make your HTTP reply. It's more an UCW or Araneida question IMO. Marc From a_bakic at yahoo.com Sat Jan 14 09:12:31 2006 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Sat, 14 Jan 2006 01:12:31 -0800 (PST) Subject: [cl-pdf-devel] Questions about porting php Cpdf code to cl-pdf In-Reply-To: <061301c618e5$5c0a3cb0$0a02a8c0@marcxp> Message-ID: <20060114091231.15355.qmail@web34606.mail.mud.yahoo.com> > Very well. Just generate the PDF in memory and then use it to make your HTTP > reply. It's > more an UCW or Araneida question IMO. In SBCL with Unicode, you might need to dump it into a file, then read back, because of character/byte issues. This is what I use (I intentionally do not use ".pdf" extension): (defun doc-to-uniq-tmpfile (doc) (let ((pathname (loop for name = (random-string 10) for pathname = (merge-pathnames (make-pathname :directory '(:absolute "tmp")) (make-pathname :name name)) ; NOTE: do not set type while (probe-file pathname) finally (return pathname)))) (pdf:write-document pathname doc) pathname)) (defun doc-to-pdf (doc) ; sb-unicode is a pain... (let ((pathname (doc-to-uniq-tmpfile doc))) (prog1 (with-open-file (in pathname :element-type :default) (let ((bytes (make-array (file-length in) :element-type '(unsigned-byte 8)))) (read-sequence bytes in) bytes)) (delete-file pathname)))) Alex __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jcm at FreeBSD-uk.eu.org Sun Jan 15 16:20:34 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Sun, 15 Jan 2006 16:20:34 +0000 Subject: [cl-pdf-devel] Questions about porting php Cpdf code to cl-pdf In-Reply-To: <061301c618e5$5c0a3cb0$0a02a8c0@marcxp> References: <20060113144930.GA47933@dogma.freebsd-uk.eu.org> <061301c618e5$5c0a3cb0$0a02a8c0@marcxp> Message-ID: <20060115162034.GA77180@dogma.freebsd-uk.eu.org> On Sat, Jan 14, 2006 at 09:34:39AM +0100, Marc Battyani wrote: : > Also, how well does it integrate with UCW or Araneida-served pages? : : Very well. Just generate the PDF in memory and then use it to make your HTTP reply. It's : more an UCW or Araneida question IMO. I guess I can just write it to a file instead. That should work fine. -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From jcm at FreeBSD-uk.eu.org Tue Jan 17 13:28:33 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Tue, 17 Jan 2006 13:28:33 +0000 Subject: [cl-pdf-devel] Question about other parameters for draw-image Message-ID: <20060117132833.GA17863@dogma.freebsd-uk.eu.org> I understand the position and preserve-aspect-ration options, but what are the other two options in between supposed to do? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From jcm at FreeBSD-uk.eu.org Tue Jan 17 13:08:03 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Tue, 17 Jan 2006 13:08:03 +0000 Subject: [cl-pdf-devel] Re: cl-pdf translate versus move-text In-Reply-To: <008301c61af4$b7dec450$0a02a8c0@marcxp> References: <20060116222909.GA10061@dogma.freebsd-uk.eu.org> <006801c61af0$44e15890$0a02a8c0@marcxp> <20060116231019.GA10171@dogma.freebsd-uk.eu.org> <008301c61af4$b7dec450$0a02a8c0@marcxp> Message-ID: <20060117130803.GA17647@dogma.freebsd-uk.eu.org> On Tue, Jan 17, 2006 at 12:29:38AM +0100, Marc Battyani wrote: : "Jonathon McKitrick" wrote: : Most of the graphical operators have the same name than in the Adobe PDF reference manual. : So you should start by looking at it. (you can download it on Adobe web site). You can : also start with the examples. Oh, okay. Sorry. The library I was using for php has already corrupted my thinking, so I have to un-learn, apparently. -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From jcm at FreeBSD-uk.eu.org Sun Jan 15 16:21:53 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Sun, 15 Jan 2006 16:21:53 +0000 Subject: [cl-pdf-devel] Questions about porting php Cpdf code to cl-pdf In-Reply-To: <20060114091231.15355.qmail@web34606.mail.mud.yahoo.com> References: <061301c618e5$5c0a3cb0$0a02a8c0@marcxp> <20060114091231.15355.qmail@web34606.mail.mud.yahoo.com> Message-ID: <20060115162153.GB77180@dogma.freebsd-uk.eu.org> On Sat, Jan 14, 2006 at 01:12:31AM -0800, Aleksandar Bakic wrote: : > Very well. Just generate the PDF in memory and then use it to make your HTTP : > reply. It's : > more an UCW or Araneida question IMO. : : In SBCL with Unicode, you might need to dump it into a file, then read back, : because of character/byte issues. This is what I use (I intentionally do not : use ".pdf" extension): I'm a bit unclear on the Unicode issues, but I think writing it to a file is the way I will approach the problem. What Unicode problems are you talking about? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From jcm at FreeBSD-uk.eu.org Mon Jan 16 18:36:36 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Mon, 16 Jan 2006 18:36:36 +0000 Subject: [cl-pdf-devel] Writing to pages from different functions Message-ID: <20060116183636.GA7970@dogma.freebsd-uk.eu.org> Suppose I want to build a document in a modular way, with several different function calls. Once I call (with-document) will each (with-page) simply append to the existing document, so that when I write the document at the end it will contain all the pages added? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From jcm at FreeBSD-uk.eu.org Mon Jan 16 23:10:19 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Mon, 16 Jan 2006 23:10:19 +0000 Subject: [cl-pdf-devel] Re: cl-pdf translate versus move-text In-Reply-To: <006801c61af0$44e15890$0a02a8c0@marcxp> References: <20060116222909.GA10061@dogma.freebsd-uk.eu.org> <006801c61af0$44e15890$0a02a8c0@marcxp> Message-ID: <20060116231019.GA10171@dogma.freebsd-uk.eu.org> On Mon, Jan 16, 2006 at 11:57:47PM +0100, Marc Battyani wrote: : "Jonathon McKitrick" wrote: : > : > what is the difference between (translate) and (move-text)? : > : : Translate, translates origin of the coordinate system. (x and y) : move-text sets the position of the next draw-text. Ah, ok. Is there an online reference to pdf commands I can check when I have these questions? I'd even be willing to submit docstrings as I work my way through the library. It's much better than Cpdf for php, but a good deal harder to figure out. ;-) -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From jcm at FreeBSD-uk.eu.org Tue Jan 17 16:55:33 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Tue, 17 Jan 2006 16:55:33 +0000 Subject: [cl-pdf-devel] Nesting function calls Message-ID: <20060117165532.GA19359@dogma.freebsd-uk.eu.org> Hi all, if I want to build a complex page and call several functions to create the pages, how do I make sure each call has the correct context? Is it enough just to wrap each function in with-document or with-page? That doesn't seem like it would work. -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From jcm at FreeBSD-uk.eu.org Tue Jan 17 21:27:47 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Tue, 17 Jan 2006 21:27:47 +0000 Subject: [cl-pdf-devel] chart.lisp Message-ID: <20060117212747.GB21388@dogma.freebsd-uk.eu.org> The chart module is great! I'm having some trouble figuring out some of the options, though. Is there any documentation at all on the axis options, for example? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From root at common-lisp.net Tue Jan 17 21:32:12 2006 From: root at common-lisp.net (root) Date: Tue, 17 Jan 2006 15:32:12 -0600 (CST) Subject: [cl-pdf-devel] Auto-nag: cl-pdf please update your webpage Message-ID: <20060117213212.C26471906C@common-lisp.net> You are being nagged on because you have not created a sensible default webpage for your project. Please do so or you will be nagged again, tomorrow night. All we ask is that you type in something about the project and perhaps some links to mailinglists etc. See common-lisp.net/project/clo/sp/index.html for a reasonable template. Any questions? You can reach the author of this cronjob at admin at common-lisp.net Thanks! From marc.battyani at fractalconcept.com Tue Jan 17 21:55:43 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 17 Jan 2006 22:55:43 +0100 Subject: [cl-pdf-devel] Nesting function calls References: <20060117165532.GA19359@dogma.freebsd-uk.eu.org> Message-ID: <00a801c61bb0$c3d55550$0a02a8c0@marcxp> "Jonathon McKitrick" wrote: > if I want to build a complex page and call several functions to create the > pages, how do I make sure each call has the correct context? > > Is it enough just to wrap each function in with-document or with-page? That > doesn't seem like it would work. Well, with-page and with document are macros not functions. You have to use (with-document (with-page...) (with-page...) (with-page...) ...) The with-page can be in some function though Marc From marc.battyani at fractalconcept.com Tue Jan 17 22:07:32 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 17 Jan 2006 23:07:32 +0100 Subject: [cl-pdf-devel] chart.lisp References: <20060117212747.GB21388@dogma.freebsd-uk.eu.org> Message-ID: <00bb01c61bb2$6a8e30f0$0a02a8c0@marcxp> From: "Jonathon McKitrick" wrote: > The chart module is great! Thanks :) > I'm having some trouble figuring out some of the options, though. Is there > any documentation at all on the axis options, for example? Sorry but there are no real docs.... Which ones you don't understand? Marc From marc.battyani at fractalconcept.com Tue Jan 17 22:10:06 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 17 Jan 2006 23:10:06 +0100 Subject: [cl-pdf-devel] Writing to pages from different functions References: <20060116183636.GA7970@dogma.freebsd-uk.eu.org> Message-ID: <00bc01c61bb2$c62993a0$0a02a8c0@marcxp> "Jonathon McKitrick" wrote: > Suppose I want to build a document in a modular way, with several different > function calls. Once I call (with-document) will each (with-page) simply > append to the existing document, so that when I write the document at the end > it will contain all the pages added? You don't call with-document and with-page, they are macros not functions so they are expanded not called. Look at: http://www.lisp.org/HyperSpec/Body/sec_3-1-2-1-2-2.html for precisions. There is probably a chapter on macros in PCL: http://www.cl-user.net/asp/web-sites/pcl Marc From marc.battyani at fractalconcept.com Tue Jan 17 22:12:25 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 17 Jan 2006 23:12:25 +0100 Subject: [cl-pdf-devel] Question about other parameters for draw-image References: <20060117132833.GA17863@dogma.freebsd-uk.eu.org> Message-ID: <00c601c61bb3$1904aab0$0a02a8c0@marcxp> "Jonathon McKitrick" wrote: > I understand the position and preserve-aspect-ration options, but what are the > other two options in between supposed to do? The only thing I see between rotation and keep-aspect-ratio is "&optional". What are the 2 options you mention ? Marc From gwking at metabang.com Tue Jan 17 21:42:46 2006 From: gwking at metabang.com (Gary King) Date: Tue, 17 Jan 2006 16:42:46 -0500 Subject: [cl-pdf-devel] Non-unix based Lisps Message-ID: <385CE5AF-E6FE-4DF1-9580-FE38CDD771E7@metabang.com> I was looking at CL-PDF on Digitool's MCL and there are several places in the code that assume #\/ is the directory separator. I'll attach a completed patch using logical pathnames once I've got it all working. Also, if there is interest in making CL-PDF (and CL-Typesetting) ASDF- Installable, I'd be happy to do the work... The only putative disadvantage is that the packages would be signed with my key instead of Marc's. -- Gary Warren King metabang.com http://www.metabang.com/ From peter at gigamonkeys.com Tue Jan 17 23:14:12 2006 From: peter at gigamonkeys.com (Peter Seibel) Date: Tue, 17 Jan 2006 15:14:12 -0800 Subject: [cl-pdf-devel] Non-unix based Lisps In-Reply-To: <385CE5AF-E6FE-4DF1-9580-FE38CDD771E7@metabang.com> References: <385CE5AF-E6FE-4DF1-9580-FE38CDD771E7@metabang.com> Message-ID: <3536A2AD-44B4-4E16-866B-4D4B6D9253FD@gigamonkeys.com> On Jan 17, 2006, at 1:42 PM, Gary King wrote: > I was looking at CL-PDF on Digitool's MCL and there are several > places in the code that assume #\/ is the directory separator. > > I'll attach a completed patch using logical pathnames once I've got > it all working. Is it really necesssarry to use logical pathnames--it seems like a big pain to require folks to set up logical pathnames just to use CL- PDF. Can't the inappropriate uses of #\/ be fixed by basic pathname calculus? -Peter -- Peter Seibel * peter at gigamonkeys.com Gigamonkeys Consulting * http://www.gigamonkeys.com/ Practical Common Lisp * http://www.gigamonkeys.com/book/ From gwking at metabang.com Wed Jan 18 00:56:44 2006 From: gwking at metabang.com (Gary King) Date: Tue, 17 Jan 2006 19:56:44 -0500 Subject: [cl-pdf-devel] Non-unix based Lisps In-Reply-To: <3536A2AD-44B4-4E16-866B-4D4B6D9253FD@gigamonkeys.com> References: <385CE5AF-E6FE-4DF1-9580-FE38CDD771E7@metabang.com> <3536A2AD-44B4-4E16-866B-4D4B6D9253FD@gigamonkeys.com> Message-ID: >> I'll attach a completed patch using logical pathnames once I've >> got it all working. > > Is it really necesssarry to use logical pathnames--it seems like a > big pain to require folks to set up logical pathnames just to use > CL-PDF. Can't the inappropriate uses of #\/ be fixed by basic > pathname calculus? Sorry to be confusing. Yes. It's just pathname calculus (that sounds so fancy!) with make-pathname and merge-pathnames, etc. -- Gary Warren King metabang.com http://www.metabang.com/ From marc.battyani at fractalconcept.com Mon Jan 16 23:29:38 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 17 Jan 2006 00:29:38 +0100 Subject: [cl-pdf-devel] Re: cl-pdf translate versus move-text References: <20060116222909.GA10061@dogma.freebsd-uk.eu.org> <006801c61af0$44e15890$0a02a8c0@marcxp> <20060116231019.GA10171@dogma.freebsd-uk.eu.org> Message-ID: <008301c61af4$b7dec450$0a02a8c0@marcxp> "Jonathon McKitrick" wrote: > > Ah, ok. Is there an online reference to pdf commands I can check when I have > these questions? I'd even be willing to submit docstrings as I work my way > through the library. It's much better than Cpdf for php, but a good deal > harder to figure out. ;-) Most of the graphical operators have the same name than in the Adobe PDF reference manual. So you should start by looking at it. (you can download it on Adobe web site). You can also start with the examples. If you want more high level functions for text, you need to look at cl-typesetting. Marc From root at common-lisp.net Wed Jan 18 06:02:03 2006 From: root at common-lisp.net (root) Date: Wed, 18 Jan 2006 00:02:03 -0600 (CST) Subject: [cl-pdf-devel] Auto-nag: cl-pdf please update your webpage Message-ID: <20060118060203.473FDE068@common-lisp.net> You are being nagged on because you have not created a sensible default webpage for your project. Please do so or you will be nagged again, tomorrow night. All we ask is that you type in something about the project and perhaps some links to mailinglists etc. See common-lisp.net/project/clo/sp/index.html for a reasonable template. Any questions? You can reach the author of this cronjob at admin at common-lisp.net Thanks! From marc.battyani at fractalconcept.com Mon Jan 16 22:57:47 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 16 Jan 2006 23:57:47 +0100 Subject: [cl-pdf-devel] Re: cl-pdf translate versus move-text References: <20060116222909.GA10061@dogma.freebsd-uk.eu.org> Message-ID: <006801c61af0$44e15890$0a02a8c0@marcxp> "Jonathon McKitrick" wrote: > > what is the difference between (translate) and (move-text)? > Translate, translates origin of the coordinate system. (x and y) move-text sets the position of the next draw-text. Marc From jcm at FreeBSD-uk.eu.org Thu Jan 19 16:56:00 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Thu, 19 Jan 2006 16:56:00 +0000 Subject: [cl-pdf-devel] Adding options to x-axis Message-ID: <20060119165600.GA46422@dogma.freebsd-uk.eu.org> There are 3 features I was wondering about. Either I could try to subclass and add them myself, or I could see if they are hidden somewhere I've missed or even being implemented right now. 1. Text labels rather than numbers for x-axis 2. Vertical lines on chart for x-axis. 3. Exact length for x-axis, rather than rounding. I have a chart showing the values of 21 characteristics. I need to label the axis with the characteristic abbreviations, and I'd like the axis to end with the last one, rather than round up to 25. Is this possible at the moment, or should I subclass and add an :after? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From jcm at FreeBSD-uk.eu.org Wed Jan 18 18:29:14 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Wed, 18 Jan 2006 18:29:14 +0000 Subject: [cl-pdf-devel] Status of chart.lisp? Message-ID: <20060118182914.GB33558@dogma.freebsd-uk.eu.org> The note in the source says chart.lisp is in alpha state. Is anyone working on adding new features? Or is it pretty much static at the moment? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From jcm at FreeBSD-uk.eu.org Wed Jan 18 18:21:00 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Wed, 18 Jan 2006 18:21:00 +0000 Subject: [cl-pdf-devel] Question about other parameters for draw-image In-Reply-To: <00c601c61bb3$1904aab0$0a02a8c0@marcxp> References: <20060117132833.GA17863@dogma.freebsd-uk.eu.org> <00c601c61bb3$1904aab0$0a02a8c0@marcxp> Message-ID: <20060118182100.GA33558@dogma.freebsd-uk.eu.org> On Tue, Jan 17, 2006 at 11:12:25PM +0100, Marc Battyani wrote: : "Jonathon McKitrick" wrote: : : > I understand the position and preserve-aspect-ration options, but what are the : > other two options in between supposed to do? : : The only thing I see between rotation and keep-aspect-ratio is "&optional". : What are the 2 options you mention ? Sorry, I misspoke. I meant dx and dy in (draw-image). Obviously they have something to do with sizing the image, but are they just approximate ratios that are corrected if keep-aspect-ratio is t? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From marc.battyani at fractalconcept.com Thu Jan 19 19:51:37 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Thu, 19 Jan 2006 20:51:37 +0100 Subject: [cl-pdf-devel] Adding options to x-axis References: <20060119165600.GA46422@dogma.freebsd-uk.eu.org> Message-ID: <128401c61d31$c5654830$0a02a8c0@marcxp> "Jonathon McKitrick" wrote: > There are 3 features I was wondering about. Either I could try to subclass > and add them myself, or I could see if they are hidden somewhere I've missed > or even being implemented right now. > > 1. Text labels rather than numbers for x-axis > 2. Vertical lines on chart for x-axis. > 3. Exact length for x-axis, rather than rounding. > > I have a chart showing the values of 21 characteristics. I need to label the > axis with the characteristic abbreviations, and I'd like the axis to end with > the last one, rather than round up to 25. > > Is this possible at the moment, or should I subclass and add an :after? For 1, use a format string with the Tilde Slash directive: http://www.lisp.org/HyperSpec/Body/sec_22-3-5-4.html For 2, use pre-draw-chart-fn of post-draw-chart-fn to draw before or after the chart. For 3 you will have to change some code. Marc From divanov at aha.ru Thu Jan 19 19:15:38 2006 From: divanov at aha.ru (Dmitriy Ivanov) Date: Thu, 19 Jan 2006 22:15:38 +0300 Subject: [cl-pdf-devel] Question about other parameters for draw-image References: <20060117132833.GA17863@dogma.freebsd-uk.eu.org><00c601c61bb3$1904aab0$0a02a8c0@marcxp> <20060118182100.GA33558@dogma.freebsd-uk.eu.org> Message-ID: <000001c61d2c$dcb12040$8100a8c0@digo> Hello Jonathon, | On Tue, Jan 17, 2006 at 11:12:25PM +0100, Marc Battyani wrote: | : "Jonathon McKitrick" wrote: | : | : > I understand the position and preserve-aspect-ration options, but | what are the : > other two options in between supposed to do? | : | : The only thing I see between rotation and keep-aspect-ratio is | "&optional". : What are the 2 options you mention ? | | Sorry, I misspoke. I meant dx and dy in (draw-image). Obviously they | have something to do with sizing the image, but are they just | approximate ratios that are corrected if keep-aspect-ratio is t? In this case, some of dx or dy is effectively decreased to fit the image inside the rectangle delineated by the original values of dx and dx. -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From gwking at metabang.com Thu Jan 19 20:03:22 2006 From: gwking at metabang.com (Gary King) Date: Thu, 19 Jan 2006 15:03:22 -0500 Subject: [cl-pdf-devel] Pathname patch for cl-pdf and MCL Message-ID: I'm not sure if the first patch I sent made it through (or if I sent it correctly). This allows cl-pdf to load under MCL. It changes three pathname related calls to use merge-pathnames and make-pathnames. Index: cl-pdf.asd =================================================================== --- cl-pdf.asd (revision 113) +++ cl-pdf.asd (working copy) @@ -22,10 +22,29 @@ (pushnew :uffi cl:*features*) (print "UFFI loaded.")) -(load (merge-pathnames "iterate/iterate.asd" *load-truename*)) +(or (and (find-system 'iterate) + (or (operate 'load-op 'iterate) + (gethash 'load-op (component-operation-times (find- system 'iterate))))) + (let ((asdf-file (merge-pathnames + (make-pathname + :name "iterate" + :type "asd" + :directory '(:relative "iterate")) + *load-truename*))) + (unless (and (probe-file asdf-file) + (load asdf-file)) + (error "Unable to find or load the iterate system")))) #+use-salza-zlib -(load (merge-pathnames "salza/salza.asd" *load-truename*)) +(let ((asdf-file (merge-pathnames + (make-pathname + :name "salza" + :type "asd" + :directory '(:relative "salza")) + *load-truename*))) + (unless (and (probe-file asdf-file) + (load asdf-file)) + (error "You've pushed :use-salza-zlib onto *features* and I'm unable to load salza!"))) #+clisp (setf *warn-on-floating-point-contagion* nil) Index: config.lisp =================================================================== --- config.lisp (revision 113) +++ config.lisp (working copy) @@ -32,7 +32,12 @@ ;; The *afm-files-directories* is only for the 14 predefined fonts. ;; other fonts must have their afm files read only when they are loaded (defparameter *afm-files-directories* - (list (merge-pathnames #P"afm/*.afm" *cl-pdf-base-directory*)) + (list (merge-pathnames + (make-pathname + :directory '(:relative "afm") + :type "afm" + :name :wild) + *cl-pdf-base-directory*)) "The directory containing the Adobe Font Metrics files for the 14 predefined fonts") ;; define the :pdf-binary feature if your Lisp implementation accepts -- Gary Warren King metabang.com http://www.metabang.com/ From marc.battyani at fractalconcept.com Thu Jan 19 20:08:34 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Thu, 19 Jan 2006 21:08:34 +0100 Subject: [cl-pdf-devel] Status of chart.lisp? References: <20060118182914.GB33558@dogma.freebsd-uk.eu.org> Message-ID: <128a01c61d34$20682980$0a02a8c0@marcxp> "Jonathon McKitrick" wrote: > The note in the source says chart.lisp is in alpha state. Is anyone working > on adding new features? Or is it pretty much static at the moment? It's not alpha state anymore. I use it a lot in production so I will remove that comment. Improvements and new features are always welcome of course. ;-) Marc From gwking at metabang.com Wed Jan 18 21:19:36 2006 From: gwking at metabang.com (Gary King) Date: Wed, 18 Jan 2006 16:19:36 -0500 Subject: [cl-pdf-devel] pathname patch Message-ID: <625C8605-83E6-478E-99BF-5765E02194E4@metabang.com> Here is a patch that allows cl-pdf to load under MCL. It changes three pathname related calls to use merge-pathnames and make-pathnames. -------------- next part -------------- A non-text attachment was scrubbed... Name: gwk-20060118-pathnames.patch Type: application/applefile Size: 88 bytes Desc: not available URL: -------------- next part -------------- hth, -- Gary Warren King metabang.com http://www.metabang.com/ From marc.battyani at fractalconcept.com Thu Jan 19 20:53:16 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Thu, 19 Jan 2006 21:53:16 +0100 Subject: [cl-pdf-devel] Pathname patch for cl-pdf and MCL References: Message-ID: <12c601c61d3a$5f4824b0$0a02a8c0@marcxp> "Gary King" wrote: > I'm not sure if the first patch I sent made it through (or if I sent > it correctly). This allows cl-pdf to load under MCL. It changes three > pathname related calls to use merge-pathnames and make-pathnames. > > Index: cl-pdf.asd [patch...] Thanks Gary! BTW this reminds me that I didn't reply to your previous email. :-( I'm sorry about that. I am in an awful rush to finish a current work for next week. >Also, if there is interest in making CL-PDF (and CL-Typesetting) ASDF- >Installable, I'd be happy to do the work... The only putative >disadvantage is that the packages would be signed with my key instead >of Marc's. I find it's a good idea. This is on my todo list but I've managed to push it further every time... ;-) (I even found again the passphrase I lost for my signing key ;-) I think it will be better if I sign it with my own key so that I can integrate this to my current make-release script which is called each time I commit to the code repository. Marc From jcm at FreeBSD-uk.eu.org Thu Jan 19 21:25:22 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Thu, 19 Jan 2006 21:25:22 +0000 Subject: [cl-pdf-devel] Adding options to x-axis In-Reply-To: <128401c61d31$c5654830$0a02a8c0@marcxp> References: <20060119165600.GA46422@dogma.freebsd-uk.eu.org> <128401c61d31$c5654830$0a02a8c0@marcxp> Message-ID: <20060119212522.GA49408@dogma.freebsd-uk.eu.org> On Thu, Jan 19, 2006 at 08:51:37PM +0100, Marc Battyani wrote: : For 1, use a format string with the Tilde Slash directive: : http://www.lisp.org/HyperSpec/Body/sec_22-3-5-4.html What an awesome feature! Extensible format strings! I have a lisp style question about the code. What is the purpose of (apply #'set-rgb-fill (foo bar)) when you could just call (set-rgb-fill (foo bar)) ? I don't quite get the apply here, as well as when it is used with make-instance. -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From jcm at FreeBSD-uk.eu.org Fri Jan 20 03:36:51 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Fri, 20 Jan 2006 03:36:51 +0000 Subject: [cl-pdf-devel] Illegal values in text? Message-ID: <20060120033650.GA53858@dogma.freebsd-uk.eu.org> I tried reading a pdf in Adobe on Windows, and got 2 error dialogs. One was for illegal 'm' in text section and then illegal 'Tj' outside text section. Or maybe the other way around, I forget. I need to have this work on Windows eventually. Any idea what the problem might be? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From tim at tenkan.org Fri Jan 20 15:18:09 2006 From: tim at tenkan.org (Tim Daly Jr.) Date: Fri, 20 Jan 2006 16:18:09 +0100 Subject: [cl-pdf-devel] Illegal values in text? In-Reply-To: <20060120033650.GA53858@dogma.freebsd-uk.eu.org> References: <20060120033650.GA53858@dogma.freebsd-uk.eu.org> Message-ID: <1137770289.32094.461.camel@beer.intern> On Fri, 2006-01-20 at 03:36 +0000, Jonathon McKitrick wrote: > I tried reading a pdf in Adobe on Windows, and got 2 error dialogs. One was > for illegal 'm' in text section and then illegal 'Tj' outside text section. > Or maybe the other way around, I forget. > > I need to have this work on Windows eventually. Any idea what the problem > might be? > Did you make the PDF with CL-PDF? Perhaps you could share the code that you used to make it? At a guess, it sounds like you might have mixed up your use of PDF:IN-TEXT-MODE. FWIW, I doubt that the operating system is an important factor here. Perhaps the reader you used on Windows is simply less tolerant of broken files. One nice tool for debugging PDF files is xpdf with the -cmd option. -- -Tim From jcm at FreeBSD-uk.eu.org Fri Jan 20 15:39:05 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Fri, 20 Jan 2006 15:39:05 +0000 Subject: [cl-pdf-devel] Illegal values in text? In-Reply-To: <1137770289.32094.461.camel@beer.intern> References: <20060120033650.GA53858@dogma.freebsd-uk.eu.org> <1137770289.32094.461.camel@beer.intern> Message-ID: <20060120153905.GA58774@dogma.freebsd-uk.eu.org> On Fri, Jan 20, 2006 at 04:18:09PM +0100, Tim Daly Jr. wrote: : On Fri, 2006-01-20 at 03:36 +0000, Jonathon McKitrick wrote: : > I tried reading a pdf in Adobe on Windows, and got 2 error dialogs. One was : > for illegal 'm' in text section and then illegal 'Tj' outside text section. : > Or maybe the other way around, I forget. : > : > I need to have this work on Windows eventually. Any idea what the problem : > might be? : > : : Did you make the PDF with CL-PDF? Perhaps you could share the code that Most definitely. And I love it on Unix! : you used to make it? At a guess, it sounds like you might have mixed up : your use of PDF:IN-TEXT-MODE. That's definitely possible. I have no idea what in-text-mode does, and the difference between move-to and move-text and move-to-next-line and show-text-on-next-line are. But I'm learning. : FWIW, I doubt that the operating system is an important factor here. : Perhaps the reader you used on Windows is simply less tolerant of broken : files. I updated Acrobat Reader on the machine, but no change. : One nice tool for debugging PDF files is xpdf with the -cmd option. I'll try it. Thanks! -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From marc.battyani at fractalconcept.com Fri Jan 20 22:51:55 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Fri, 20 Jan 2006 23:51:55 +0100 Subject: [cl-pdf-devel] Adding options to x-axis References: <20060119165600.GA46422@dogma.freebsd-uk.eu.org><128401c61d31$c5654830$0a02a8c0@marcxp> <20060119212522.GA49408@dogma.freebsd-uk.eu.org> Message-ID: <16c801c61e14$1d2019a0$0a02a8c0@marcxp> "Jonathon McKitrick" wrote: > On Thu, Jan 19, 2006 at 08:51:37PM +0100, Marc Battyani wrote: > : For 1, use a format string with the Tilde Slash directive: > : http://www.lisp.org/HyperSpec/Body/sec_22-3-5-4.html > > What an awesome feature! Extensible format strings! Yep, Common Lisp is cool! ;-) > I have a lisp style question about the code. What is the purpose of > (apply #'set-rgb-fill (foo bar)) > > when you could just call > (set-rgb-fill (foo bar)) > ? > > I don't quite get the apply here, as well as when it is used with > make-instance. It's not the same: CL-USER 12 > (apply 'pdf:set-rgb-fill '(1 2 3)) " 1.0 2.0 3.0 rg " CL-USER 13 > (pdf:set-rgb-fill '(1 2 3)) Error: The call (# (1 2 3)) does not match definition (# pdf::r pdf::g pdf::b). 1 (continue) Return a value from the call to #. 2 Try calling another function instead of # with the same arguments. 3 Try calling # with a new argument list. 4 (abort) Return to level 0. 5 Return to top loop level 0. Marc From jcm at FreeBSD-uk.eu.org Sat Jan 21 14:03:49 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Sat, 21 Jan 2006 14:03:49 +0000 Subject: [cl-pdf-devel] Adding options to x-axis In-Reply-To: <16c801c61e14$1d2019a0$0a02a8c0@marcxp> References: <20060119212522.GA49408@dogma.freebsd-uk.eu.org> <16c801c61e14$1d2019a0$0a02a8c0@marcxp> Message-ID: <20060121140349.GA77580@dogma.freebsd-uk.eu.org> My client wants xy-plots, rather than histograms, so I definitely need to do some customizing of the x-axis. I have the points labeled with text rather than numbers, but I need to adjust their position a bit more. It looks like label-position and label-rotation are not yet implemented, correct? Also, to force the x-axis to end on axis-max rather than a nicer rounded value, I need to change compute-scale, correct? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From marc.battyani at fractalconcept.com Sun Jan 22 14:14:23 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Sun, 22 Jan 2006 15:14:23 +0100 Subject: [cl-pdf-devel] Adding options to x-axis References: <20060119212522.GA49408@dogma.freebsd-uk.eu.org><16c801c61e14$1d2019a0$0a02a8c0@marcxp> <20060121140349.GA77580@dogma.freebsd-uk.eu.org> Message-ID: <03a501c61f5e$28c2f4d0$0a02a8c0@marcxp> "Jonathon McKitrick" wrote: > > My client wants xy-plots, rather than histograms, so I definitely need to do > some customizing of the x-axis. I have the points labeled with text rather > than numbers, but I need to adjust their position a bit more. It looks like > label-position and label-rotation are not yet implemented, correct? Yes. > Also, to force the x-axis to end on axis-max rather than a nicer rounded > value, I need to change compute-scale, correct? Yes and the draw-object method too. At the beginning it was like that. The locked-values slot is for this but it's like label-rotation ;-) Marc From root at common-lisp.net Mon Jan 23 08:00:04 2006 From: root at common-lisp.net (root) Date: Mon, 23 Jan 2006 02:00:04 -0600 (CST) Subject: [cl-pdf-devel] Auto-nag: cl-pdf please update your webpage Message-ID: <20060123080004.5D46A1E1C1@common-lisp.net> You are being nagged on because you have not created a sensible default webpage for your project. Please do so or you will be nagged again next week. All we ask is that you type in something about the project and perhaps some links to mailinglists etc. See common-lisp.net/project/clo/sp/index.html for a reasonable template. Any questions? You can reach the author of this cronjob at clo-devel at common-lisp.net Thanks! From jcm at FreeBSD-uk.eu.org Mon Jan 23 13:41:19 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Mon, 23 Jan 2006 13:41:19 +0000 Subject: [cl-pdf-devel] Adding options to x-axis In-Reply-To: <03a501c61f5e$28c2f4d0$0a02a8c0@marcxp> References: <20060121140349.GA77580@dogma.freebsd-uk.eu.org> <03a501c61f5e$28c2f4d0$0a02a8c0@marcxp> Message-ID: <20060123134119.GC2986@dogma.freebsd-uk.eu.org> Hello again Marc, I'm trying to figure out the text matrix options. The reason I'm having trouble with all of these commands is the php library I learned pdf with wrapped all of these commands. For example, showing text had options for position and angle. I need to figure out how to show text at a certain angle. Rotate is good, but not quite exactly what I need, because the next text shown after a rotate is still on the old coordinate system. I need to show text labels along the x-axis, but rotated about 45 degrees, so longer words will fit. My problem with rotate is the text doesn't stay on the x-axis horizontally, but keeps going up at 45 degrees. Try this: (pdf:rotate 10) (pdf:draw-text "Hello,") (pdf:rotate -10) (pdf:rotate 10) (pdf:draw-text "world!") (pdf:rotate -10) I want the H in Hello and the w in world to be on the same line. How can I do this? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From jcm at FreeBSD-uk.eu.org Tue Jan 24 21:40:19 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Tue, 24 Jan 2006 21:40:19 +0000 Subject: [cl-pdf-devel] Drawing large amounts of text Message-ID: <20060124214018.GA20453@dogma.freebsd-uk.eu.org> Is there a function to draw a large amount of text in a certain area that automatically handles word wrap? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From divanov at aha.ru Wed Jan 25 06:24:28 2006 From: divanov at aha.ru (Dmitriy Ivanov) Date: Wed, 25 Jan 2006 09:24:28 +0300 Subject: [cl-pdf-devel] Drawing large amounts of text References: <20060124214018.GA20453@dogma.freebsd-uk.eu.org> Message-ID: <000001c62178$033d50e0$8100a8c0@digo> Hello Jonathon, | Is there a function to draw a large amount of text in a certain area | that automatically handles word wrap? Please take a look at text.lisp. -- Sincerely, Dmitriy Ivanov lisp.ystok.ru