pdf2fxl:convert pdf2fxl-convert

xpl/pdf2fxl.xpl

This step is used to convert HTML files from Popplers pdftohtml tool

Output Ports

NameDocumentationConnections

result

The result port provides the result of the EPUB packer (a Zip manifest)

css

This port provides the CSS stylesheet.

Options

NameDocumentationDefault

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

StepInputsOutputsOptions

transpect:file-uri input-dir-uri

The output files are stored relative to the base-uri of the document on the primary input port.

source

result

filename = $path

p:directory-list directory-list

result

path = /*/@local-href

letex:store-debug d8e100

source

result on directory-list

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

result on input-dir-uri

concat(/*/@local-href, '/', $filename)

p:load d8e121

result

href = $filepath

letex:store-debug d8e126

source

result on d8e121

result

pipeline-step = concat('pdf2fxl/', $filename)

active = $debug

base-uri = $debug-dir-uri

css:expand d8e136

source

result on d8e126

result

p:wrap-sequence d8e139

source

result

wrapper = 'collection'

letex:store-debug d8e141

source

result on d8e139

result

pipeline-step = 'pdf2fxl/html-collection-pre'

active = $debug

base-uri = $debug-dir-uri

p:xslt transform-html

source

result on d8e141

stylesheet

p:document../xsl/pdf2fxl.xsl

result

letex:store-debug d8e162

source

result on transform-html

result

pipeline-step = 'pdf2fxl/html-collection-transform'

active = $debug

base-uri = $debug-dir-uri

p:xslt sort-html

source

result on d8e162

parameters

p:empty

stylesheet

p:document../xsl/sort-html.xsl

result

letex:store-debug d8e183

source

result on sort-html

result

pipeline-step = 'pdf2fxl/html-collection-post'

extension = 'xhtml'

active = $debug

base-uri = $debug-dir-uri

p:filter d8e192

source

result on d8e183

result

select = '/html:html/html:head/html:style'

p:rename rename-wrapper

source

result on d8e192

result

match = 'html:style'

new-name = 'c:data'

p:delete d8e196

source

result on sort-html

result

match = '/html:html/html:head/html:style'

p:insert d8e205

source

result on d8e196

insertion

 <link type="text/css" rel="stylesheet"/>

result

match = '/html:html/html:head'

position = 'last-child'

p:add-attribute xmlbase

source

result on d8e205

result

match = '/html:html'

attribute-name = 'xml:base'

attribute-value = replace(/*/@local-href, '^(.+)/([^/]+)/?$', '$1/$2/$2.wrap.html')

p:add-attribute css-name

source

result on xmlbase

result

match = '/html:html/html:head/html:link[last()]'

attribute-name = 'href'

attribute-value = replace(/*/@xml:base, '\.x?html$', '.css')

letex:store-debug d8e229

source

result on css-name

result

pipeline-step = 'pdf2fxl/merged-html'

extension = 'xhtml'

active = $debug

base-uri = $debug-dir-uri

p:sink d8e236

source

result on d8e229

p:store css-write

source

result on rename-wrapper

result

method = 'text'

href = /html:html/html:head/html:link[last()]/@href

p:choose d8e252

$generate-epub eq 'yes'

epub:convert epub-convert

source

result on css-name

meta

p:document../conf/epub-config.xml

conf

p:empty

result

terminate-on-error = 'no'

debug = $debug

debug-dir-uri = $debug-dir-uri

status-dir-uri = $status-dir-uri

p:otherwise

p:identity d8e286

source

 <c:data>ok</c:data>

result