1

Hi,

I'm able to convert a html/php to a pdf, but it shows a question mark "?" on the first page of the top left corner, then the next page is my content,

but if I just use content = "..." and contain all the codes, it's simply just fine, is anyone else having this problem?

Jinx

2

Are you sure it's not a reversed question mark? (I'm thinking of a BOM that could appear because your file is encoded in UTF-8)
avatar
All right. Keep doing whatever it is you think you're doing.
------------------------------------------
Besoin d'aide sur le site ? Essayez par ici :)

3

no.... just a question mark like a normal one

if I don't page a <page> tag in my document, it's at the first line of the document and force one line downwards,

if I have a <page> tag for my document, my whole document appear on the second page.

4

how are you preparing your html content ($contentHTML) ?

when you use var_dump on your $contentHTML, it shows a question mark "?" ?
Ancien pseudo : lolo

5

$selection = '/na_invoice.php';

ob_start();
include(dirname(__FILE__).$selection);
$content = ob_get_clean();

6

Spipu (./4) :
when you use var_dump on your $content, it shows a question mark "?" ?


Ancien pseudo : lolo

7

it shows:

string(5941) "


then my original data


I don't see any question mark anywhere... /__\

8

have you any white space before the first <page> tag ?
Ancien pseudo : lolo

9

Spipu (./8) :
have you any white space before the first <page> tag ?


No

10

I'm having this issue as well. Has the issue been found yet?

EDIT: I fixed the issue by reverting the HTML back to ASCII or UTF without BOM in Notepad++. The UTF-8 characters will be processed according to your HTML2PDF settings ($html2pdf = new HTML2PDF('P', 'A4', 'fr', true, 'UTF-8', array(0, 0, 0, 0)) wink

Just like @Zeph said in the first reply.
Skype: therubyhouse
PHP, WordPress, Ruby on Rails,
Flash game development.