Re: [Hypercontent-users] output as pdf
Brought to you by:
alexvigdor
From: Alex V. <av...@co...> - 2005-04-12 14:43:25
|
Hi Carl, The hard part is learning to write xsl formatting objects, which provide the necessary instructions for the conversion to PDF. In terms of configuration, all you have to do is configure an output with content type "application/pdf" and set up the transformation with an XSL stylesheet that contains formatting objects. I have attached the fundamental XSL:FO stylesheet you will want to import into your own formatting object stylesheets; this contains all the transformations for XHTML into PDF. This stylesheet requires a parameter "baseDownloadUrl" if you want your images to be brought into the pdf; the url should point to the build site. In version 2.0 this is different, as version 2 has a special URL format for links to internal resources ("hypercontent:/path/to/file.ext"). If you have a single HTML element as the root of your XML document, you could import html_fo.xsl and do something like <xsl:template match="/"> <xsl:apply-templates mode="html"/> </xsl:template> The html_fo templates are set up with this "html" mode to avoid conflicting with other templates. If you have a different root element and possibly multiple HTML elements, you will have more work to do. XSL:FO is quite daunting, so give yourself some time to learn it. There's lots of info online; this tutorial looks like it might be a good start: http://www.renderx.com/tutorial.html The sample project that came with HyperContent uses FO to generate the manual; you can look at "common_fo.xsl" and "docs_fo.xsl" to get some more examples. Good luck! Alex On Apr 12, 2005, at 10:13 AM, Carl Barrow wrote: > Hi Alex > > I want to use HyperContent to output a number of pdf files rather than > html pages. The idea being that we can have pdf files for download > and staff can update the content when needed without worrying about > making pdf file and uploading it. Plus the content is stored in xml > instead of a file on an individual machine. > > I assume HyperContent can do this, whats the best way to go about it? > > Many Thanks > Carl > > > - > > ************************************ > > Carl Barrow > Web Developer > e-Services > The University of Hull > Cottingham Road > Hull > HU6 7RX > Ext. 6838 > ************************************ > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Hypercontent-users mailing list > Hyp...@li... > https://lists.sourceforge.net/lists/listinfo/hypercontent-users |