But how to create those QR codes without too much complexity?
Google Chart API provides:
- chart wizard to create QR codes and corresponding styling
- infographics API to create static images based on posted chart definition (URLs)
The following code is taken from "QR Codes in DTIA Output" which shows how to create QR codes for PDF output of the DITA-OT using XSL-FO:
see: http://ditanauts.org/2012/03/14/qr-codes-in-dita-ouput/<!-- Insert QR code --> <xsl:template match="*[contains(@class,' topic/xref ')] [contains(@outputclass, 'qrcode')]"> <fo:external-graphic> <xsl:attribute name="src"><xsl:value-of select="concat('https://chart. googleapis.com/chart?cht=qr&chs=100x100&chl=', .)"/> </xsl:attribute> </fo:external-graphic> </xsl:template>
Sample (code: <img src="http://chart.apis.google.com/chart?chs=200x100&cht=qr&chl=http%3A%2F%2Ftrent-intovalue.blogspot.de%2F2006%2F05%2Ftrent-definition.html" width="200" height="100" alt="" />):
No comments:
Post a Comment