Commit 5002c2cb authored by Raphaël's avatar Raphaël
Browse files

Added Sources for MyPDFGenerator java class

parent bbb121ee
!SESSION 2016-12-17 12:27:04.837 -----------------------------------------------
eclipse.buildId=debbuild
java.version=1.8.0_111
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.core.resources 2 10035 2016-12-17 12:27:08.384
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!SESSION 2016-12-19 10:30:32.885 -----------------------------------------------
eclipse.buildId=debbuild
java.version=1.8.0_111
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.core.resources 2 10035 2016-12-19 10:30:47.991
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!SESSION 2017-01-09 11:50:02.177 -----------------------------------------------
eclipse.buildId=debbuild
java.version=1.8.0_111
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.core.resources 2 10035 2017-01-09 11:50:05.612
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!SESSION 2017-01-09 11:54:48.350 -----------------------------------------------
eclipse.buildId=debbuild
java.version=1.8.0_111
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.core.resources 2 10035 2017-01-09 11:55:07.703
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.xhtmlrenderer.extend.FontResolver;
import org.xhtmlrenderer.pdf.ITextRenderer;
import com.lowagie.text.DocumentException;
public class MyPDFGenerator {
public static void main(String[] args) throws IOException, DocumentException {
//Paramètrage du fichier à convertir
//String baseFolder = System.getProperty("user.dir") + "/"; // correspond à la racine du projet Java
String entree = args[0];
String sortie = args[1];
File f = new File(entree);
if(f.exists() && !f.isDirectory()) {
OutputStream os = new FileOutputStream(sortie);
//Génération du PDF avec Flying Saucer
XHTMLToPDF(entree, os);
//fermeture de l'outputStream
os.close();
}
else{
System.err.println("Input file doesn't exist");
}
}
public static void XHTMLToPDF(String entree, OutputStream os) throws IOException, DocumentException {
//Génération du PDF avec Flying Saucer
ITextRenderer renderer = new ITextRenderer();
FontResolver resolver = renderer.getFontResolver();
renderer.getFontResolver().addFont("../font/cmunrm.ttf", true);
renderer.setDocument(new File(entree));
renderer.layout();
renderer.createPDF(os);
}
}
\ No newline at end of file
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.xhtmlrenderer.pdf.ITextRenderer;
import com.lowagie.text.DocumentException;
public class MyPDFGenerator {
public static void main(String[] args) throws IOException, DocumentException {
//Paramètrage du fichier à convertir
//String baseFolder = System.getProperty("user.dir") + "/"; // correspond à la racine du projet Java
String entree = args[0];
String sortie = args[1];
File f = new File(entree);
if(f.exists() && !f.isDirectory()) {
OutputStream os = new FileOutputStream(sortie);
//Génération du PDF avec Flying Saucer
XHTMLToPDF(entree, os);
//fermeture de l'outputStream
os.close();
}
else{
System.err.println("Input file doesn't exist");
}
}
public static void XHTMLToPDF(String entree, OutputStream os) throws IOException, DocumentException {
//Génération du PDF avec Flying Saucer
ITextRenderer renderer = new ITextRenderer();
FontResolver resolver = renderer.getFontResolver();
renderer.getFontResolver().addFont("../font/cmunrm.ttf", true);
renderer.setDocument(new File(entree));
renderer.layout();
renderer.createPDF(os);
}
}
\ No newline at end of file
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.xhtmlrenderer.extend.FontResolver;
import org.xhtmlrenderer.pdf.ITextRenderer;
import com.lowagie.text.DocumentException;
public class MyPDFGenerator {
public static void main(String[] args) throws IOException, DocumentException {
//Paramètrage du fichier à convertir
//String baseFolder = System.getProperty("user.dir") + "/"; // correspond à la racine du projet Java
String entree = args[0];
String sortie = args[1];
File f = new File(entree);
if(f.exists() && !f.isDirectory()) {
OutputStream os = new FileOutputStream(sortie);
//Génération du PDF avec Flying Saucer
XHTMLToPDF(entree, os);
//fermeture de l'outputStream
os.close();
}
else{
System.err.println("Input file doesn't exist");
}
}
public static void XHTMLToPDF(String entree, OutputStream os) throws IOException, DocumentException {
//Génération du PDF avec Flying Saucer
ITextRenderer renderer = new ITextRenderer();
renderer.setDocument(new File(entree));
renderer.layout();
renderer.createPDF(os);
}
}
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.xhtmlrenderer.extend.FontResolver;
import org.xhtmlrenderer.pdf.ITextRenderer;
import com.lowagie.text.DocumentException;
public class MyPDFGenerator {
public static void main(String[] args) throws IOException, DocumentException {
//Paramètrage du fichier à convertir
//String baseFolder = System.getProperty("user.dir") + "/"; // correspond à la racine du projet Java
//String entree = args[0];
//String sortie = args[1];
String entree = "final.xhtml";
String sortie = "result.pdf";
File f = new File(entree);
if(f.exists() && !f.isDirectory()) {
OutputStream os = new FileOutputStream(sortie);
//Génération du PDF avec Flying Saucer
XHTMLToPDF(entree, os);
//fermeture de l'outputStream
os.close();
}
else{
System.err.println("Input file doesn't exist");
}
}
public static void XHTMLToPDF(String entree, OutputStream os) throws IOException, DocumentException {
//Génération du PDF avec Flying Saucer
ITextRenderer renderer = new ITextRenderer();
FontResolver resolver = renderer.getFontResolver();
renderer.getFontResolver().addFont("../font/cmunrm.ttf", true);
System.out.println(org.xhtmlrenderer.pdf.ITextFontResolver.addFontFaceFont())
renderer.setDocument(new File(entree));
renderer.layout();
renderer.createPDF(os);
}
}
\ No newline at end of file
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.xhtmlrenderer.pdf.ITextRenderer;
import com.lowagie.text.DocumentException;
public class MyPDFGenerator {
public static void main(String[] args) throws IOException, DocumentException {
//Paramètrage du fichier à convertir
//String baseFolder = System.getProperty("user.dir") + "/"; // correspond à la racine du projet Java
String entree = args[0];
String sortie = args[1];
File f = new File(entree);
if(f.exists() && !f.isDirectory()) {
OutputStream os = new FileOutputStream(sortie);
//Génération du PDF avec Flying Saucer
XHTMLToPDF(entree, os);
//fermeture de l'outputStream
os.close();
}
else{
System.err.println("Input file doesn't exist");
}
}
public static void XHTMLToPDF(String entree, OutputStream os) throws IOException, DocumentException {
//Génération du PDF avec Flying Saucer
ITextRenderer renderer = new ITextRenderer();
renderer.setDocument(new File(entree));
renderer.layout();
renderer.createPDF(os);
}
}
\ No newline at end of file
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.xhtmlrenderer.extend.FontResolver;
import org.xhtmlrenderer.pdf.ITextRenderer;
import com.lowagie.text.DocumentException;
public class MyPDFGenerator {
public static void main(String[] args) throws IOException, DocumentException {
//Paramètrage du fichier à convertir
//String baseFolder = System.getProperty("user.dir") + "/"; // correspond à la racine du projet Java
String entree = args[0];
String sortie = args[1];
File f = new File(entree);
if(f.exists() && !f.isDirectory()) {
OutputStream os = new FileOutputStream(sortie);
//Génération du PDF avec Flying Saucer
XHTMLToPDF(entree, os);
//fermeture de l'outputStream
os.close();
}
else{
System.err.println("Input file doesn't exist");
}
}
public static void XHTMLToPDF(String entree, OutputStream os) throws IOException, DocumentException {
//Génération du PDF avec Flying Saucer
ITextRenderer renderer = new ITextRenderer();
FontResolver resolver = renderer.getFontResolver();
renderer.getFontResolver().addFont("../font/cmunrm.ttf", true);
renderer.setDocument(new File(entree));
renderer.layout();
renderer.createPDF(os);
}
}
\ No newline at end of file
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.xhtmlrenderer.pdf.ITextRenderer;
import com.lowagie.text.DocumentException;
public class MyPDFGenerator {
public static void main(String[] args) throws IOException, DocumentException {
//Paramètrage du fichier à convertir
//String baseFolder = System.getProperty("user.dir") + "/"; // correspond à la racine du projet Java
String entree = args[0];
String sortie = args[1];
File f = new File(entree);
if(f.exists() && !f.isDirectory()) {
OutputStream os = new FileOutputStream(sortie);
//Génération du PDF avec Flying Saucer
XHTMLToPDF(entree, os);
//fermeture de l'outputStream
os.close();
}
else{
System.err.println("Input file doesn't exist");
}
}
public static void XHTMLToPDF(String entree, OutputStream os) throws IOException, DocumentException {
//Génération du PDF avec Flying Saucer
ITextRenderer renderer = new ITextRenderer();
renderer.setDocument(new File(entree));
renderer.layout();
renderer.createPDF(os);
}
}
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.xhtmlrenderer.extend.FontResolver;
import org.xhtmlrenderer.pdf.ITextRenderer;
import com.lowagie.text.DocumentException;
public class MyPDFGenerator {
public static void main(String[] args) throws IOException, DocumentException {
//Paramètrage du fichier à convertir
//String baseFolder = System.getProperty("user.dir") + "/"; // correspond à la racine du projet Java
String entree = args[0];
String sortie = args[1];
File f = new File(entree);
if(f.exists() && !f.isDirectory()) {
OutputStream os = new FileOutputStream(sortie);
//Génération du PDF avec Flying Saucer
XHTMLToPDF(entree, os);
//fermeture de l'outputStream
os.close();
}
else{
System.err.println("Input file doesn't exist");
}
}
public static void XHTMLToPDF(String entree, OutputStream os) throws IOException, DocumentException {
//Génération du PDF avec Flying Saucer
ITextRenderer renderer = new ITextRenderer();
FontResolver resolver = renderer.getFontResolver();
renderer.getFontResolver().addFont("../font/cmunrm.ttf", true);
renderer.setDocument(new File(entree));
renderer.layout();
renderer.createPDF(os);
}
}
eclipse.preferences.version=1
org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\n<launchPerspectives/>\n
preferredTargets=default\:default|
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment