pdf2fxl:convert pdf2fxl-convert
xpl/pdf2fxl.xpl
This step is used to convert HTML files from Popplers pdftohtml tool
Input Ports
none
Output Ports
Name | Documentation | Connections |
---|---|---|
resultⓅ | The result port provides the result of the EPUB packer (a Zip manifest) | |
css | This port provides the CSS stylesheet. |
Options
Name | Documentation | Default |
---|---|---|
pathⓇ | The path to the directory which contains the HTML files derived from pdf2html | |
rastertext | Must be set to yes, if you want to use rasterized page spreads. | 'no' |
headline-fontsize | Defines the fontsize in px that is used to detect headlines for toc generation. | 35 |
genenerate-epub | 'no' | |
debug | Used to switch debug mode on or off. Pass 'yes' to enable debug mode. | 'yes' |
debug-dir-uri | Expects a file URI of the directory that should be used to store debug information. | 'debug' |
progress | Whether to display progress information as text files in a certain directory | 'yes' |
status-dir-uri | Expects URI where the text files containing the progress information are stored. | concat($debug-dir-uri, '/status') |
Subpipeline
Step | Inputs | Outputs | Options | ||
---|---|---|---|---|---|
transpect:file-uri input-dir-uri The output files are stored relative to the base-uri of the document on the primary input port. |
| result | filename = $path | ||
p:directory-list directory-list | result | path = /*/@local-href | |||
letex:store-debug d8e100 |
| result | pipeline-step = 'pdf2fxl/directory-list' active = $debug base-uri = $debug-dir-uri | ||
p:for-each d8e110 | |||||
p:variable filename | c:file/@name | ||||
p:variable filepath | concat(/*/@local-href, '/', $filename) | ||||
p:load d8e121 | result | href = $filepath | |||
letex:store-debug d8e126 | result | pipeline-step = concat('pdf2fxl/', $filename) active = $debug base-uri = $debug-dir-uri | |||
css:expand d8e136 | result | ||||
p:wrap-sequence d8e139 |
| result | wrapper = 'collection' | ||
letex:store-debug d8e141 | result | pipeline-step = 'pdf2fxl/html-collection-pre' active = $debug base-uri = $debug-dir-uri | |||
p:xslt transform-html |
| result | |||
letex:store-debug d8e162 |
| result | pipeline-step = 'pdf2fxl/html-collection-transform' active = $debug base-uri = $debug-dir-uri | ||
p:xslt sort-html |
| result | |||
letex:store-debug d8e183 | result | pipeline-step = 'pdf2fxl/html-collection-post' extension = 'xhtml' active = $debug base-uri = $debug-dir-uri | |||
p:filter d8e192 | result | select = '/html:html/html:head/html:style' | |||
p:rename rename-wrapper | result | match = 'html:style' new-name = 'c:data' | |||
p:delete d8e196 | result | match = '/html:html/html:head/html:style' | |||
p:insert d8e205 | result | match = '/html:html/html:head' position = 'last-child' | |||
p:add-attribute xmlbase | result | match = '/html:html' attribute-name = 'xml:base' attribute-value = replace(/*/@local-href, '^(.+)/([^/]+)/?$', '$1/$2/$2.wrap.html') | |||
p:add-attribute css-name | result | match = '/html:html/html:head/html:link[last()]' attribute-name = 'href' attribute-value = replace(/*/@xml:base, '\.x?html$', '.css') | |||
letex:store-debug d8e229 | result | pipeline-step = 'pdf2fxl/merged-html' extension = 'xhtml' active = $debug base-uri = $debug-dir-uri | |||
p:sink d8e236 | |||||
p:store css-write |
| result | method = 'text' href = /html:html/html:head/html:link[last()]/@href | ||
p:choose d8e252 | |||||
$generate-epub eq 'yes' | |||||
epub:convert epub-convert |
| result | terminate-on-error = 'no' debug = $debug debug-dir-uri = $debug-dir-uri status-dir-uri = $status-dir-uri | ||
p:otherwise | |||||
p:identity d8e286 |
| result |