From marc.battyani at fractalconcept.com Tue Nov 7 16:12:52 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 7 Nov 2006 17:12:52 +0100 Subject: [cl-pdf-devel] Re: CL-PDF References: <454F0D45.3070708@freenet.de> Message-ID: <096401c70287$96cc9960$1402a8c0@marcx2> "Andr? Thieme" wrote: [cc'ed to cl-pdf-devel] > Hi Marc, I wanted to ask you if it is possible to create PDFs with > cl-pdf that contain formulars (with text fields, radio buttons, etc..). > I also saw an exapmle where JavaScript code was put into the pdf file > so that a user can send the (filled out pdf) to some website. > > Is that possible with the current version of cl-pdf? Hi Andr?, Well it's possible, but it has not yet been done in cl-pdf. It's detailed on section 8.5 and 8.6 of the PDF reference. In fact you can attach JavaScript code to several events (like page opened/closed, field value changed, etc.) Marc From jcm at FreeBSD-uk.eu.org Wed Nov 8 23:12:43 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Wed, 8 Nov 2006 23:12:43 +0000 Subject: [cl-pdf-devel] Question about font options Message-ID: <20061108231243.GC39111@dogma.freebsd-uk.eu.org> I'm experimenting with zpb-ttf, and I'm interested in any other options for adding new fonts to cl-pdf. I'm a total newbie to fonts in general, and I'd like to get up and running without too much overhead. I'd like to find a collection of common fonts and the quickest way to import them (afm, ttf, etc?), if anyone has any suggestions. Jonathon McKitrick -- My other computer is your Windows box. From fungsin.lui at gmail.com Fri Nov 10 02:47:12 2006 From: fungsin.lui at gmail.com (Lui Fungsin) Date: Thu, 9 Nov 2006 18:47:12 -0800 Subject: [cl-pdf-devel] parsing pdf file meta info In-Reply-To: <093501c6ef69$a8d39180$1402a8c0@marcx2> References: <3990b5930610131728y6cc479cbm6624230d99f95ce9@mail.gmail.com> <093501c6ef69$a8d39180$1402a8c0@marcx2> Message-ID: <3990b5930611091847j87c2aey7e7a9c037759c8ed@mail.gmail.com> On 10/14/06, Marc Battyani wrote: > There is already a pdf parser in cl-pdf that can do that. You can even write > on it. > Have you looked at it? Hi Marc, Sorry I overlooked this. The first thing I did was to take a look at example.lisp and see how this library can be utilized and then I quickly drew a wrong conclusion... I have a test pdf document that is 10.5" by 13" and I run the following code (with-existing-document ("/tmp/test.pdf") (with-existing-page (0) (bounds *page*))) and get #(0 0 756 936) Dividing the numbers by 72 I get the measurement in inches. I assumed that 72 is the dpi. Are all pdf document have a dpi of 72 (I guess not)? If not, how can I retrieve this information? I searched dpi from the source code and didn't find any reference to it. Maybe I'm using the wrong term here... I ran the example9 on a Xeon 2.8GHz linux box and it really took quite a while... but the result is very pretty! I was wondering if ex9.pdf is left out in the distribution intentionally to test one's patience :-) BTW I saw the following comment in pdf-template.lisp ;;;## Example Usage ;;; Try something like this after loading pdf-template.lisp: ;;; (pdf:test-template "/tmp/ex7.pdf" 1 "/tmp/template.pdf") Can you include template.pdf in the example directory so I can try it out and see what it does? PDF is really a huge beast for newbie like me... Thanks! From kroegerlistas at pedrokroeger.net Wed Nov 29 02:44:38 2006 From: kroegerlistas at pedrokroeger.net (kroegerlistas at pedrokroeger.net) Date: Tue, 28 Nov 2006 23:44:38 -0300 Subject: [cl-pdf-devel] cl-pdf not compiling with cmucl 19d Message-ID: <87bqmrnf8p.fsf@pedrokroeger.net> Hi, I get the following error when compiling cl-pdf with cmucl 19d on debian linux etch: Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER: NIL is not of type KERNEL:CTYPE [Condition of type TYPE-ERROR] Restarts: 0: [ABORT-REQUEST] Abort handling SLIME request. 1: [ABORT] Return to Top-Level. Backtrace: 0: (KERNEL::TYPE-UNION2 2 NIL #)[:EXTERNAL] 1: (KERNEL::SIMPLIFY-UNIONS (NIL # #)) 2: (KERNEL::%TYPE-UNION (NIL # #)) I could narrow the problem to the pdf-geom.lisp file, around line 156: (defun angle-3points (pt1 pt2 pt3) (let ((ang (- (angle pt1 pt3) (angle pt1 pt2)))) (if (or (> ang pi) (<= ang (- pi))) (- ang (* (signum ang) +2pi+)) ----------- ang))) The form underlined above seems to be causing the problem, but I don't know how to solve it. Pedro Kroger From marc.battyani at fractalconcept.com Wed Nov 29 08:36:37 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Wed, 29 Nov 2006 09:36:37 +0100 Subject: [cl-pdf-devel] cl-pdf not compiling with cmucl 19d References: <87bqmrnf8p.fsf@pedrokroeger.net> Message-ID: <013a01c71391$7ef04650$1402a8c0@marcx2> wrote: > > I get the following error when compiling cl-pdf with cmucl 19d on > debian linux etch: > > Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER: > NIL is not of type KERNEL:CTYPE > [Condition of type TYPE-ERROR] > > Restarts: > 0: [ABORT-REQUEST] Abort handling SLIME request. > 1: [ABORT] Return to Top-Level. > > Backtrace: > 0: (KERNEL::TYPE-UNION2 2 NIL # 1.0w0)>)[:EXTERNAL] > 1: (KERNEL::SIMPLIFY-UNIONS (NIL # 1.0w0 1.0w0)> #)) > 2: (KERNEL::%TYPE-UNION (NIL # 1.0w0)> #)) > > I could narrow the problem to the pdf-geom.lisp file, around line 156: > > (defun angle-3points (pt1 pt2 pt3) > (let ((ang (- (angle pt1 pt3) (angle pt1 pt2)))) > (if (or (> ang pi) (<= ang (- pi))) > (- ang (* (signum ang) +2pi+)) > ----------- > ang))) > > > The form underlined above seems to be causing the problem, but I don't > know how to solve it. Have you looked at ang's value? Or printed it in the function? Maybe somebody using CMUCL can help more. Marc