| Paste number 1308: | pdf export hack for Acclaim |
| Pasted by: | mgr |
| 4 years, 1 month ago | |
| #lisp | Context in IRC logs | |
| Paste contents: |
| I did some test on generating pdf's of Acclaim slides without cl-pdf hacking. If you do just screenshots, convert them to ps, concatenate these files and convert the resulting ps to pdf, you get a quite usable pdf with a reasonable size, of course only if you don't use a background picture (just call (setf acclaim::*show-bg-image* nil)). I got a 223068 bytes file for 10 pages. I think that this is okay. Here is the recipe: - Install scrot (apt-get install scrot on debian, else go to http://linuxbrit.co.uk/scrot/), - add this near the end of acclaim.lisp (i.e. just before (t nil)): (#\s (sb-ext:run-program "/usr/bin/scrot" (list (format nil "~a/slide-~3,'0d.pnm" "/home/mgr/daten/coding/lisp/acclaim/pdf/tmp" number))) nil) (modifying of course the specified path), - call (acclaim:start) and press #\s (as in screenshot) for each slide, - open up a terminal and go the the specified directory and fire up something like the following (in bash): for i in slide*pnm; do pnmtops $i ; done | ps2pdf - > slides.pdf - Voila. Perhaps this is not as elegant as using cl-pdf, but at least the pdf will look exactly like the Acclaim slides.. --- errata: Use something like for i in slide-*.pnm; do \ pnmtops -dpi 75 -scale=1.0 -width 16 -setpage $i ; \ done | ps2pdf14 - > all-tmp.pdf; pdfopt all-tmp.pdf all.pdf instead. This makes a non-scaled version of the slides (without changing the file size), with perhaps a slightly better pdf because of the pdfopt. The value of width=16 resembles my screen width of 1152 pixels (calculation: (ceiling (/ 1152 75))). This results in a 385 kB PDF for Christophe's slides (without background image, if he used one anyway). |
Annotations for this paste:
| Annotation number 3: | 154566 |
| Pasted by: | mgnir33 |
| 3 months, 3 weeks ago | |
| Context in IRC logs | |
| Paste contents: |
| I did some test on generating pdf's of Acclaim slides without cl-pdf hacking. If you do just screenshots, convert them to ps, concatenate these files and convert the resulting ps to pdf, you get a quite usable pdf with a reasonable size, of course only if you don't use a background picture (just call (setf acclaim::*show-bg-image* nil)). I got a 223068 bytes file for 10 pages. I think that this is okay. Here is the recipe: - Install scrot (apt-get install scrot on debian, else go to http://linuxbrit.co.uk/scrot/), - add this near the end of acclaim.lisp (i.e. just before (t nil)): (#\s (sb-ext:run-program "/usr/bin/scrot" (list (format nil "~a/slide-~3,'0d.pnm" "/home/mgr/daten/coding/lisp/acclaim/pdf/tmp" number))) nil) (modifying of course the specified path), - call (acclaim:start) and press #\s (as in screenshot) for each slide, - open up a terminal and go the the specified directory and fire up something like the following (in bash): for i in slide*pnm; do pnmtops $i ; done | ps2pdf - > slides.pdf - Voila. Perhaps this is not as elegant as using cl-pdf, but at least the pdf will look exactly like the Acclaim slides.. --- errata: Use something like for i in slide-*.pnm; do \ pnmtops -dpi 75 -scale=1.0 -width 16 -setpage $i ; \ done | ps2pdf14 - > all-tmp.pdf; pdfopt all-tmp.pdf all.pdf instead. This makes a non-scaled version of the slides (without changing the file size), with perhaps a slightly better pdf because of the pdfopt. The value of width=16 resembles my screen width of 1152 pixels (calculation: (ceiling (/ 1152 75))). This results in a 385 kB PDF for Christophe's slides (without background image, if he used one anyway). |
| Annotation number 2: | 13 |
| Pasted by: | murat |
| 1 year, 4 weeks ago | |
| Context in IRC logs | |
| Paste contents: |
| hack hack |
| Annotation number 1: | deadlyfist |
| Pasted by: | white553 |
| 1 year, 7 months ago | |
| Context in IRC logs | |
| Paste contents: |
| 1: I did some test on generating pdf's of Acclaim slides 2: without cl-pdf hacking. If you do just screenshots, convert them to 3: ps, concatenate these files and convert the resulting ps to pdf, you 4: get a quite usable pdf with a reasonable size, of course only if you 5: don't use a background picture (just call (setf 6: acclaim::*show-bg-image* nil)). I got a 223068 bytes file for 10 pages. 7: I think that this is okay. Here is the recipe: 8: 9: - Install scrot (apt-get install scrot on debian, else go to 10: http://linuxbrit.co.uk/scrot/), 11: - add this near the end of acclaim.lisp (i.e. just before (t nil)): 12: 13: (#\s (sb-ext:run-program "/usr/bin/scrot" 14: (list (format nil "~a/slide-~3,'0d.pnm" 15: "/home/mgr/daten/coding/lisp/acclaim/pdf/tmp" 16: number))) 17: nil) 18: 19: (modifying of course the specified path), 20: - call (acclaim:start) and press #\s (as in screenshot) for each slide, 21: - open up a terminal and go the the specified directory and 22: fire up something like the following (in bash): 23: 24: for i in slide*pnm; do pnmtops $i ; done | ps2pdf - > slides.pdf 25: 26: - Voila. 27: 28: Perhaps this is not as elegant as using cl-pdf, but at least the pdf 29: will look exactly like the Acclaim slides.. 30: 31: --- 32: errata: 33: 34: Use something like 35: 36: for i in slide-*.pnm; do \ 37: pnmtops -dpi 75 -scale=1.0 -width 16 -setpage $i ; \ 38: done | ps2pdf14 - > all-tmp.pdf; pdfopt all-tmp.pdf all.pdf 39: 40: instead. This makes a non-scaled version of the slides (without 41: changing the file size), with perhaps a slightly better pdf because of 42: the pdfopt. The value of width=16 resembles my screen width of 43: 1152 pixels (calculation: (ceiling (/ 1152 75))). This results in a 44: 385 kB PDF for Christophe's slides (without background image, if he used 45: one anyway). 46: |