Thanks for sharing Josh. I'll take it for a test drive.

Andy

Josh Hayes-Sheen wrote:
> I started tinkering with using Flying Saucer to replace cfDocument in
> openbluedragon, I don't really have time to keep working on it right now
> so I thought I'd post what I accomplished in case others would like to
> continue the work, Notes follow and source is attached,
>
> This replacement uses Flying Saucer, aka xhtmlrenderer, available from
> https://xhtmlrenderer.dev.java.net, in order to compile it you will need
> to build FS from cvs source as I had to contribute a patch to allow
> finer grained control of the PDF output encryption, it's been applied to
> trunk but they haven't made a release since then.
>
> The hooks for cfdocument are actually still in the openbluedragon source
> code, so you have to change the build scripts to bring in the iText and
> xhtmlrenderer jars, but not the actual tag parser code, see
> src/com/naryx/tagfusion/cfm/tag/tagChecker.java if you want the details
> on that, you'll either want to update the path there or place the
> attached source file at
> src/com/naryx/tagfusion/cfm/document/cfDOCUMENT.java (which is what I'd
> recommend)
>
> you'll need xhtmlrenderer and the version of iText it uses (2.0.8 I
> think) and you'll need to update your build.xml to include them in the
> final build and in the generated war file (There may be a better way to
> do this, I was fairly unfamiliar with the use of external libraries in
> openbluedragon), look in build.xml for the section <path
> id="project.class.build"> and add the iText/flyingsaucer jars there
>
> Yes I know there was some talk of using PDFBox for this purpose, I took
> a quick peek at it and didn't like what I saw for some reason, I don't
> remember why now, so feel free to discard this mail entirely if you'd
> prefer PDFBox
>
> Certain elements that are not supported in the tag attributes, can be
> set through css properties, most notably the orientation currently
> cannot be set in the attributed because xhtmlrenderer does not allow
> that fine grained of a control over the pdf rendered output, it should
> however support using css with @page { size: landscape; } to set a
> landscape mode.
> As well, because xhtmlrenderer supports drawing to a java swing surface,
> it should be fairly trivial to support outputting to any image format
> supported by the java libraries.
>
> The most important note is that somewhere the paths are screwy.
> referencing a uri at "./" will not work as I expected it to, and I never
> did sort out exactly where it thought it's paths were, I don't know
> enough about the BlueDragon internals to figure out how to resolve paths
> properly. so to reference css files or images or files, you'll either
> need to fiddle with the paths, or maybe try using external paths.
> Someone who knows more about the bluedragon internals should be able to
> figure this out without too much trouble.
>
> I wrote this about a month ago over two weekends, and haven't touched it
> since, I'm too busy to keep working on it, I'll answer any questions I
> can, but if this is going to become any more useful than it is, it needs
> to be finished by someone else. I just copied the gpl3 boilerplate from
> another file and put my name on it, feel free to fix any issues with it
> but please leave my name there.
>
> Hope this is useful to someone, Enjoy :)
>
> - Josh
>
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
 http://groups.google.com/group/openbd?hl=en
 official blog @ http://blog.openbluedragon.org/
!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---

Reply via email to