8000 GitHub - jampajeen/fop-pdf-thai: Create pdf in thai language with Apache FOP
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jampajeen/fop-pdf-thai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fop-pdf-thai

This project was created to simplify embedding Thai font to PDF by using Apache FOP.

Installation

Add repository and dependency to pom.xml

    <repositories>
        <repository>
            <id>snapshots-repo</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
    <dependencies>
    	.....
        <dependency>
            <groupId>com.rinxor</groupId>
            <artifactId>fop-pdf-thai</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        .....
    </dependencies>

Use "FopPdfThaiFactory" instead of "FopFactory" to create a "FopFactory" object.

For example:

Change your code from...

FopFactory fopFactory = FopFactory.newInstance();

To...

FopFactory fopFactory = FopPdfThaiFactory.newInstance();

Or...

// when use FOP in servlet context
FopFactory fopFactory = FopPdfThaiFactory.newInstance(new ServletContextURIResolver(getServletContext())); 

And now you can use XSLT to create your first PDF in Thai language (please specify font-family="Garuda").

This example project is a good point for start using the library: https://github.com/jampajeen/business-pdf-form

Have fun!

About

Create pdf in thai language with Apache FOP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0