Report to PDF Font question

  • Thread starter Thread starter Whyteboar
  • Start date Start date
W

Whyteboar

I am working to implement a very specific design for an Access report that
needs to be saved as a pdf file. With Stephen Leban's excellent function I
was able to get the report to do so- but with different fonts. The fonts
required for the report are in the Helvetica family, specifically Neue Light
Condensed and Neue Bold Condensed. What I'm getting isn't them, even when I
try to (re)set the PDFNoFontEmbedding key to 1 (or -1).

Is there a way to get the fonts to be duplicated with ConvertReportToPDF
that I'm overlooking? The reports print out properly from Access, but do
not export to PDF with fonts intact.

This is being done in Access 97. (Yes, old, I know, but it's what they
use)

TIA for your help,

Craig
 
There was a bug introduced for Font Embedding in the last release.

At the top of your modReportTOPDF module is the function signature:


Public Declare Function ConvertUncompressedSnapshot Lib "StrStorage.dll" _
(ByVal UnCompressedSnapShotName As String, _ ByVal OutputPDFname As String,
_ Optional ByVal CompressionLevel As Long = 0, _ Optional ByVal
PasswordOwner As String = "", _ Optional ByVal PasswordOpen As String = "",
_ Optional ByVal PasswordRestrictions As Long = 0, _ Optional
PDFNoFontEmbedding As Long = 0 _


) As Boolean


The very last line of the Sig is missing the ByVal declaration:


Optional PDFNoFontEmbedding As Long = 0 _


Should be changed to:


Optional ByVal PDFNoFontEmbedding As Long = 0 _



--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Stephen,
Thank you for your quick response! I did as you suggested and put the
missing 'By Val' declaration in place and tried again. Sadly, no change in
the appearance of the report. Perhaps i am setting the wrong variable in
the command string? This is what I currently have:

blRet = ConvertReportToPDF("PayoutRP", vbNullString, "c:\pdfs\PayoutRPPDF" &
".pdf", False, False, 0, "", "", 0, -1)

Does that look accurate? (I also tested with 0 and 1 as the last variables
sent) If so, any other ideas, or steps I may have missed? When I was using
Arial fonts your function worked perfectly, but they want these specific
fonts and I'm trying to give them to them.

Thank you again for your insights, and very cool functions!

Craig

"Stephen Lebans"
 
The code behind the sample form clearly explains how to call the function
with info on each param. It states:

' PDFNoFontEmbedding - Do not Embed fonts in PDF. Set to 1 to stop the
' default process of embedding all fonts in the output PDF.

So, as per the example, you set the param to 0 to ENABLE font embedding(the
default) or set the param to 1 to DISABLE font embedding.

If you have made the source code correction, recompiled the code module, set
the FontEMbedding param to 0, and it still doesn't work then perhaps you
have a font issue. Are these standard True Type fonts? Do these fonts show
up as embedded when used with another standard PDF printer driver?

Email me one of the fonts and I'll test it here.

(e-mail address removed)


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Stephen,

I did read the inline documentation and understood it as written, but as it
didn't work thought I may have been misunderstanding so tried to change the
variable to see if it would help. Obviously it didn't.

I was confused at the following though-
'... If you are
' using ONLY - any of the standard Windows fonts
' using ONLY - any of the standard 14 Fonts natively supported by the PDF
spec

Does this mean that the required dlls only work with the fonts listed in
your documentation?

Thanks again. I sent you the font I am trying to get to work, hopefully it
got through.

Craig

"Stephen Lebans"
 
The font you sent me is embedding correctly here Craig. It has to be an
implementation issue on your side.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Well nuts. Thank you for looking into it, I do appreciate your time.
Any clue as to how I could be implementing it wrong?

Craig

"Stephen Lebans" wrote in message
news:[email protected]...
 
I've lost track of this thread. Did you make the changes to the code module
I pointed out? Perhaps something went wrong when you copied and pasted from
my post. Check it again just to be sure. Make sure you compile the module.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Stephen, the snapshot looks fine, it's somewhere between the snapshot and
the pdf creation.

Things I've tried:
Corrected the missing 'By Val' setting in the sig line for
PDFNoFontEmbedding.
Hardcoding the PDFNoFontEmbedding variable to 0.
Removing all the optional (and thus using the default) variables.
Re-compiled all modules.
Re-installed the fonts.
Downloaded and installed dynapdf.dll from http://www.dynaforms.com/
Updated Adobe reader

Is there anything else you can thinkk for me to try?

Thank you again,

Craig

"Stephen Lebans" wrote in message
 
Craig I do not know what else to tell you. I was able to embed the font you
Emailed me. Can you Email me the MDB you are working with?
(e-mail address removed)

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Stephen,

I tried condensing the various backends and such to make a single mdb file,
but the feasability is pretty low of making it work like that. Is it
possible to get an older copy of the strStorage.dll file- one that doesn't
allow for *not* embedding the fonts? Further research on the web indicates
that Helvetica fonts are a pdf issue anyway but no good solutions have been
found yet.

Thank you,

Craig
"Stephen Lebans" wrote in message
 
Let's try something else.
In the sample MDB your downloaded from my site there are several reports.
Modify one of them to use the font you want embedded. Use the sample from to
export the report you modified to PDF> Does the font embedd correctly?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Outstanding idea!
Okay, changed/added to the header on the Customer Landscape report to use
the fonts and added the 'by val' to the sig line in the code. Double-clicked
to run the procedure and I get ArialMT instead of the selected/embedded
Helvetica Neue fonts.

The font apparently embeds properly on your machine, so the problem has got
to be on mine. I just don't know what else it could be.

Thanks,

Craig

"Stephen Lebans" wrote in message
 
Ok now send me your modified sample MDB so I can check your code and see if
it functions here properly.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Sent to your private email. I have the suspicion it will operate as
designed on your pc as it seems to be something on (or not on as the case
may be) my pc here. Darn corporate setups. But if you find a coding
mistake of mine, I will be very happy indeed (to find the reason, not to
have made the error!)

Thank you again for your excellent help.

Craig

"Stephen Lebans" wrote in message
 
Back
Top