From eric.marsden at free.fr Mon Apr 5 12:13:51 2010 From: eric.marsden at free.fr (Eric Marsden) Date: Mon, 05 Apr 2010 14:13:51 +0200 Subject: [cl-pdf-devel] PATCH: PDF transparency support Message-ID: <87ljd29jwg.fsf@free.fr> Hi, The attached patch adds support for PDF transparency, using the existing gstate mechanism. It allows you to specify transparency for stroke and fill operations seperately. The "blend mode" can also be specified. The patch includes an example. Note that viewer support for different blend modes is variable (works OK in Adobe Reader, Foxit Reader, xpdf but not in evince/poppler). -------------- next part -------------- A non-text attachment was scrubbed... Name: pdf-transparency.diff Type: text/x-diff Size: 4043 bytes Desc: PDF transparency support URL: -------------- next part -------------- -- Eric Marsden From pinterface at gmail.com Mon Apr 19 04:53:24 2010 From: pinterface at gmail.com (Pixel // pinterface) Date: Sun, 18 Apr 2010 22:53:24 -0600 Subject: [cl-pdf-devel] Better arglists for pdf:with-document, tt:paragraph, etc. Message-ID: Do you find it difficult to use cl-pdf or cl-typesetting with limited &rest lambda lists? Do the autodoc hints in slime prove unhelpful? Do you wish you could type "(with-document " or "(paragraph " and get an accurate listing of what arguments are available? Do you use SBCL or Clisp?[1] Then have I got the .asd for you! Introducing cl-pdf.arglists: better arglists for cl-pdf and cl-typesetting macros. http://web.kepibu.org/code/lisp/cl-pdf.arglists/ Turns (with-document (&rest args &key (max-number-of-pages 'pdf:*max-number-of-pages*) &allow-other-keys) &body body) into (with-document (&rest args &key (max-number-of-pages 'pdf:*max-number-of-pages*) empty mode layout (creator "") author title subject keywords &allow-other-keys) &body body) and (paragraph (&rest style) &body body) into (paragraph (&rest style &key font font-size text-x-scale color background-color h-align left-margin right-margin pre-decoration post-decoration leading-ratio) &body body) Wow! But wait, there's more! Act now, and we'll include at no additional cost: * Keyword arguments from object initargs * Keyword arguments from initialize-instance * To-the-macroexpansion accuracy through the magic of introspection That's an arbitrary-dollar-amount value for only $0! That's a savings of %! [1] Patches for other implementations welcome! -pix If only I'd written this /before/ largely finishing my cl-pdf-using program. :) From marc.battyani at fractalconcept.com Tue Apr 20 13:37:04 2010 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 20 Apr 2010 09:37:04 -0400 Subject: [cl-pdf-devel] PATCH: PDF transparency support In-Reply-To: <87ljd29jwg.fsf@free.fr> References: <87ljd29jwg.fsf@free.fr> Message-ID: <4BCDAE00.6020005@fractalconcept.com> Thanks Eric! :) I will look at that and put it in the repository. Marc On 05-04-10 8:13 AM, Eric Marsden wrote: > Hi, > > The attached patch adds support for PDF transparency, using the existing > gstate mechanism. It allows you to specify transparency for stroke and > fill operations seperately. The "blend mode" can also be specified. The > patch includes an example. > > Note that viewer support for different blend modes is variable (works OK > in Adobe Reader, Foxit Reader, xpdf but not in evince/poppler). > > > > > > > > > _______________________________________________ > cl-pdf-devel site list > cl-pdf-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cl-pdf-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc.battyani at fractalconcept.com Tue Apr 20 15:10:19 2010 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 20 Apr 2010 11:10:19 -0400 Subject: [cl-pdf-devel] Better arglists for pdf:with-document, tt:paragraph, etc. In-Reply-To: References: Message-ID: <4BCDC3DB.2080306@fractalconcept.com> On 19-04-10 12:53 AM, Pixel // pinterface wrote: > Do you find it difficult to use cl-pdf or cl-typesetting with limited &rest > lambda lists? Do the autodoc hints in slime prove unhelpful? Do you wish > you could type "(with-document " or "(paragraph " and get an accurate > listing of what arguments are available? Do you use SBCL or Clisp?[1] > > Then have I got the .asd for you! > > Introducing cl-pdf.arglists: better arglists for cl-pdf and cl-typesetting > macros. > http://web.kepibu.org/code/lisp/cl-pdf.arglists/ > > Turns > (with-document (&rest args > &key (max-number-of-pages 'pdf:*max-number-of-pages*) > &allow-other-keys) > &body body) > into > (with-document (&rest args > &key (max-number-of-pages 'pdf:*max-number-of-pages*) > empty mode layout (creator "") author title subject > keywords &allow-other-keys) > &body body) > and > (paragraph (&rest style) &body body) > into > (paragraph (&rest style > &key font font-size text-x-scale color > background-color h-align left-margin right-margin > pre-decoration post-decoration leading-ratio) > &body body) > > Wow! > > But wait, there's more! > > Act now, and we'll include at no additional cost: > * Keyword arguments from object initargs > * Keyword arguments from initialize-instance > * To-the-macroexpansion accuracy through the magic of introspection > > That's an arbitrary-dollar-amount value for only $0! That's a savings of > %! > > > [1] Patches for other implementations welcome! > Nice. :) For LispWorks you can use lw:function-lambda-list to get the arglist: (lw:function-lambda-list 'with-document) ((&rest args &key (max-number-of-pages (quote *max-number-of-pages*)) &allow-other-keys) &body body) I don't know how to set it though. Marc