how to embed fonts whilst exporting doc to pdf in the code

N

niid more

Hello

I have a VB.net code which exports the document to the pdf on the fly and send to the printer to print, however I am having problems in printing as the printer guy said that the fonts not being embedded into PDF I am exporting.

I have been advised to use a adobe distiller to do some settings before exporting to the PDF manually. However because I am doing this on the fly, I think I would have to incorporate distiller/word settings in the code.

I hope this makes sense?

Please can someone advise?

Thanks

Try
MSdoc = New Microsoft.Office.Interop.Word.ApplicationClass()
MSdoc.Visible = False
MSdoc.Documents.Open(tempFile, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown)
MSdoc.Application.Visible = False
MSdoc.WindowState = Microsoft.Office.Interop.Word.WdWindowState.wdWindowStateMinimize
Dim format As Object = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatPDF
Const wrdFormatDocument = 0
MSdoc.ActiveDocument.SaveAs(dstFile, format, Unknown, Unknown, Unknown, Unknown, Unknown, True, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown, Unknown)
Catch ex As Exception
Throw ex
CommonFunctions.SendErrorEmail("Unable to export the template to the PDF. Filename :" & dstFile, ex.ToString)
Finally

EggHeadCafe - Software Developer Portal of Choice
BASICS: ObjectDataSource Control
http://www.eggheadcafe.com/tutorial...a8f-cbf9127ef50b/basics-objectdatasource.aspx
 
M

Matti Vuori

niid more wrote in news:[email protected]:
I have been advised to use a adobe distiller to do some settings
before exporting to the PDF manually. However because I am doing this
on the fly, I think I would have to incorporate distiller/word
settings in the code.

I hope this makes sense?

No... Save as PDF does not use Distiller at all, so its settings would not
have any effect. I think Word _should_ embedd most fonts automatically. I
understand that by default Word behaves the same way as Distiller and does
not embedd the standard PostScript printer fonts. Selecting PDF/A should
embedd all fonts.

It may also be that the license of your fonts does not allow embedding.

(I wonder what this has to do with PowerPoint...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top