PDF problem with odd font

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

PDF problem with odd font

Postby Bengt » Mon Apr 19, 2010 3:41 pm

Hi,
I use the true type font Pie charts for maps in a printout. It works when printing to paper and if I print a pdf file using Adobe or Cute I also get readable pdf files. The pdf-file generated by VPE is, however not readable, at least not with my Adobe version.

I use VPE with Visual Dataflex. Is is the lines below that cause the problem. If I comment away the first of them, the pdf file get readable.

Send DoVpeSetFont 'Pie charts for maps' 11
Send DoVpeWrite (iLeft+180) VTOP VFREE VFREE (Left(sLjus, 1))

I use VPE 3.6 with the PDF add-on.

Bengt
Bengt
 
Posts: 71
Joined: Fri Jan 27, 2006 5:29 pm

Postby IDEAL Software Support » Tue Apr 20, 2010 6:20 am

VPE v3.60 is from the year 2004 and no longer maintained. The internal font handling code has been enhanced over the past 6 years. Please download the trial version of the current VPE version 6.0 and check, if the problem still persists.
IDEAL Software Support
 
Posts: 1542
Joined: Thu Nov 18, 2004 4:03 pm

Re: PDF problem with odd font

Postby Bengt » Fri Apr 28, 2017 1:27 pm

I still have this problem even with the latest VPE version. If I use the PieChartsForMaps font, i get a readable file when printing to Adobe pdf writer, but the pdf files generated by VPE are unreadable, at least with my Adobe PDF reader version. This program gives the error "An error occurred when a page was processed. A problem occurred when the document was read (135)", (My translation from a message in Swedish).

Is it possible to solve this problem? It is importans for me as I want to attach such files to E-mails created with VPE.

Bengt
Bengt
 
Posts: 71
Joined: Fri Jan 27, 2006 5:29 pm

Re: PDF problem with odd font

Postby IDEAL Software Support » Fri Apr 28, 2017 6:09 pm

This seems to be a symbol font. Try to set the VPE.CharSet property to VCHARSET_SYMBOL and let me know the result.
IDEAL Software Support
 
Posts: 1542
Joined: Thu Nov 18, 2004 4:03 pm

Re: PDF problem with odd font

Postby Bengt » Sat Apr 29, 2017 10:37 pm

I tried but it was no difference.

Bengt
Bengt
 
Posts: 71
Joined: Fri Jan 27, 2006 5:29 pm

Re: PDF problem with odd font

Postby IDEAL Software Support » Tue May 02, 2017 11:20 am

We downloaded the font - created by a non-professional in 1996 - and had a very nice 6-hour debug session.

The font has no PostScript name field within its internal data structures. VPE parses and manages the True-Type font structures and our code assumed that the presence of this field is required. But indeed it is optional.

We now updated our code, so this case is handled. It will be made available with the next release of VPE. To be able to create a working PDF file when using this font, the font needs to be embedded within the document (set VPE.EmbedAllFonts = true). You will notice that Adobe PDF Creator also always embeds this font, even if you instruct it not to embed any font.
IDEAL Software Support
 
Posts: 1542
Joined: Thu Nov 18, 2004 4:03 pm

Re: PDF problem with odd font

Postby Bengt » Wed May 03, 2017 8:54 am

From your answer, I was not sure if it is possible tom embed the Pie charts for maps font now with VPE 7.1, or if that will only work in the next version. I tried to do it now and got much bigger pdf files with embedded fonts, but the same error when trying to open them with Adobe PDF Reader.

When will the next VPE version be available?

Bengt
Bengt
 
Posts: 71
Joined: Fri Jan 27, 2006 5:29 pm

Re: PDF problem with odd font

Postby IDEAL Software Support » Wed May 03, 2017 10:28 am

The fix will be made available with the next release. There is no release date yet.

Of course the files are bigger, if you embedd the fonts. You can enable font subsetting (VPE.SubsetAllFonts), so VPE generates and embeds new fonts, which do only contain the characters used within the document.

You can also specify for each font individually whether to embed and / or subset it. See VPE.SetFontControl().

As a workaround you can try to use a font editor and edit the PostScript name field of the font, so it has a name.
IDEAL Software Support
 
Posts: 1542
Joined: Thu Nov 18, 2004 4:03 pm

Re: PDF problem with odd font

Postby Bengt » Wed May 03, 2017 2:07 pm

That worked really good. Subsetting the fonts made the files considerably smaller and I suppose it is a good idea to embed them, especially when odd fonts are used.

PostScript name seems normally to be set automatically by font editors. FontForge, which is free, doesn't even display the PostScript name, but it is set when the font is saved.

Bengt
Bengt
 
Posts: 71
Joined: Fri Jan 27, 2006 5:29 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: Bing [Bot] and 4 guests

cron