Changeset 3478

Show
Ignore:
Timestamp:
07/17/08 11:08:08 (4 months ago)
Author:
hans
Message:

Get PDF generation with M2 icon to work.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/projects/bos/Makefile

    r2960 r3478  
    33 
    44bos.core: build.lisp 
    5         sbcl --load build.lisp --eval '(sb-ext:save-lisp-and-die "bos.core")' 
     5        env LANG=en_US.UTF-8 sbcl --load build.lisp --eval '(sb-ext:save-lisp-and-die "bos.core")' 
    66 
    77# various cleaning stuff 
  • trunk/projects/bos/m2/cert-daemon.lisp

    r3374 r3478  
    11(in-package :bos.m2.cert-generator) 
    22 
    3 (defun run-tool (program &optional program-args &rest args) 
    4   (let* ((process (apply #'run-program program program-args :search t :output :stream args)) 
    5          (error-message (unless (zerop (process-exit-code process)) 
    6                           (with-output-to-string (*standard-output*) 
    7                             (with-open-stream (output-stream (process-output process)) 
    8                               (princ (read-line output-stream nil))))))) 
    9     (process-close process) 
    10     (unless (zerop (process-exit-code process)) 
    11       (error "Error executing ~A - Exit code ~D~%Error message: ~A" 
    12              (format nil "\"~A~{ ~A~}\"" program program-args) (process-exit-code process) error-message)))) 
     3(defun run-tool (program &rest args) 
     4  (let ((asdf::*verbose-out* t)) 
     5    (apply #'asdf:run-shell-command "~S ~{~S ~}" program args))) 
    136 
    147(defun fill-form (fdf-pathname pdf-pathname m2-pdf-pathname output-pathname) 
    158  (handler-case 
    16       (with-temporary-file (temporary-pdf-pathname :defaults #P"/tmp/.pdf") 
     9      (with-temporary-file (temporary-pdf-pathname :defaults (make-pathname :directory '(:absolute "tmp") 
     10                                                                            :type "pdf")) 
    1711        (cond 
    1812          ((namestring pdf-pathname) 
     
    4337                                                      template-pathname)) 
    4438                (m2-pdf-pathname (merge-pathnames 
    45                                   (make-pathname :name (format nil "~A-m2s" id)
     39                                  (make-pathname :name (format nil "~A-m2s" id) :type "pdf"
    4640                                  fdf-pathname)) 
    4741                (output-pathname (merge-pathnames (make-pathname :name id :type "pdf") fdf-pathname))) 
  • trunk/projects/bos/m2/m2-pdf.lisp

    r3374 r3478  
    5959                (pdf:close-fill-and-stroke))))))) 
    6060 
    61     (with-open-file (f (contract-m2-pdf-pathname contract :print print) :direction :output :if-exists :supersede) 
     61    (with-open-file (f (contract-m2-pdf-pathname contract :print print) 
     62                       :direction :output 
     63                       :if-exists :supersede 
     64                       :external-format :iso-8859-1) 
    6265      ;; cl-pdf does not really handle non-ascii characters in a very 
    6366      ;; usable manner.  In order to avoid having to deal with