|
Posted by The Natural Philosopher on 10/18/07 10:59
Erwin Moller wrote:
> The Natural Philosopher wrote:
>> Erwin Moller wrote:
>>> The Natural Philosopher wrote:
>>>> Ok..am about to embark on making PHP generate basic formatted
>>>> reports to a postscript printer attached to the server.
>>>>
>>>> After many struggles I have the postscript extensions installed and
>>>> have been reading the documentation to at least eliminate the most
>>>> basic stupid questions ;-)
>>>>
>>>> One stupid question remains: How do I select a (printer) embedded font?
>>>>
>>>> it seems that in order to specify a font it has to be found on the
>>>> server. But what if there are none? and one wants to simply use an
>>>> embedded one..like times roman or helvetica.? I am keen to sacrifice
>>>> fancy fonts for slick printing..
>>>>
>>>> I am sure there is some basically stupid issue I have failed to
>>>> grasp here.. be kind to me. It was my birthday yesterday ;-)
>>>>
>>>
>>> Hi,
>>>
>>> Congrats on your birthday!
>>> Hope you don't have a hangover today.
>>>
>>> I am not sure what the problem is: Why don't you simply install a
>>> nice font on the server?
>>> AFAIK you can use the fonts available at the server.
>>> If you are looking for free fonts, google for 'free fonts postscript'
>>> and you'll find a bunch.
>>> But since I am seriously estitically impaired, I suggest you pick the
>>> ones you consider slick yourself. ;-)
>>>
>>> This might also help:
>>> http://en.wikipedia.org/wiki/PostScript_fonts
>>>
>>
>
> Hi,
>
>> Ok. I puzzled through it all..took a long time. But that was mostly
>> because my test machine had a mishmash of apache1.3/2.0 and php4/5.
>> Confused the hell out of pecl..eventually found the file to add the ps
>> extenion to..but..in the meantime..I discovered apache 1.3 wouldn't
>> restart..upgrading the latest php stuff had screwed something else.
>>
>> In the end I said rude woads and settled down to make it apache2/php5
>> and finally got everything upgraded..
>>
>> No, what I didn't realise is that postcript fonts come in two halves -
>> the AFM bit which is adobe font metric, and is the font specification,
>> and PFB which contains the font vectors I suppose.
>>
>
> Sounds like a long day for you...
> I don't envy you.
> Glad I have a provider who really knows how to set up stuff. ;-)
> (Well I pay them for it of course.)
>
>
>> You need to have the AFM files for any fonts you want to use in the
>> same directory as the PHP files. You don't need the PFB files unless
>> you are embedding the font with the document.
>>
>
> maybe this will help, if that is an option for you:
>
> ini_set("include_path",
> ini_get("include_path").";"."/etc/fonts/wherever/the/are/stored");
>
> That way you don't have to store the fonts in all different directories.
> (Not tested)
>
I will test that.
>> I fond the afm files for the two most basic fonts - helvetica and
>> Times Roman - in the open office suite. his is for printing invoices
>> etc, so thats enough..
>>
>> Sometime around midnight I rushed down to the good lady brandishing a
>> sheet of A4 with 'hello world' printed on it and said 'only took me 4
>> 1/2 hours to do that' ;-)
>>
>> The file was only 11K long as well. For postcript, that's pretty good.
>> I've seen a blank sheet of paper take up 16Mbytes before now..
>>
>> The mac viewer took a look at it and spent a minute turning it into a
>> 1.7k PDF.
>>
>> I think Macs and postcript are fucking WONDERFUL, don't you? "How to
>> enforce the most inefficient standard on the printing world"
>>
>
> LOL, I have no clue. :P
>
>>
>>
>> My wife tells me that 'Fontographer will convert any font to postcript
>> if you want' and SHE has a couple of thousand littering her Mac..so
>> plenty more if needed.
>
> Good luck!
Et Tu Erwin..
>
> Regards,
> Erwin Moller
>
Navigation:
[Reply to this message]
|