Solved

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

Posted on 2004-09-20
14
666 Views
Last Modified: 2013-12-03
  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


0
Comment
Question by:Stephen-Kinsella
  • 6
  • 5
14 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
Comment Utility
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.
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
Comment Utility
You can find the Disilller PPD here: C:\Program Files\Adobe\Acrobat 6.0\Distillr\Xtras
0
 

Author Comment

by:Stephen-Kinsella
Comment Utility
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
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
Comment Utility
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.

0
 

Author Comment

by:Stephen-Kinsella
Comment Utility
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

0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Stephen-Kinsella
Comment Utility
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.  

0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
Comment Utility
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.
0
 

Author Comment

by:Stephen-Kinsella
Comment Utility
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
0
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
Comment Utility
When you do a print to file (either withthe Adobe PDF printer, or the printer that you installed with the Distiller PPD) you will create a PostScript file, and not a PDF file. You need to call distiller from your program to convert this to PDF.
Programatically creating PDF by printing to the Adobe PDF printer requires this two step approach because you otherwise don't have any control over the output filename. You first write out a PostScript file with a filename that you specify in your program, then you start Distiller - using the Distiller API from the Acrobat SDK - to convert this Postscript file to PDF. As the last step, you delete the PostScript file.

Try to rename the file you've generated to a .ps extension and then double-click on it. Does Distiller start and create a PDF file?
0
 

Author Comment

by:Stephen-Kinsella
Comment Utility
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
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
Comment Utility
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: http://www.experts-exchange.com/Web/Graphics/Adobe_Acrobat/help.jsp#hs5
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Can Be Caused By Disabled Services I have encountered a problem viewing PDF files using Adobe Acrobat Reader.  For the longest time, PDFs might launch or might not.  Sometimes they took about 15 minutes to appear after launching them. After som…
*Adobe Acrobat 9 was used for this article. Particular steps may vary depending on software versions. 1. Create a framework of your form in Word, leaving space where you’d ultimately like the Adobe fields to appear.  (Note: I use the blank lines …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now