[Building Sakai] Has anybody created a PDF Certificate tool?

Feliz Gouveia fribeiro at ufp.edu.pt
Thu Feb 2 01:01:11 PST 2012


Is there a sample pdf certificate to take a look at? just to evaluate
if a xsl file is an option?

regards, Feliz


On 1 February 2012 21:39, Noah Botimer <botimer at umich.edu> wrote:
> Having used FOP for PDFs, I can say that it can be a drag. Generating XSL-FO natively is hard and the xhtml2fo.xsl stuff can be pretty lossy, since XHTML/CSS are generally pretty ignorant of pagination, page dimensions, etc., at least in the XSLT (which gives an admirable go of it). You can turn out quality materials, but it does require some specialized tools/expertise/patience.
>
> The iText/PDFBox approach is generally more direct. If you've got simple markup/styling already done, xhtml2fo->FOP->PDF is worth a shot. But the "drawing-style" APIs are not too bad and scale up to more complexity with less programmer stress, since they are less abstracted.
>
> In your case, Brian, I would be tempted to look at the form support in the PDF format/libraries. Yes, it might only cover a portion of the templates (think of something converted to PDF from a scan, simple Word exports, a certificate drawn in and exported from Illustrator, e.g.,), but it could be a straightforward way to add bits of text in addressable locations without resorting to pixel play. A more structured model for augmentation might lend itself to easier configuration/UI.
>
> A closing thought is that, if you find that iText is significantly better at something, keep in mind that the licensing constraints (roughly BSD-style / non-copyleft) are really for the community release. While we try to paint inside those lines, there is no reason that a contrib tool couldn't be on a copyleft license. It just adds some complexity for the Sakai Commercial Affiliates with respect to packaging and distribution, if they like it. (Generally, ECL/BSD/Apache/MPL/MIT, etc., make it easier in our world, but GPL isn't a deal breaker except in the core release.)
>
> Thanks,
> -Noah
>
> On Feb 1, 2012, at 2:51 PM, Brian Baillargeon wrote:
>
>> As I understand it, FOP takes XSL-FO as input, and I don't know if FOP
>> can read PDF files (I haven't looked to see what Site Info does). I
>> think we would get better usability if the templates are uploaded to the
>> resources as PDFs.
>>
>> This may be helpful to get an idea of how the code looks to manipulate a
>> PDF using PDFBox:
>> http://www.developerfeed.com/pdfbox/snippet/how-add-text-pdf
>>
>> It's a little bit more work than IText, but not too bad.
>>
>> Thanks,
>> Brian
>>
>>  12-02-01 02:12 PM, Zhen Qian wrote:
>>> Hi, Brian:
>>>
>>> Just curious; Site Info tool uses Apache FOP/XSLT to generate pdf file for site participants. Is PDFBox easier to use compared to FOP? How to choose btw the two?
>>>
>>> Thanks,
>>>
>>> - Zhen
>>>
>>> On Feb 1, 2012, at 1:53 PM, Brian Baillargeon wrote:
>>>
>>>> Thanks for the heads up Steve. I was using itext version 2.0.7 in my
>>>> proof of concept, so this morning I reimplemented it using pdfbox from
>>>> apache instead.
>>>>
>>>> Brian
>>>>
>>>> On 12-01-31 05:07 PM, Steve Swinsburg wrote:
>>>>> Hi Brian,
>>>>>
>>>>> This sounds like it could be a great extension to the gradebook itself?
>>>>>
>>>>> In a previous life I have done a lot of PDF work via iText which was great to work with, unfortunately it's community license is AGPL, so not appropriate for Sakai. Interested to see what you come up with.
>>>>>
>>>>> cheers,
>>>>> Steve
>>>>>
>>>>>
>>>>>
>>>>> On 01/02/2012, at 4:23 AM, Brian Baillargeon wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I would like to know if anybody has created a tool or is interested in assisting in creating a tool with the following requirements:
>>>>>>
>>>>>> An instructor specifies a pdf template file for a certificate in their course's resources.
>>>>>> The instructor specifies a minimum grade and a gradebook column.
>>>>>> There could be other info for the instructor to specify as well such as whether to display the student's grade in the certificate, the pixel positions of each stamp, font sizes, etc.
>>>>>>
>>>>>> If a student has met the minimum grade for the provided gradebook column, they get a link to save or download a pdf stamped with their name (and other info if applicable).
>>>>>>
>>>>>> I've created a simple proof of concept, but if anybody has been working on something similar I'd be very interested.
>>>>>>
>>>>>> Thanks,
>>>>>> Brian
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> sakai-dev mailing list
>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>
>>>>>> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>>>> _______________________________________________
>>>> sakai-dev mailing list
>>>> sakai-dev at collab.sakaiproject.org
>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>
>>>> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>>>>
>>>>
>>
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>>
>>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"



-- 
Feliz Ribeiro Gouveia

Universidade Fernando Pessoa            http://www.ufp.pt
Centro de Recursos Multimediaticos      Tel 351-22.507.13.06
M.I.N.D. Lab                            Fax 351-22.550.82.69
Pr 9 de Abril 349                       fribeiro at ufp.edu.pt
P-4249-004 Porto


More information about the sakai-dev mailing list