/*
 * PDFConverter.java
 *
 * Created on 20 June 2005, 12:14
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package uk.ac.bgs.scans;

import java.util.LinkedList;
import java.util.List;

import java.io.FileOutputStream;
import java.io.IOException;

import com.lowagie.text.*;
import com.lowagie.text.pdf.PdfWriter;

/**
 *
 * @author psg
 */
public class PDFConverter {
    
    /** Creates a new instance of PDFConverter */
    public PDFConverter() {
//        Scans scans = new Scans();
//        List list = new LinkedList();
//        scans.setFooter(true);
//        scans.setPageNumbering(true);
//        System.out.println("Hello World");
	Document document = new Document();
	try {
	// step 2:
        PdfWriter.getInstance(document, new FileOutputStream("inSequence.pdf"));
        document.open();
        Image map = Image.getInstance("S:\\Scans\\Borehole\\TifOriginal\\SD70NW1\\SD70NW100219.tif");        
        map.scaleAbsolute(4000,4000);
        map.scalePercent(100,100);
        document.setPageSize(new Rectangle(4000,4000));
        document.add(map);         

    } catch (DocumentException de) {
	System.err.println(de.getMessage());
    } catch (IOException ioe) {
	System.err.println(ioe.getMessage());
}
document.close();        
}
   
    public static void main(String []args){
        new PDFConverter();
    }
    
}
