Font embedding..?

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
lp
Posts: 66
Joined: Mon Dec 12 2005
Location: Italy

Font embedding..?

Post by lp »

Hello,
I'm trying to print some reports using non-default fonts in them.
My customers will be doing that, so I wanted to make sure they'll have no trouble..

I'm setting these options as of now:

Code: Select all

SetFileNameOptions(hPrn,0x80000013) 
that is I'm enabling these:
  • AutoImageCompression 0x80000000
  • EmbedFonts 0x10
  • UseFileName 0x2
  • NoPrompt 0x1
My trouble is that some fonts don't get embedded and get converted to images, thus increasing file size and lowering quality..
In particular I found that a common font called "Vivaldi" doesn't get embedded.
What's stange is that it does get embedded when it's plain italic, but NOT if it's bold italic.
If I mix both variants, the italic bold instance gets rasterized, the plain italic one is correctly embedded.

I also tried adding this to the options:
  • EmbedSimulatedFonts 0x1000000
..but that didn't work :(

Does someone have any clue on this?
That's quite strange...

By the way, how can I tell whether...?
  • ..a font is licensed
  • ..a font is simulated
  • ..a font requires MultilingualSupport
Thank you in advance!
Luke
lp
Posts: 66
Joined: Mon Dec 12 2005
Location: Italy

Re: Font embedding..?

Post by lp »

Well, I guess I should have specified that I'm using Visual Fox Pro 9.0SP2...
I noticed that, when using the "old" engine (the one with ReportBehavior 80), the text written in "Vivaldi italic bold" gets correctly written as a font, not a bitmap. If I switch to ReportBehavior 90 (the new rendering engine) it prints as a bitmap, not an embedded font. On the other hand the text written with "Vivaldi italic" is always output as a font...
I also tried enabling PS simulation, but I see no difference...
Bye!
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Re: Font embedding..?

Post by Joan »

Hello,

ReportBehavior 90 prints the text as images. It is not a matter of using the PDF Converter or another printer.

Hope this help.
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
lp
Posts: 66
Joined: Mon Dec 12 2005
Location: Italy

Re: Font embedding..?

Post by lp »

That's quite odd, since I managed to print using ReportBehavior 90 and got text as fonts, not graphics...
I was happy since it usually didn't work, but could not tell why it's working now.
As a matter of fact, a couple of days ago it stopped using fonts and went back to the usual "graphics" output: what I did was removing the printer and its drivers and installing them again: now I can still print with fonts... but I must try to replicate this on a different machine to be sure.
Anyway I noticed that when I open "printer preferences" I get the "about" screen instead... And now I cannot access that part anymore.. that's why I want to try it on a different machine...

I'll let you know what I'll find.
Have a nice day!
Luke
lp
Posts: 66
Joined: Mon Dec 12 2005
Location: Italy

Re: Font embedding..?

Post by lp »

First of all, please don't mind the "printer preferences" part: I just read that this is "by design", so that's ok :)

For what concerns printing with fonts using ReportBehavior 90, I still cannot reproduce it on other machines.
I tried it on a clean XP virtual machine and what I get is the usual graphics printing (as you told me).

What now bothers me (because it's something I cannot yet understand) is that on my vista business machine (x86) it seems to work (text output using fonts, embedded) with apparently the same configuration as the virtual machine, which doesn't work the same...

These are the options I have:
  • SetFileNameOptions(hPrn,0x80000113)
  • SetImageOptions(hPrn,0x00000003)
  • SetPermissions(hPrn,0xFFFFFFC4)
  • SetUserPassword called with an EMPTY password
  • SetOwnerPassword called with an EMPTY password
  • GetResolution: 300 dpi
  • SetSimPostscript: not called
For sake of clarity, that's what I did:
  • removed all existing Amyuni printers and drivers from my Vista machine
  • stopped the spooler service
  • removed existing amyuni files from the spooler subfolders
  • cleared the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\<myprinter> registry key
  • started again the spooler service
  • installed the 3.02 version of the drivers
After this I'm still able to obtain PDF containing text, not only graphics, using reportbehavior 90...
And that's quite unexpected to me!
What can I check to understand why this machine is "blessed" while others aren't? :)
David
Amyuni Team
Posts: 89
Joined: Mon Dec 18 2006

Re: Font embedding..?

Post by David »

Hello

The situation you are encountering is occurring because of how VFP 9.0 now prints and not the PDF Converter. VFP 9.0 will force VFP to use GDI+ and thus causing the text to be generated as images in the PDF document.

We suggest that you print your PDF reports and setting "SET REPORTBEHAVIOR 80" before printing in VFP.

If you wish to implement VFP 9.0 "SET REPORTBEHAVIOR 90" option you will need to enable the Postscript simulation option of the PDF Converter.

Example:

HANDLE hPrinter;

hPrinter = PDFDriverInit( "My Application Converter" ); // create a new printer

If ( hPrinter )

{

SetSimPostscript( hPrinter, TRUE ); // simulate a Postscript printer

SetDefaultConfig( hPrinter ); // make the values default

}

Hope that helps?
Post Reply