Forum How do I...?

When splitting one file into two files, and merging in PDF, I get blank page.

Ehart
Seems I stumbled upon an issue with PrinceXML, where the guides didn't help me unfortunately.

Consider the following setup:
One HTML-file for DOM-structure.
Various CSS files.

In the PrinceXML GUI, I add the HTML-file together with the bunch of stylesheet files to the convertor. The output is aligned, all pages are filled with the desired content.

The HTML DOM is structured like this:

<html>
<head>
</head>
<body>
<div>
foo
bar
</div>
</body>
</html>


For testing purposes, the HTML DOM is splitted in the hard way:

HTML 1:
<html>
<head>
</head>
<body>
<div>
foo


HTML 2:
bar
</div>
</body>
</html>


Then I feed the PrinceXML GUI with the two HTML files and bunch of stylesheets, and merge them into one PDF-file. The output is the same, but I notice there is a blank page added as the first page. So it makes me to wonder where to begin with debugging.

Any suggestion would be appreciated.

Edited by Ehart

mikeday
Elements can't span across files, so the second file needs to begin <html> ... etc.

Do you use any properties like page-break-after or page-break-before?
Ehart
Hi mikeday, thanks for your helpful answer. That's correct, I use the CSS-property page-break-after (as in page-break-after: always).

I'm wondering if you want to get a look into the testing HTML-file and stylesheet that I currently test with PrinceXML? I'm really considering to buy PrinceXML.

Edited by Ehart

mikeday
Sure I can take a quick look, you can email it to me (mikeday@yeslogic.com) or attach it here.
Ehart
Thanks for offering your help. I e-mailed the examples to you, in the hope the case is clear enough for you.

Edited by Ehart

mikeday
Every HTML file will generate at least one page, and the first and last HTML files have no textual content, so that's where the blank pages are coming from.

Also, you can't really split HTML files, as each individual file will be treated as an independent file in it's own right.
Ehart
Thanks for your helpful reply, it's clear to me. I will look for a workaround to solve this issue.

You can consider this issue as closed, if you want.