Commit 851af97d authored by bperraud's avatar bperraud

Update README + opale to pdf multifiles handling

parent 3624dad5
...@@ -67,6 +67,7 @@ Known bugs ...@@ -67,6 +67,7 @@ Known bugs
* It seems that FS doesn't support the max-width for img tags, which makes proper scaling harder. * It seems that FS doesn't support the max-width for img tags, which makes proper scaling harder.
* ToC lines rendering is sometimes ugly if the title label is too long: dotted leader or even page number may appear on the following line, sometimes colliding between themselves. * ToC lines rendering is sometimes ugly if the title label is too long: dotted leader or even page number may appear on the following line, sometimes colliding between themselves.
* Inline elements like em cause bad paragraphs justification. * Inline elements like em cause bad paragraphs justification.
* Sometimes, they are unwanted page breaks after a heading.
Generic Todo Generic Todo
------------ ------------
...@@ -83,16 +84,17 @@ Generic Todo ...@@ -83,16 +84,17 @@ Generic Todo
Technical notes Technical notes
--------------- ---------------
* This converter works with _only one_ hdoc file in the input folder, please ensure to clean the folder before proceeding with the hdoc you want to convert to PDF. * This converter works with _only one_ hdoc file in the input folder at the moment, please ensure to clean the folder before proceeding with the hdoc you want to convert to PDF. When the multifiles ability is set within the hdoc_to_pdf converter, the opale_to_pdf one shall naturally work because it already implements the opale_to_hdoc multifiles handling (the copy of all the hdoc results into the input directory of the hdoc_to_pdf converter).
User Story User Story
---------- ----------
* L'utilisateur dispose d'un fichier hdoc en entrée, il veut obtenir un fichier pdf paginé en sortie. * Cas d'un fichier hdoc à convertir :
* Il accède au convertisseur (dossier dédié) hdoc_to_pdf. * L'utilisateur dispose d'un fichier hdoc en entrée, il veut obtenir un fichier pdf paginé en sortie.
* Il place le fichier hdoc dans le dossier input. * Il accède au convertisseur (dossier dédié) hdoc_to_pdf.
* Il lance le script run.bat/run.sh ou exécute directement le script ant hdoc_to_pdf.ant. * Il place le fichier hdoc dans le dossier input.
* Il récupère le fichier pdf dans le dossier output. * Il lance le script run.bat/run.sh ou exécute directement le script ant hdoc_to_pdf.ant.
* Il récupère le fichier pdf dans le dossier output.
Capitalisation Capitalisation
......
...@@ -20,8 +20,9 @@ Credits ...@@ -20,8 +20,9 @@ Credits
* Thibault DRAIN * Thibault DRAIN
* Christophe VIROT * Christophe VIROT
* Pierre Lemaire * Pierre Lemaire
* Baptiste PERRAUD * 2016 :
* Raphaël DEBRAY * Baptiste PERRAUD
* Raphaël DEBRAY
Dependance Dependance
...@@ -36,35 +37,37 @@ User documentation ...@@ -36,35 +37,37 @@ User documentation
------------------ ------------------
Unsupported Unsupported
----------- -----------
Refer to the unsupported elements in Opale to Hdoc and in Hdoc to Pdf. Refer to the unsupported elements in Opale to Hdoc and in Hdoc to Pdf.
Known bugs Known bugs
---------- ----------
Refer to the known bugs in Opale to Hdoc and in Hdoc to Pdf. Refer to the known bugs in Opale to Hdoc and in Hdoc to Pdf.
Todo Todo
---- ----
Technical notes Technical notes
--------------- ---------------
* This converter works with _only one_ hdoc file in the input folder at the moment, please ensure to clean the folder before proceeding with the hdoc you want to convert to PDF. When the multifiles ability is set within the hdoc_to_pdf converter, the opale_to_pdf one shall naturally work because it already implements the opale_to_hdoc multifiles handling (the copy of all the hdoc results into the input directory of the hdoc_to_pdf converter).
The converter contains 1 file: The converter contains 1 file:
* opale_to_pdf.ant * opale_to_pdf.ant
It checks wether or not the user specified the parameters and performs the following : It checks whether the user specified or not the parameters and performs the following :
* Copy the input file in the opale_to_hdoc directory. * Copy the input files in the opale_to_hdoc directory.
* Perform the opale_to_hdoc transformation. * Perform the opale_to_hdoc transformation.
* Copy the result in the hdoc_to_pdf directory. * Copy the results in the hdoc_to_pdf directory.
* Perform the hdoc_to_pdf transformation. * Perform the hdoc_to_pdf transformation.
* Copy the result in the opale_to_pdf directory. * Copy the results in the opale_to_pdf directory.
Capitalisation Capitalisation
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<pathelement location="lib/ant-contrib.jar" /> <pathelement location="lib/ant-contrib.jar" />
</classpath> </classpath>
</taskdef> </taskdef>
<!-- Arguments properties --> <!-- Arguments properties -->
<property name="DocType" value="paper" /> <property name="DocType" value="paper" />
<property name="Source" value="none" /> <property name="Source" value="none" />
...@@ -13,19 +13,19 @@ ...@@ -13,19 +13,19 @@
<!-- Beginning --> <!-- Beginning -->
<target name="convert"> <target name="convert">
<antcall target="clean_everything" /> <antcall target="clean_everything" />
<antcall target="opale_to_hdoc" /> <antcall target="opale_to_hdoc" />
<antcall target="hdoc_to_pdf" /> <antcall target="hdoc_to_pdf" />
<antcall target="copy_pdf_output" /> <antcall target="copy_pdf_output" />
</target> </target>
<target name="clean_everything"> <target name="clean_everything">
<delete dir="../opale_to_hdoc/input"/> <delete dir="../opale_to_hdoc/input"/>
<delete dir="../opale_to_hdoc/output/result.hdoc"/> <delete dir="../opale_to_hdoc/output/result.hdoc"/>
<delete dir="../hdoc_to_pdf/input"/> <delete dir="../hdoc_to_pdf/input"/>
<delete dir="../hdoc_to_pdf/output/result.pdf"/> <delete dir="../hdoc_to_pdf/output/result.pdf"/>
</target> </target>
<target name="opale_to_hdoc"> <target name="opale_to_hdoc">
<!--Check wether there is an input using command line or not--> <!--Check wether there is an input using command line or not-->
...@@ -33,41 +33,60 @@ ...@@ -33,41 +33,60 @@
<equals arg1="${Source}" arg2="none" /> <equals arg1="${Source}" arg2="none" />
<then> <then>
<!--There is no input, check the input folder--> <!--There is no input, check the input folder-->
<echo message="The value of property InputFile is ${Source} ... Checking the input folder" /> <echo message="The value of property InputFile is ${Source} ... Checking the input folder" />
<echo message="The value of property DocType is ${DocType}" /> <echo message="The value of property DocType is ${DocType}" />
<!-- get input hdoc file path --> <!-- get input hdoc file path -->
<!--
<fileset id="fileset_scar" dir="${InputPath}" casesensitive="yes"> <fileset id="fileset_scar" dir="${InputPath}" casesensitive="yes">
<include name="*.scar"/> <include name="*.scar"/>
</fileset> </fileset>
<pathconvert property="ScarFile" pathsep="" refid="fileset_scar" /> <pathconvert property="ScarFile" pathsep="" refid="fileset_scar" />
-->
<copy tofile="../opale_to_hdoc/input/sample.scar" file="${ScarFile}"/>
<ant antfile="../opale_to_hdoc/opale_to_hdoc.ant" inheritAll="false"/> <copy todir="../opale_to_hdoc/input">
<fileset dir="${InputPath}" casesensitive="yes">
<include name="*.scar"/>
</fileset>
</copy>
<!--<copy tofile="../opale_to_hdoc/input/sample.scar" file="${ScarFile}"/>-->
<ant antfile="../opale_to_hdoc/opale_to_hdoc.ant" inheritAll="false"/>
</then> </then>
<else> <else>
<!--There is an input--> <!--There is an input-->
<echo message="The value of property Source is ${Source}" /> <echo message="The value of property Source is ${Source}" />
<echo message="The value of property DocType is ${DocType}" /> <echo message="The value of property DocType is ${DocType}" />
<echo message="Executing conversion..." /> <echo message="Executing conversion..." />
<copy tofile="../opale_to_hdoc/input/sample.scar" file="${Source}"/> <copy tofile="../opale_to_hdoc/input/sample.scar" file="${Source}"/>
<ant antfile="../opale_to_hdoc/opale_to_hdoc.ant" inheritAll="false"/> <ant antfile="../opale_to_hdoc/opale_to_hdoc.ant" inheritAll="false"/>
</else> </else>
</if> </if>
</target> </target>
<target name="hdoc_to_pdf"> <target name="hdoc_to_pdf">
<copy tofile="../hdoc_to_pdf/input/sample.hdoc" file="../opale_to_hdoc/output/result.hdoc"/> <!--<copy tofile="../hdoc_to_pdf/input/sample.hdoc" file="../opale_to_hdoc/output/result.hdoc"/>-->
<copy todir="../hdoc_to_pdf/input">
<fileset dir="../opale_to_hdoc/output" casesensitive="yes">
<include name="*.hdoc"/>
</fileset>
</copy>
<ant antfile="../hdoc_to_pdf/hdoc_to_pdf.ant" inheritAll="false"> <ant antfile="../hdoc_to_pdf/hdoc_to_pdf.ant" inheritAll="false">
<property name="DocType" value="${DocType}"/> <property name="DocType" value="${DocType}"/>
</ant> </ant>
</target> </target>
<target name="copy_pdf_output"> <target name="copy_pdf_output">
<copy tofile="output/result.pdf" file="../hdoc_to_pdf/output/result.pdf"/> <!--<copy tofile="output/result.pdf" file="../hdoc_to_pdf/output/result.pdf"/>-->
<copy todir="output">
<fileset dir="../hdoc_to_pdf/output" casesensitive="yes">
<include name="*.pdf"/>
</fileset>
</copy>
</target> </target>
</project> </project>
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