I am having a problem with creating a PDF. When I set HTML mode on Prince, my Unicode characters are getting messed up, for example, rendering as 'ö' instead of 'ö' as it should. The prince log shows:
I have found that if I setHTML to false so the page is parsed as XML/XHTML, then my unicode characters display correctly, but all my images disappear. The prince log shows:
I have also found that if I change the doctype (with setHTML still false) that some, but not all my images will start being rendered in the pdf. Which ones render is random, but most of the time it is the first few images in the document that get missed.
The doctype was changed from:
to
This results in the following log entries for the exact same input file:
These image URLs should be publicly available and return PNG files.
What am I missing here? I need to have reliable image rendering as well as correct display of Unicode characters.
Thu Aug 11 09:47:48 2011: ---- begin
Thu Aug 11 09:47:48 2011: Loading document...
Thu Aug 11 09:47:49 2011: Converting document...
Thu Aug 11 09:47:49 2011: Resolving cross-references...
Thu Aug 11 09:47:50 2011: finished: success
Thu Aug 11 09:47:50 2011: ---- end
I have found that if I setHTML to false so the page is parsed as XML/XHTML, then my unicode characters display correctly, but all my images disappear. The prince log shows:
Thu Aug 11 09:45:31 2011: ---- begin
Thu Aug 11 09:45:31 2011: Loading document...
Thu Aug 11 09:45:32 2011: https://byuisdev.brainhoney.com/MathML/Image.ashx?data=%24%24%7B%2Dx%5Cgeq%20%5Cfrac%7B3%7D%7B2%7D%7D%24%24: warning: The requested URL returned error: 400
Thu Aug 11 09:45:32 2011: https://byuisdev.brainhoney.com/MathML/Image.ashx?data=%24%24%7Bx%5Cgeq%20%5Cfrac%7B3%7D%7B2%7D%7D%24%24: warning: The requested URL returned error: 400
Thu Aug 11 09:45:32 2011: https://byuisdev.brainhoney.com/MathML/Image.ashx?data=%24%24%7Bx%5Cleq%20%5Cfrac%7B3%7D%7B2%7D%7D%24%24: warning: The requested URL returned error: 400
Thu Aug 11 09:45:32 2011: https://byuisdev.brainhoney.com/MathML/Image.ashx?data=%28%2Db%20%2B%2Dsqrt%28b%5E2%20%2D%204ac%29%29%2F%287a%29: warning: The requested URL returned error: 400
Thu Aug 11 09:45:32 2011: https://byuisdev.brainhoney.com/MathML/Image.ashx?data=%24%24%7B%20%5Cfrac%7B%2Db%20%5Cpm%20%5Csqrt%7Bb%5E2%2D4ac%7D%7D%7B7a%7D%7D%24%24: warning: The requested URL returned error: 400
Thu Aug 11 09:45:33 2011: https://byuisdev.brainhoney.com/MathML/Image.ashx?data=%24%5Cmbox%7BThe%20following%20expression%20represents%20the%20value%20of%20which%20variable%20in%20the%20solution%20of%20the%20following%20system%20of%20equations%3F%7D%24: warning: The requested URL returned error: 400
Thu Aug 11 09:45:33 2011: https://byuisdev.brainhoney.com/MathML/Image.ashx?data=%24%20%2Dx%20%2B%202y%20%2B%207z%20%3D%2013%24: warning: The requested URL returned error: 400
Thu Aug 11 09:45:33 2011: https://byuisdev.brainhoney.com/MathML/Image.ashx?data=%242x%20%2D%20y%20%2D%202z%20%3D%20%2D2%24: warning: The requested URL returned error: 400
Thu Aug 11 09:45:33 2011: https://byuisdev.brainhoney.com/MathML/Image.ashx?data=%24%203x%20%2B%205y%20%2B%202z%20%3D%20%2D14%24: warning: The requested URL returned error: 400
Thu Aug 11 09:45:33 2011: https://byuisdev.brainhoney.com/MathML/Image.ashx?data=%24y%24: warning: The requested URL returned error: 400
Thu Aug 11 09:45:33 2011: https://byuisdev.brainhoney.com/MathML/Image.ashx?data=%24%5Cmbox%7BIt%20represents%20none%20of%20the%20variables%2E%7D%24: warning: The requested URL returned error: 400
Thu Aug 11 09:45:33 2011: https://byuisdev.brainhoney.com/MathML/Image.ashx?data=%24z%24: warning: The requested URL returned error: 400
Thu Aug 11 09:45:33 2011: https://byuisdev.brainhoney.com/MathML/Image.ashx?data=%24x%24: warning: The requested URL returned error: 400
Thu Aug 11 09:45:33 2011: Converting document...
Thu Aug 11 09:45:33 2011: Resolving cross-references...
Thu Aug 11 09:45:33 2011: finished: success
Thu Aug 11 09:45:33 2011: ---- end
I have also found that if I change the doctype (with setHTML still false) that some, but not all my images will start being rendered in the pdf. Which ones render is random, but most of the time it is the first few images in the document that get missed.
The doctype was changed from:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
to
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
This results in the following log entries for the exact same input file:
Thu Aug 11 09:42:45 2011: ---- begin
Thu Aug 11 09:42:45 2011: Loading document...
Thu Aug 11 09:42:45 2011: -:2: warning: failed to load external entity "file:///C:/Prince/engine/dtd/mathml2/xhtml-math11-f.dtd"
Thu Aug 11 09:42:46 2011: https://byuisdev.brainhoney.com/Resource/2746858,1E/Assets/FinalNumLine.jpg: warning: The requested URL returned error: 400
Thu Aug 11 09:42:46 2011: https://byuisdev.brainhoney.com/MathML/Image.ashx?data=%24%24%7B%2Dx%5Cgeq%20%5Cfrac%7B3%7D%7B2%7D%7D%24%24: warning: The requested URL returned error: 400
Thu Aug 11 09:42:47 2011: Converting document...
Thu Aug 11 09:42:47 2011: Resolving cross-references...
Thu Aug 11 09:42:47 2011: finished: success
Thu Aug 11 09:42:47 2011: ---- end
These image URLs should be publicly available and return PNG files.
What am I missing here? I need to have reliable image rendering as well as correct display of Unicode characters.