Package net.sf.jpluck.plucker

Examples of net.sf.jpluck.plucker.TextRecord.addParagraph()


    Document document = new Document("Bookmark Test");
    for (int i = 1; i <= 10; i++) {
      String uri = "page" + i;
      TextRecord page = new TextRecord(uri);
      String name = "Page " + i;
      page.addParagraph().addFontH1().addText(name).addAnchor("anchor");
     
      document.addBookmark(name, uri + "#anchor");
      document.addRecord(page);
    }
    document.setIncludeURIInfo(true);
View Full Code Here


import net.sf.jpluck.plucker.TextRecord;

public class TableTest {
    public static void main(String[] args) throws Exception {
        TextRecord home = new TextRecord("home");
        home.addParagraph().addTable("table");

        TableRecord table = new TableRecord("table", 1, Color.GREEN);

        TableRow row = table.addRow();
        TableCell cell = row.addCell();
View Full Code Here

      }
      document.setCategories(new String[] { category });
    }
   
    TextRecord home=new TextRecord("home");
    home.addParagraph().addFontH1().addText(name).addFontRegular();    

    for (int i = 1; i < arguments.length; i++) {
      System.out.println(arguments[i] + " (" + i + "/" + (arguments.length-1) + ")");
      File file = new File(arguments[i]);
      if (!file.isFile()) {
View Full Code Here

      image = ImageConverter.rescale(image, ((maxWidth > 0) ? maxWidth : width),
                   ((maxHeight > 0) ? maxHeight : height));

      CompositeBitmap compositeBitmap = CompositeBitmap.create(image, bpp);
      String uri = file.toURI().toString();     
      home.addParagraph(2).addText(i + " ").addLinkStart(uri).addText(file.getName()).addLinkEnd();
     
      String[] uris = new String[compositeBitmap.getRows()];
      for (int j = 0, n = compositeBitmap.getRows(); j < n; j++) {
        uris[j] = uri + "-" + j;
        document.addRecord(new ImageRecord(uris[j], compositeBitmap.getBitmapAt(j, 0)));
View Full Code Here

      if (charset == null) {
        charset = "ISO-8859-1";
      }
      LineNumberReader rdr = new LineNumberReader(new InputStreamReader(new ByteArrayInputStream(resource.getData()),
                                        charset));
      Paragraph paragraph = textRecord.addParagraph(Paragraph.DEFAULT_SPACING);
      for (String line; (line = rdr.readLine()) != null;) {
        if (line.length() == 0) {
          paragraph = textRecord.addParagraph(Paragraph.DEFAULT_SPACING);
        } else {
          int start = line.indexOf("http://");
View Full Code Here

      LineNumberReader rdr = new LineNumberReader(new InputStreamReader(new ByteArrayInputStream(resource.getData()),
                                        charset));
      Paragraph paragraph = textRecord.addParagraph(Paragraph.DEFAULT_SPACING);
      for (String line; (line = rdr.readLine()) != null;) {
        if (line.length() == 0) {
          paragraph = textRecord.addParagraph(Paragraph.DEFAULT_SPACING);
        } else {
          int start = line.indexOf("http://");
          if (start > -1) {
            int end = line.indexOf(' ', start);
            if (end == -1) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.