Forum Bugs

Solaris Sparc - error: ID 1_indv_items already defined

brentl999
Getting the following error on Solaris:

Mon Jul 28 09:10:07 2008: -:1650: error: ID 1_indv_items already defined
Mon Jul 28 09:10:07 2008: -:1683: error: ID 1_indv_items already defined
Mon Jul 28 09:10:07 2008: -:1716: error: ID 1_indv_items already defined
Mon Jul 28 09:10:07 2008: -:1749: error: ID 1_indv_items already defined
Mon Jul 28 09:10:07 2008: -:1782: error: ID 1_indv_items already defined
Mon Jul 28 09:10:07 2008: -:1815: error: ID 1_indv_items already defined
Mon Jul 28 09:10:07 2008: -:1848: error: ID 1_indv_items already defined
Mon Jul 28 09:10:07 2008: -:1881: error: ID 1_indv_items already defined
Mon Jul 28 09:10:07 2008: -:1914: error: ID 1_indv_items already defined
Mon Jul 28 09:10:08 2008:
/usr/openwin/lib/X11/fonts/TTbitmaps/Arial-Bold18.pcf.Z: warning: font
has no TrueType outlines
Mon Jul 28 09:10:08 2008:
/usr/openwin/lib/X11/fonts/F3bitmaps/GilSB14.pcf.Z: warning: font has no
TrueType outlines

Is this a bug or a just a font configuration issue?

Thanks
mikeday
The ID errors relate to the input document, which must be using id="1_indv_items" multiple times, while IDs are supposed to be unique. This won't cause any problems though unless you want to link to one of these elements.

The font warnings are because Prince is trying to load TrueType fonts but being given bitmap fonts by Fontconfig. These can't be loaded, but hopefully Prince is able to continue and find other TrueType fonts which can, and still generate the PDF, right? :)

We'll take a look at our Fontconfig code, as we try to tell it to only give us TrueType fonts in the first place.
brentl999
No pdf is generated. I am trying to obtain a copy of the input file.
brentl999
The input content type does not seem to affect this problem. I believe the font error is causing Prince to abend.
mikeday
Are there TrueType fonts installed on the system, and are you using the latest version of Prince?
brentl999
I will email attachments with the font list, font cache, version info separately.
fran
Hi,

I've got the same problem on solaris 10 (x86).

prince http://url/test.html -o test.pdf
prince: /usr/openwin/lib/X11/fonts/TTbitmaps/Arial-Bold18.pcf.Z: warning: font has no TrueType outlines
prince: /usr/openwin/lib/X11/fonts/F3bitmaps/Helvetica-Narrow-Bold6.pcf.Z: warning: font has no TrueType outlines
prince: internal error: no available fonts


How can I solve the problem ?

I have tried to put in my css :
@font-face {
    font-family: sans-serif;
    font-style: normal;
    font-weight: normal;
    src: url("/mydir/fonts/Arial.ttf")
}

@font-face {
    font-family: sans-serif;
    font-style: normal;
    font-weight: bold;
    src: url("/mydir/fonts/Arial.ttf")
}

@font-face {
    font-family: sans-serif;
    font-style: italic;
    font-weight: normal;
    src: url("/mydir/fonts/Arial.ttf")
}

@font-face {
    font-family: sans-serif;
    font-style: italic;
    font-weight: bold;
    src: url("/mydir/fonts/Arial.ttf")
}


But it does not work.

Thanks,
François
brentl999
A temporary work around is move TTbitmaps out of the fonts directory. Note, just renaming the directory will not work, it has to moved completely out of the fonts directory.

Otherwise, I think a bug fix is in the works.
fran
brentl999 wrote:
A temporary work around is move TTbitmaps out of the fonts directory. Note, just renaming the directory will not work, it has to moved completely out of the fonts directory.

Otherwise, I think a bug fix is in the works.


Thanks for your quick answer, I will ask my admin system to make this modification.

François
brentl999
Please note, any directory with .pcf.Z files in it will also have to be moved, not just the TTBitmaps as I originally stated.
fran
fran wrote:
brentl999 wrote:
A temporary work around is move TTbitmaps out of the fonts directory. Note, just renaming the directory will not work, it has to moved completely out of the fonts directory.

Otherwise, I think a bug fix is in the works.


Thanks for your quick answer, I will ask my admin system to make this modification.

François


My system admin has only moved TTbitmaps directory and it works.
Thanks,
François
patpat
I have the same problem, same platform and just moving the directory wasn't a solution...
please help.... what can i do?
mikeday
Try the new pre-release version, which fixes this problem: prince-6.0r7-sol10sparc.tar.gz
patpat
I'll give it a try... thanks
patpat
tested.. it did work !
thanks Prince...
bananaaus
Hi Mike,

I've downloaded the latest package for solaris10 as instructed but I still have the following problems with the out of the box installation:

Thu Oct 30 10:51:30 2008: ---- begin
Thu Oct 30 10:51:30 2008: /usr/openwin/lib/X11/fonts/TTbitmaps/Arial-Bold18.pcf.Z: warning: font has no TrueType outlines
Thu Oct 30 10:51:30 2008: /usr/openwin/lib/X11/fonts/F3bitmaps/Helvetica-Narrow-Bold6.pcf.Z: warning: font has no TrueType outlines
Thu Oct 30 10:51:30 2008: internal error: no available fonts
Thu Oct 30 10:51:30 2008: ---- end



The *.pdf.Z files exist. Could you please give me some suggestions as how to fix this problem?
mikeday
Do you have any TrueType fonts installed? For example, .ttf files for Arial and Times New Roman? Also, can you check that you are running the latest build of Prince (6.0 rev 7) by running prince --version.
bananaaus
Thanks for the quick reply.

I can confirm that our version is 6.0 rev 7.

We have Arial.ttf, TimesNewRoman.ttf and a whole lot of other fonts under /usr/openwin/lib/X11/fonts/TrueType but the error log shows that Prince is looking in /usr/openwin/lib/X11/fonts/TTbitmaps.

Is there a config for the solaris version of PrinceXML to specify the correct path to the TrueType fonts?
mikeday
It should find them automatically using the Fontconfig library, and we made a change in Prince 6.0 rev 7 to ensure that non-TrueType fonts would not shadow TrueType fonts with the same name, so I'm not sure why this is happening. One thing you can try is explicitly referencing the fonts by path name using @font-face rules, like this:
@font-face {
    font-family: Times New Roman;
    font-weight: normal;
    font-style: normal;
    src: url("/usr/openwin/lib/X11/fonts/TrueType/path/to/times.ttf")
}

or wherever times.ttf is located. This should be an adequate workaround while we take another look at why automatic font scanning isn't working.
bananaaus
Hmm...

The show stopper seems to be specifying sans-serif in the font-family.

body {
	font-size:80%;
	font-family:Tahoma, Arial, Helvetica, sans-serif;
}


I removed it and Prince is generating PDF files now but Prince is still looking in TTbitmap directory rather than TrueType so I still get the TrueType warning.

Another thing that I noticed is that no matter what font family I specify in the css, it's ignored. Instead, some kind of serif font is used.

For example, I specified font-family: Arial and Prince gave the following warning:

Thu Oct 30 15:49:33 2008: ---- begin
Thu Oct 30 15:49:34 2008: /usr/openwin/lib/X11/fonts/TTbitmaps/Arial-Bold18.pcf.Z: warning: font has no TrueType outlines
Thu Oct 30 15:49:34 2008: finished: success
Thu Oct 30 15:49:34 2008: ---- end
mikeday
It seems that Prince cannot find the TrueType version of Arial as it is being shadowed by the bitmap version. Adding a @font-face rule for Arial that points directly to the .ttf file should solve this.
bananaaus
Hi Mike,

Thank you so much for helping me out with this problem.

I tried your suggestion and the following works:

@font-face {
		    font-family: Arial;
		    font-weight: normal;
		    font-style: normal;
		    src: url("/usr/openwin/lib/X11/fonts/TrueType/Arial.ttf")
		}


But assigning the bold variation using the following methods doesn't work even though the file exists.

@font-face {
		    font-family: Arial;
		    font-weight: bold;
		    font-style: italic;
		    src: url("/usr/openwin/lib/X11/fonts/TrueType/Arial-BoldItalic.ttf")
		}

@font-face {
		    font-family: Arial;
		    font-weight: 800;
		    font-style: normal;
		    src: url("/usr/openwin/lib/X11/fonts/TrueType/Arial-Bold.ttf")
		}


The log displays the following even though I don't have any 18 font size...

Thu Oct 30 16:43:34 2008: ---- begin
Thu Oct 30 16:43:34 2008: /usr/openwin/lib/X11/fonts/TTbitmaps/Arial-Bold18.pcf.Z: warning: font has no TrueType outlines
Thu Oct 30 16:43:35 2008: finished: success
Thu Oct 30 16:43:35 2008: ---- end
mikeday
This is probably due to the use of "font-weight: 800" for the second rule. The "bold" keyword is treated as 700 in CSS, so it's probably overlooking the @font-face rule and trying to use the bold bitmap font instead. Try using "font-weight: bold".
bananaaus
Hi Mike,

What I meant is that I tried both at separate attempts and none of them works.

Sorry for the confusion...
mikeday
Did you try "font-weight: bold; font-style: normal;" for bold text?
bananaaus
Hi Mike,

I've tried the normal bold too and it didn't work.

@font-face {
		    font-family: Arial;
		    font-weight: bold;
		    font-style: normal;
		    src: url("/usr/openwin/lib/X11/fonts/TrueType/Arial-Bold.ttf")
		}
mikeday
As a last resort, try running with the --no-system-fonts argument on the command-line, which will disable font scanning entirely, so that the bitmap fonts should be unable to shadow the TrueType fonts in the @font-face rules.
bananaaus
I did that to no effect. Prince still gives me the following...

prince: /usr/openwin/lib/X11/fonts/TTbitmaps/Arial-Bold18.pcf.Z: warning: font has no TrueType outlines
mikeday
Hmm, this is getting ridiculous, as Prince should not even be checking for installed fonts when run with this argument. Can you try these two commands from the terminal:
$ prince --debug foo.html
...
$ prince --debug --no-system-fonts foo.html

where "foo.html" can be a non-existent file. The first command should print out a list of the fonts that were detected on the system:
prince: debug: font-family: Bitstream Vera Sans
prince: debug: font-family: Bitstream Vera Sans Mono
prince: debug: font-family: Bitstream Vera Serif
...

while the second command should not print these out, as it should not be checking the system fonts at all.
bananaaus
Hi Mike,

First of all, thanks for your patience and help so far.

The following command

$ prince --debug foo.html


prints out a list of the fonts plus

...
prince: loading style sheet: /usr/local/lib/prince/style/fonts.css
prince: debug: loaded resource: /usr/local/lib/prince/style/fonts.css
prince: debug: loaded resource: type: no
prince: loading HTML input: foo.html
prince: warning: failed to load external entity "foo.html"
prince: foo.html: error: could not load input file
prince: error: no input documents to process


I noticed that it doesn't detect fonts such as Arial-Bold.ttf, Arial-Italic.ttf and Vera.ttf which are in my /usr/openwin/lib/X11/fonts/TrueType.

...
prince: debug: font-family: AngsanaUPC
prince: debug: font-family: Arial
prince: debug: font-family: Arial Hebrew
prince: debug: font-family: Arial Narrow MT
prince: debug: font-family: Bembo
...


The following command

$ prince --debug --no-system-fonts foo.html


prints out

prince: debug: loading license: /usr/local/lib/prince/license/license.dat
prince: loading style sheet: /usr/local/lib/prince/style/fonts.css
prince: debug: loaded resource: /usr/local/lib/prince/style/fonts.css
prince: debug: loaded resource: type: no
prince: loading HTML input: foo.html
prince: warning: failed to load external entity "foo.html"
prince: foo.html: error: could not load input file
prince: error: no input documents to process
mikeday
So with --no-system-fonts it is not picking up Arial. In that case, the @font-face rules locating the .ttf files for Arial should allow you to use the Arial font family in your documents, without any warnings relating to .pcf.Z files, when you use the --no-system-fonts flag. How is this failing to work?
bananaaus
I double checked the HTML and the CSS files to make sure that they are the same in my Windows and in my Solaris machines. They are and the resulting PDF file from Windows does not have this font problem.

Sorry Mike...I don't know... :(
bananaaus
Hi Mike,

I have more information...the default font family used is Times New Roman.

prince: used font: Times New Roman, Bold
prince: used font: Times New Roman, Regular


Is this the default font specified by Prince? I do have them in /usr/openwin/lib/X11/fonts/TrueType/ where Arial and its variation are.
mikeday
Yes, if you open up fonts.css in the style directory of the Prince installation you will find definitions for the serif and sans-serif default font families, which redirect to a set of fonts including Times New Roman and Arial respectively.
bananaaus
Ok...

The progress so far:

Whenever I specified the sans-serif fonts to Arial.ttf and its variations using @font-face and specified the body to use sans-serif font family everything is fine.

@font-face {
			font-family: sans-serif;
			font-weight: normal;
			font-style: normal;
			src: url("/usr/openwin/lib/X11/fonts/TrueType/Arial.ttf");
		}

		@font-face {
			font-family: sans-serif;
			font-weight: bold;
			font-style: normal;
			src: url("/usr/openwin/lib/X11/fonts/TrueType/Arial-Bold.ttf");
		}

		@font-face {
			font-family: sans-serif;
			font-weight: normal;
			font-style: italic;
			src: url("/usr/openwin/lib/X11/fonts/TrueType/Arial-Italic.ttf");
		}

		@font-face {
			font-family: sans-serif;
			font-weight: bold;
			font-style: italic;
			src: url("/usr/openwin/lib/X11/fonts/TrueType/Arial-BoldItalic.ttf");
		}

body {
	font-size:80%;
	color:#000;
	font-family: sans-serif;
}


However, if I specify the Arial fonts and specifically use Arial in the CSS, the bold version is now Times New Roman.

@font-face {
			font-family: Arial;
			font-weight: normal;
			font-style: normal;
			src: url("/usr/openwin/lib/X11/fonts/TrueType/Arial.ttf");
		}

		@font-face {
			font-family: Arial;
			font-weight: bold;
			font-style: normal;
			src: url("/usr/openwin/lib/X11/fonts/TrueType/Arial-Bold.ttf");
		}

		@font-face {
			font-family: Arial;
			font-weight: normal;
			font-style: italic;
			src: url("/usr/openwin/lib/X11/fonts/TrueType/Arial-Italic.ttf");
		}

		@font-face {
			font-family: Arial;
			font-weight: bold;
			font-style: italic;
			src: url("/usr/openwin/lib/X11/fonts/TrueType/Arial-BoldItalic.ttf");
		}

body {
	font-size:80%;
	color:#000;
	font-family: Arial;
}


2008: ---- begin
Wed Nov  5 17:22:07 2008: /usr/openwin/lib/X11/fonts/TTbitmaps/Arial-Bold18.pcf.Z: warning: font has no TrueType outlines
Wed Nov  5 17:22:07 2008: finished: success
Wed Nov  5 17:22:07 2008: ---- end