Link to home
Start Free TrialLog in
Avatar of Stephen-Kinsella
Stephen-Kinsella

asked on

Print-to-file in Adobe 6 gives "do not send fonts to Distiller" error

  I am trying to print Excel to Adobe 6 using VB.   The code is supposed to print to file with this line:
 
ActiveSheet.PrintOut , printtofile:=True
   
This line does not run but gets a message from adobe PDF:  
"When you create a Postscript file you have to send the host fonts. Please go to printer properties, "Adobe PDF settings" page and turn OFF the option "do not send fonts to Distiller""

  BUT - despite this message Adobe 6 doesn’t have "do not send fonts to Distiller". It does have " do not send fonts to Adobe PDF".   I have turned this off ... But it makes no difference.

Can someone explain how I can get print-to-file in Adobe 6 from VB

Thank you for your help

Stephen Kinsella


Avatar of Karl Heinz Kremer
Karl Heinz Kremer
Flag of United States of America image

You are right, the setting is named "Do not send fonts to Adobe PDF". Adobe renamed the "Distiller" printer to "Adobe PDF" with Acrobat 6, and they may have missed this one string.

You need to uncheck this setting, so that the fonts are included in the PostScript file. Try to do a "Print to File" from an interactive application (e.g. Excel) and set this to on and off and see for yourself that it makes a difference. The problem is that you need to do this without the user interface, and I don't think that this is possible.

You can however change the defaults for the "Adobe PDF" printer, so that it always sends the fonts. Or, you can create a second instance of the Adobe PDF printer that you only use for saving PostScript files (you don't even need the port monitor: Just get the Adobe PostScript driver, and install a printer that points to the Distiller PPD.
You can find the Disilller PPD here: C:\Program Files\Adobe\Acrobat 6.0\Distillr\Xtras
Avatar of Stephen-Kinsella
Stephen-Kinsella

ASKER

thankyou khk
I have tried your first suggeston - print to file from Excel
1) with the "do not send fonts" unchecked - print to file creates a file with no suffix. If I rename it *.ps and click, Distiller pops up and it is recreated as a pdf file, which looks OK. It also makes a pdf log.

2) with "do not send fonts" checked  - print to file does exactly the same as 1).

So it makes no difference that I can see. What does this tell you?  Am I looking at the wrong thing?

On your second suggestion, how would a second printer be any different from the first??  Do you still suggest the PPD?  If so, could you give me a guide as to how I carry out your suggestion to install  a printer that points to the PPD - I am not a programmer - I just make my own VBA applications for Excel, which I use all the time.

Thanks v much for your help

Stephen
Did you change this setting in the Control Panel/printer configuration? If not, do the following:

Open the Control Panel and select the "Printers and Faxes" option. Select the Adobe PDF printer and do a right mouse click and select "Properties". Click on the "Printing Preferences" button on the "General" tab. This will give you access to the "Do not send fonts..." option as a default setting. When you disable it here, you should never have to set it in your print dialog, and all print jobs that are automatically created (e.g. via your VBA application), will also use this setting.

You should probably exit all applications that you want to print from after you make this change.

To not have to change your standard Adobe PDF settings (which will also be active if you print to the Adobe PDF printer interactively), I suggested a second printer that uses the same PPD. If the first suggestion works for you, there is no need to create the second printer, if it does not work, I can give you step by step instructions.

Yes, I unchecked the box in Adobe PDF printer properties via control panel/printers/adobe pdf.  Whether the box is checked or unchecked,'print to file' direct from the Excel print menu to Adobe PDF creates a PS file, so far as I can tell.

(I gather from your answer to another query in EE that it is the attempted creation of a PS file that gives the error message, if I understand correctly.)

I don't know what PPD is.  If this is the solution I would be very grateful for step by step instructions

Stephen

I hadnt tried exiting the application between turning on and off the adobe printer properties box - I have now and  I have to amend the above. Yes there is now the difference when printing to file direct from notepad or excel, it only gives the error message when the box is checked. But when printing to file from VB it still gives the error message whether box is checked or not, even if I close Excel and reload after I change the tick box.  

A PPD file is a PostScript Printer Description file, which - as the name implies - describes the features that a PostScript printer supports. Download the PostScript driver from Adobe's web site:

http://www.adobe.com/support/downloads/product.jsp?product=44&platform=Windows

Start the installer.
On the "Printer Connection Type" screen select the "is directly connected" option.
On the "Local Port Selection" screen select the "File" port.
On the "Select Printer Model" screen click on the "Browse" button. Then browse to this directory: "C:\Program Files\Adobe\Acrobat 6.0\Distillr\Xtras" and select the "Adobe PDF" printer. Click on "OK"
Configure the printer as "Not shared"
Give the new printer a name (can be anything, but you should probably use something that describes the printer - e.g. "Distiller PPD"). Don't make this your default printer, and don't print a test page at this time.

Now try to print programatically to this printer.
I have followed this and found that the printtofile line now is executed from Excel VB. It creates a .pdf file. However when I try to open this file Adobe says "could not open *.pdf because it is not a supported file type, etc.   I am trying to print a small range from an Excel sheet.

Can you tell me what  I do now?

Many thanks
Stephen
ASKER CERTIFIED SOLUTION
Avatar of Karl Heinz Kremer
Karl Heinz Kremer
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes!
Marvellous!
Thank you very much khkremer, you have given me what I needed.

I have added the following (which I  found on pdf planet) which turns the ps file programatically to a pdf file:

DistillerCall = "C:\Program Files\Adobe\Acrobat 6.0\Distillr\Acrodist.exe" & _
" /n /q /o" & PDFFileName & " " & PSFileName
'Call the Acrobat Distiller to distill the PS file. ReturnValue is zero
'if the application doesn't open correctly:
ReturnValue = Shell(DistillerCall, vbNormalFocus)
If ReturnValue = 0 Then MsgBox "Creation of " & PDFFileName & "failed."

I am now well on the way to automatic pdf printing of multiple excel sheets produced via VB in Excel.

Thanks again

Stephen Kinsella
If you are satisfied with the solution, you should close this question. If you need information about how to do that, please review this page: https://www.experts-exchange.com/Web/Graphics/Adobe_Acrobat/help.jsp#hs5