Skip to content

Commit

Permalink
Minor cosmetical fixes
Browse files Browse the repository at this point in the history
Fix startup from Makefile
Repair certificate generation (not yet complete)
  • Loading branch information
hanshuebner committed Oct 14, 2008
1 parent 6b4ddf9 commit 8efcd5b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/utils/make-fdf-file.lisp
Expand Up @@ -3,7 +3,7 @@
;; make-fdf-file.lisp

;; Funktion zum Erstellen von FDF-Dateien. Diese können mit Hilfe von
;; pdftk verwendet werden, um PDF-Formulare auszuföllen. Das
;; pdftk verwendet werden, um PDF-Formulare auszufuellen. Das
;; FDF-Format ist dabei ein Unterformat von Adobe PDF und wird in der
;; PDF-Spezifikation beschrieben.

Expand All @@ -15,19 +15,18 @@
(regex-replace-all #?r"([\(\)\\])" string #?r"\\\1"))

(defun make-fdf-file (file-name &rest keys-and-values)
(with-open-file (stream file-name :direction :output :if-does-not-exist :create :if-exists :supersede)
(with-open-file (stream file-name :direction :output :if-does-not-exist :create :if-exists :supersede :external-format :latin-1)
(format stream "%FDF-1.2
1 0 obj
<</FDF
<</Fields
[
")
(loop for (key value) on keys-and-values by #'cddr
do (format stream " <</T(~(~a~))/V(~a)>>~%" key
(pdf-quote-string (iconv:iconv "UTF-8" "ISO-8859-1"
(if (stringp value)
value
(format nil "~a" value))))))
do (format stream " <</T(~(~a~))/V(~a)>>~%" key
(pdf-quote-string (if (stringp value)
value
(format nil "~a" value)))))
(format stream " ]
>>
>>
Expand Down

0 comments on commit 8efcd5b

Please sign in to comment.