Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-09-20
14
Medium Priority
?
746 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
14 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 12105714
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
ID: 12105722
You can find the Disilller PPD here: C:\Program Files\Adobe\Acrobat 6.0\Distillr\Xtras
0
 

Author Comment

by:Stephen-Kinsella
ID: 12122747
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 12122992
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
ID: 12126411
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
 

Author Comment

by:Stephen-Kinsella
ID: 12126795
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
ID: 12127703
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
ID: 12136344
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 2000 total points
ID: 12136958
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
ID: 12143658
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
ID: 12156175
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
PDF files have been in the limelight due to its unmatched features.  Personal documents, emails, business reports and eBooks are all converted into PDF files owing to peerless features provided by it. Adding watermark to a PDF file is a method to se…
In this first video of the three-part Xpdf series, we introduce and describe Xpdf, a library containing nine command line utilities that perform various functions on PDF files. We show where the library is located and how to download it, discuss its…
In this third video of the Xpdf series, we discuss and demonstrate the PDFtoText utility, which converts PDF files into plain text files. Download and install the software.: You may have already downloaded and installed the Xpdf tools while watching…

670 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