Using Excel VBA to Print to PDF File?

Hi, All !!
I have an Excel VBA application that creates Excel reports.  These need to be sent external to our company in PDF format.  I've downloaded the Acrobat SDK and have found the VB sample for AdobePDFSilent.  Unfortunately, it appears that this is written for VB or VB.Net as I don't have any of the data types available that are created in the code.  However, from another forum, I've gotten some VB code that appears to do many of the processes included in the SDK sample.
The code below doesn't give me any errors, but no PDF file is created.
My VBA code
Declare Function RegOpenKeyA Lib "advapi32.dll" ( _
    ByVal Key As Long, _
    ByVal SubKey As String, _
    NewKey As Long) As Long
Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" ( _
    ByVal hKey As Long, _
    ByVal lpValueName As String, _
    ByVal Reserved As Long, _
    ByVal dwType As Long, _
    lpData As Any, _
    ByVal cbData As Long) As Long
Declare Function RegCloseKey Lib "advapi32.dll" ( _
    ByVal hKey As Long) As Long
Sub TestPrintPDF()
    Dim strDefaultPrinter As String
    Dim strOutFile As String
    Dim lngRegResult As Long
    Dim lngResult As Long
    Dim dhcHKeyCurrentUser As Long
    Dim PDFPath As String
    Const dhcRegSz As Long = 1
1    Workbooks.Open ("\\master\fnshares\bcbcm\Client Management\Client Services\New Account Fees\09 September 2010\3Q10 Rebate Ltrs\Infi\MacroTest\A02.xls")
2    Select Case ActiveWorkbook.Sheets.Count
3        Case 1
4            Sheets(1).Select
5        Case 2
6            Sheets(Array(Sheets(1).Name, Sheets(2).Name)).Select
7        Case 3
8            Sheets(Array(Sheets(1).Name, Sheets(2).Name, Sheets(3).Name)).Select
9        Case 4
10            Sheets(Array(Sheets(1).Name, Sheets(2).Name, Sheets(3).Name, Sheets(4).Name)).Select
11        Case 5
12           Sheets(Array(Sheets(1).Name, Sheets(2).Name, Sheets(3).Name, Sheets(4).Name, Sheets(5).Name)).Select
13      Case 6
14         Sheets(Array(Sheets(1).Name, Sheets(2).Name, Sheets(3).Name, Sheets(4).Name, Sheets(5).Name, Sheets(6).Name)).Select
15  End Select
16  dhcHKeyCurrentUser = &H80000001
17  strDefaultPrinter = Application.ActivePrinter
18  PDFPath = ActiveWorkbook.Path & Application.PathSeparator 'The directory in which you want to save the file
19  strOutFile = PDFPath & Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) & ".pdf" 'Change the pdf file name if required. This should have the fully qualified path
20  lngRegResult = RegOpenKeyA(dhcHKeyCurrentUser, "Software\Adobe\Acrobat Distiller\PrinterJobControl", lngResult)
21  lngRegResult = RegSetValueEx(lngResult, Application.Path & "\Excel.exe", 0&, dhcRegSz, ByVal strOutFile, Len(strOutFile))
22  lngRegResult = RegCloseKey(lngResult)
23  ThisWorkbook.ActiveSheet.PrintOut copies:=1, ActivePrinter:="Adobe PDF"
24  Application.ActivePrinter = strDefaultPrinter
25  ActiveWorkbook.Close False
End Sub
From what I can determine, the lines 17 & 24 combined basically accomplish the same thing as the SaveandUpdateDefaultPrinter function in the SDK (get and save the current default printer and return it to that default after printing the PDF).
Line 20 opens the Registry key for Distiller\PrinterJobControl which is done in part of the ConvertFile function in the following SDK code.
SDK Code
            Dim objDistillerRegKey As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.ClassesRoot
            Dim strDistillerSubKey As String = "SOFTWARE\\Adobe\\Acrobat Distiller\\PrinterJobControl"
            'Open Current User's Distiller Subkey for writing
            objDistillerRegKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(strDistillerSubKey, True)
Line 21 sets the Registry key for Excel with the name of the PDF file to output which also appears to be done in part of the ConvertFile function in the following code.
SDK Code
           If (Not objDistillerRegKey Is Nothing) Then     'set reg key value for this app and file
                objDistillerRegKey.SetValue(strAppPath, strOutputFile)
                objDistillerRegKey.Close()
            End If
I have verified, using RegEdit, that this Registry key does get set with the desired output filename.
Line 23 prints the Excel file to PDF when done manually (this was recorded using the Excel Macro Recorder).  This should be comparable to the PrintToAdobePDF function in the SDK as below.
SDK Code
    Private Sub PrintToAdobePDF(ByVal InputfilePath As String)
        'Prints InputFilePath to the AdobePDF printer.
        'Since we just gathered all this info programmatically,
        'this function assumes the file is present, that it has an
        'associated application and that the current user has print privileges.
        'Define properties for the print process
        Dim pProcInfo As New ProcessStartInfo
        pProcInfo.FileName = InputfilePath
        pProcInfo.Verb = "Print"
        'Make process invisible
        pProcInfo.CreateNoWindow = True
        pProcInfo.WindowStyle = ProcessWindowStyle.Hidden
        'start print process
        Dim pMyProc As Process = Process.Start(pProcInfo)
        pMyProc.WaitForExit()
    End Sub
These are some of the statements I can't do because I don't have a ProcessStartInfo type.  What am I doing wrong or NOT doing that the PDF file is not created?  I hope I've described my situation in enough, but not too much detail.  Thanks for your help.
Nate Brei

Reinhard & Karl Heinz,
Thank you both for your responses and willingness to work with me on this problem.  This is driving me crazy & is getting very frustrating.  It seems that I've tried everything that people have suggested (I've also posted on a VB Forum that I subscribe to) and I'm basically doing what works for everyone else but doesn't work for me.  I've got to be close.
Reinhard, regarding your last post, it doesn't appear to be a one-time setting.  Everytime I come into the Printers Property box (even after I've printed a PDF document manually, that option about system & document fonts is ALWAYS turned on.  If it is a registry setting, please let me know how to turn it off.  I'm using Adobe Acrobat 9 Standard.
Karl Heinz, I've tried that based on my initial post (see the code there).  Since your post, I tried it again.  I get the same result, NO FILE is produced anywhere.
I wish I could post pictures, but evidently I can't.  So, I going to post first my code (in case you want to try to recreate my problem), then the values of the variables in that code when I run it (so you can I have everything set correctly as far as I know), and finally, the values of the Registry entries that I have after I run it.  So, please bear with me as the post may be a little long.
My Code
Declare Function RegOpenKeyA Lib "advapi32.dll" ( _
    ByVal Key As Long, _
    ByVal SubKey As String, _
    NewKey As Long) As Long
Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" ( _
    ByVal hKey As Long, _
    ByVal lpValueName As String, _
    ByVal Reserved As Long, _
    ByVal dwType As Long, _
    lpData As Any, _
    ByVal cbData As Long) As Long
Declare Function RegCloseKey Lib "advapi32.dll" ( _
    ByVal hKey As Long) As Long
Sub TestPrintPDF()
    Dim strDefaultPrinter As String
    Dim strOutFile As String
    Dim lngRegResult As Long
    Dim lngResult As Long
    Dim dhcHKeyCurrentUser As Long
    Dim PDFPath As String
    Const dhcRegSz As Long = 1
    'Workbooks.Open ("\\master\fnshares\bcbcm\Client Management\Client Services\New Account Fees\09 September 2010\3Q10 Rebate Ltrs\Infi\MacroTest\A02.xls")
    Workbooks.Open ("H:\A02.xls")
    Select Case ActiveWorkbook.Sheets.Count
        Case 1
            Sheets(1).Select
        Case 2
            Sheets(Array(Sheets(1).Name, Sheets(2).Name)).Select
        Case 3
            Sheets(Array(Sheets(1).Name, Sheets(2).Name, Sheets(3).Name)).Select
        Case 4
            Sheets(Array(Sheets(1).Name, Sheets(2).Name, Sheets(3).Name, _
             Sheets(4).Name)).Select
        Case 5
            Sheets(Array(Sheets(1).Name, Sheets(2).Name, Sheets(3).Name, _
             Sheets(4).Name, Sheets(5).Name)).Select
        Case 6
            Sheets(Array(Sheets(1).Name, Sheets(2).Name, Sheets(3).Name, _
             Sheets(4).Name, Sheets(5).Name, Sheets(6).Name)).Select
    End Select
    dhcHKeyCurrentUser = &H80000001
    strDefaultPrinter = Application.ActivePrinter
    'The directory in which you want to save the file
    PDFPath = ActiveWorkbook.Path & Application.PathSeparator
    'Change the pdf file name if required. This should have the fully qualified path
    strOutFile = PDFPath & Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) & ".pdf"
    lngRegResult = RegOpenKeyA(dhcHKeyCurrentUser, "Software\Adobe\Acrobat Distiller\PrinterJobControl", _
        lngResult)
    lngRegResult = RegSetValueEx(lngResult, Application.Path & "\Excel.exe", 0&, dhcRegSz, _
        ByVal strOutFile, Len(strOutFile))
    lngRegResult = RegCloseKey(lngResult)
    ThisWorkbook.ActiveSheet.PrintOut copies:=1, ActivePrinter:="Adobe PDF"
    'ThisWorkbook.ActiveSheet.PrintOut copies:=1, preview:=False, ActivePrinter:="Adobe PDF", _
        printtofile:=True, collate:=True, prtofilename:=strOutFile
    'Call printToPdf(strOutFile)
    Application.ActivePrinter = strDefaultPrinter
    ActiveWorkbook.Close False
End Sub
Sub printToPdf(PDFFilename)
    ' Define a postscript file name
    PSFileName = "H:\TempPostScript.ps"
    ' Print the Excel range to the postscript file
    'Dim MySheet As Worksheet
    'Set MySheet = ActiveSheet
    ActiveWindow.SelectedSheets.PrintOut copies:=1, preview:=False, ActivePrinter:="Adobe PDF", _
        printtofile:=True, collate:=True, prtofilename:=PSFileName
    ' Convert the postscript file to .pdf
    Set myPDF = CreateObject("PdfDistiller.PdfDistiller.1")
    myPDF.FileToPDF PSFileName, PDFFilename, ""
End Sub
Values of my Variables When I Run the Code
? dhcHKeyCurrentUser
     -2147483647
? strDefaultPrinter
     \\tcps01p\FNT12W00 Canon 5020 PCL 5e on Ne04:
? PDFPath
     H:\
? strOutFile
     H:\A02.pdf
? lngResult
     2280
? Application.Path & "\Excel.exe
     C:\Program Files\Microsoft Office\OFFICE11\Excel.exe
? dhcRegSz
     1
? Len(strOutFile)
     10
? PSFileName
     H:\TempPostScript.ps
? PDFFilename
     H:\A02.pdf
Values of my Registry Entries (HKEY_CURRENT_USER\Software\Adobe\Acrobat Distiller\PrinterJobControl)
(Default)          REG_SZ          (value not set)
C:\Program Files\Microsoft Office\OFFICE11\Excel.exe          REG_SZ          H:\A02.pdf
LastPdfPortFolder - EXCEL.EXE          REG_SZ          "Q:\Client Management\Client Services\New Account Fees\09 September 2010\3Q10 Rebate Ltrs\Infi\MacroTest
Note:  There are a couple of other entries for documents that I've printed manually that I didn't include.  Also, the last entry above, contains the value of the folder that I last manually "printed" to.
I've also noticed that I have a Registry SubKey under PrinterJobControl called DownloadFonts.  However, the only entry there is:
     (Default) REG_SZ (value not set)
Is this the registry key you mentioned, Reinhard?
As you can see in my code, I have 3 different methods that I've tried to print.  The first one defaults everything after selecting the Acrobat PDF printer.  The second sets the output filename as a PDF (basically what you suggested, Karl Heinz).  The third method calls a procedure that prints to a PostScript file & then uses Distiller to print from that file to pdf.  This is the method Reinhard suggested.
With the first 2 methods, I get NO error messages, but no file(s) show up.  With the 3 method, I get the error about the Fonts checkbox, but it creates a 0K PostScript file.  When I skip that statement and run the other 2 statements, I get a log file that says the PostScript file is empty and not PDF file was created.
YIKES...  What's going on?  Thanks again for attempting to help me!!!
Nate

Similar Messages

  • Using Acrobat X and creating a PDF File from EXCEL 2010, I notice that the Pagination restarts at 1 for each Worksheet included in the PDF.

    I use Acrobat X Standard and created a PDF file from two or more worksheets using EXCEL 2010.
    The resulting PDF file restarts the PAGE # (In header/footer settings of Excel) at 1 for each worksheet.
    However, a colleague of mine who has Acrobat X Pro version, using EXCEL 2010 and same exact file does the same task, he gets a file that starts at page 1 and second worksheet continues the page # from the last page of the First worksheet.
    We both are using the ACROBAT menu (not the print to Adobe printer) to create the file so that we can get Bookmarks included in the resulting file for each worksheet.
    We cannot figure out any option in Acrobat's preferences that controls the pagination on either of these versions of Acrobat.
    So is this just a feature that works one way in Standard version and another way in the Pro version, and the user has no control over it?

    This is so sad. I read your comments and I said, "Huh?" Haha!
    I tried the indexed color option and it did make the final file smaller. Around 600KB. But there's probably another way to make it even smaller like the gazillion-paged pdf file that I mentioned that was only about 300KB.
    And by saying a layout program, does that mean like Adobe InDesign? Does that mean that I should just make my graphics in Photoshop and then import using another program and finish the file there?
    What other layout programs can I use?
    Thank you so much!

  • When printing in Excel It is always want to use the acrobat X pro trial, which the trial is expired. I do not want to use acrobat X pro trial anymore. How can I reset it and use simple acrobat to print my PDF document?

    When printing in Excel It is always want to use the acrobat X pro trial, which the trial is expired. I do not want to use acrobat X pro trial anymore. How can I reset it and use simple acrobat to print my PDF document?

    Hi screen name,
    Adobe PDF printer gets installed when you install Acrobat 10 Pro.
    To use this printer you need to purchase Acrobat. Once the trial period is over you cannot use the printer to create pdf files.
    An alternative way for you is to utilize Microsoft's own inbuilt pdf engine.
    You can simply open the file and select 'Save as' and in the type list select 'pdf'
    Please refer : http://office.microsoft.com/en-in/excel-help/save-as-pdf-HA010354239.aspx
    Regards,
    Rave

  • Printing of Excel graph in Word to pdf file gives scrambled graph.

    Dear All,
    This question is related to my other (solved) question of today: "Print transparent object in Word to pdf and then to printer ugly.". I didn't know how to reopen a question.
    The problem I have is that I pasted a graph from excel into word. When printing to a printer of pdf file all is ok, but when I use the PDF button in word I have get a scrambled graph with the graph line zigzagging all over the place of the graph. When pasting the graph as bitmap it have very poor resolution. Any ideas on how to solve this?
    Thanks,
    Vincent

    There may also be an issue with OFFICE 2007. I have been very disappointed in OFFICE 2007 and really prefer OFFICE 2003, not that I really use OFFICE much anyway. I know that WORD 2007 caused a lot of problems with graphics in conversion to PDF. The add-on from MS solves that problem, but creates other problems. In WORD I have seen a beautiful sunset be split into parts when WORD sent it to Acrobat and when viewed closely there were small lines at the segment boundaries. This did not happen with OFFICE 2003. As I have mentioned in other posts, it is almost as though MS purposely screwed up the output when it sees an Adobe product. I suspect if you try Excel 2003 (if available), the problem will not occur, even with the same version of Acrobat. That suggests WORD is doing something strange.
    I have also found difference in printing to the Adobe PDF printer and using PDF Maker with AA9 and OFFICE 2007. With AA9, Adobe changed the process and PDF Maker no longer uses the printer as I have been told. Thus trying both methods may indicate differences. Too bad that the attachments feature was deactivated for security reasons. Maybe it will come back some day.
    I have the same Excel version as you, but AA9.3.3. It may be the AA version that is part of the problem, but I also suspect a problem with MS. Bill

  • How can I print multiple PDF files at once using Windows 7?

    How can I print multiple PDF files at once, on an HP LJ Pro 400 xcolocr printer without opening each
    one separately using Windows 7?

    I am sorry, but to get your issue more exposure I would suggest posting it in the commercial forums since this is a commercial printer. You can do this at http://h30499.www3.hp.com/hpeb/
    I hope this helps.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Since I downloaded Adobe Reader 11.0.07 I have been totally unable to print any PDF files using my Dell 1720 laser printer - I just get a blinking "error" light on the printer, no other error messages . I never had a problem printing PDF files before down

    Since I downloaded Adobe Reader 11.0.07 I have been totally unable to print any PDF files using my Dell 1720 laser printer - I just get a blinking "error" light on the printer, no other error messages . I never had a problem printing PDF files before downloading the new Reader version. Suggestions? Thank you.

    Hi,
    Which version of Adobe Reader were you using earlier when printing using Dell printed was working fine?
    Thanks,
    Shakti K

  • I used to be able to print a pdf file, but now I can't. Why? And can I have this feature back?

    I would like to be able to print a pdf file from a page in Firefox. I used to be able to do this. Why can't I do this now, and can this feature be turned back on?

    You can also:
    *right-click the Back/Forward button for the drop-down
    *add this extension to add the drop-marker to the Back/Forward button: https://addons.mozilla.org/en-US/firefox/addon/backforward-dropmarker/
    <br />
    <br />
    '''You need to update the following:'''
    *Next Generation Java Plug-in 1.6.0_23 for Mozilla browsers (''version 1.6.0_25 is available for download, but can not be updated using manual update yet'')
    #'''''Check your plugin versions''''' on either of the following links':
    #*http://www.mozilla.com/en-US/plugincheck/
    #*https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #*There are plugin specific testing links available from this page:
    #**http://kb.mozillazine.org/Testing_plugins
    #'''Update the [[Java]] plugin''' to the latest version.
    #*Download site: http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)
    #**'''''Be sure to <u>un-check the Yahoo Toolbar</u> option during the install if you do not want it installed.
    #*Also see "Manual Update" in this article to update from the Java Control Panel in Windows Control Panel: http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates
    #* Removing old versions (if needed): http://www.java.com/en/download/faq/remove_olderversions.xml
    #* Remove multiple Java Console extensions (if needed): http://kb.mozillazine.org/Firefox_:_FAQs_:_Install_Java#Multiple_Java_Console_extensions
    #*Java Test: http://www.java.com/en/download/help/testvm.xml

  • How do I get my 5520 series printer to print larger print, from pdf file. I'm using windows 7

    I am trying to print a pdf file.  I want the print Larger and fill more of each page.  How do I set my printer for this?
    Thank you

    Hi,
    Please:
    (a) Open PDF file,
    (b) Click print,
    (c) select 130% in the box:
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Can we silently print a PDF file programmatically without opening Adobe Reader using DDE messages

    Hi,
    Can anyone help to solve this.
    I want to silently print a PDF file without opening the Adobe reader window.
    Thanks,
    Chandu. G.

    I would like to do that same thing.  Did you ever find an answer to this question?

  • Print a pdf file from sap

    Hello,
    I'm looking for a way to print a .pdf file from sap . The file  was created manualy and is in a newtwork folder.
    I have to send the print to a network printer . Is it possible to use the AcroRd32.exe as a command line?
    Thank you.

    hii,
    try this
    CONVERT_OTFSPOOLJOB_2_PDF
    http://help.sap.com/saphelp_nw04/helpdata/en/27/67443cc0063415e10000000a11405a/content.htm
    PDF - Printing a PDF file from ABAP or SAP Script
    regards,
    Sri.

  • I can not print a pdf file that was sent in an email.  I get the error message that adobe could not

    I can not print a pdf file that was sent in an email.  I get an adobe error message that it can not print with an ok to check and when i do I get another adobe error message that says I did not select a page to print. I have downloaded the latest adobe download.  I forwarded the email to my husband and he printed the document just fine.

    This first question which comes to mind is how do you display the pdf file in the browser?
    For this the browser uses a plug in (e.g. adobe reader) which already has the ability to print the pdf file. Depending on the version of your plug in, printing is started differently.
    Timo
    Ps: which jdev version do you use?

  • Printing problems (PDF files-HP Color Laserjet 1518ni: return the printer?

    Hi everyone, I recently switched platforms and became a Mac user and had to buy a new
    printer because my old HP deskjet is not compatible with my computer. So, I bought an HP
    Color Laser printer, supposedly Mac compatible, but every time I try to print a PDF file it only
    prints the first page. And then stops printing. I spent hours with the HP customer service, reinstalled
    the driver, changed configurations, but it still does the same thing. The customer service representative could not solve the problem. I was wondering if there is any one else who had a similar issue with printing? Is it Mac OS X 10.5.5 that causes the problem? I am about to return the laser printer; it would be so helpful if I got some feedback. If it is a printer issue, then, which printer would you folks recommend that is not too expensive but efficient (I use the printer a lot and need an efficient one) and a printing speed of around 12-20ppm that actually does work with the Mac?
    Thanks in advance!
    Asli

    Asli Igsiz wrote:
    Thank you for calling my attention to the Adobe issue. I did try and print a PDF file with Preview and it worked! How was the issue solved with Adobe 7? Maybe Adobe pro7 also similar bug issues; is it to Adobe that I should be reporting this or to Apple?
    Thanks again.
    It's definitely an Adobe problem. The only solution I ever saw was either to print from Preview or to use later versions of Adobe Reader 8 or any version of Reader 9. I asked Adobe support what the problem was. I never got a reply.
    You should know that Preview (and any other application which reads PDFs using Apple's PDF engine) has a problem with displaying Times Roman Italic, and only Times Roman Italic when launched under OS X 10.5.5. All other fonts appear to work normally; at least I haven't found one which has a problem, including other Times Roman font faces, including Times Roman Bold Italic. Preview seems to print properly, but the on-screen display has problems. The same files display properly with apps which don't use Apple's PDF engine, and also with apps which use Apple's PDF engine under versions of the OS earlier than 10.5.5, going back to at least 9.2.1. Apple is aware of the problem.
    There seems to be at least two problems with the main PDF engines for OS X, Apple's and Adobe's.

  • ?  Printing a PDF file to Adobe PDF messes up everything

    Here are three questions that may be related to each other.  I've wanted to ask them for a long time but kept hoping they would somehow resolve themselves.  Any advice would be appreciated.
    1. When I print a PDF file to Adobe PDF as an image, the black color (even the fonts) becomes gray and blurry.  The selection to print as an image is made in Print (to PDF) - Advanced Print Setup - Settings Custom / Print as Image (resolution 600 dpi, which is the highest available choice).  This happens regardless of what settings I choose  in Print - Properties (Standard, High Quality Print, etc.).
    2. Running OCR on occasion does something similar.  The letters become blurry and grayish.  Everything is more difficult to read after OCR. It's as if Adobe has chosen to substitute the font or color for something blurry.  It's strange. 
    3. Sometimes OCR doesn't make things worse.  The quality doesn't deteriorate.  In this case I wonder whether the quality should actually improve rather than stay as is.  If a letter is recognized despite the fact that its image is not perfect, shouldn't it be substituted in the document by a perfectly solid letter with no defects by using one of the regular Adobe fonts?  Should a real font be used instead of an image of the letter that has been recognized in OCR?
    Are my settings wrong or am I doing something wrong?  I'm using Adobe Acrobat X Pro.
    Thanks in advance.

    What version of Acrobat? What OS? What are your choices when creating the OCR? Without knowing how you are doing things, it is hard to answer.
    It is not clear why you want to create images in a PDF from a current PDF. For a black type style, it is probably better to use a preflight script to convert to gray-scale first and then do your graphic conversion (I am not asking why you want to do this, but just trying to address your question).

  • Acrobat Pro XI Mac won't print a .pdf file, but Apple Preview will print correctly

    Hello,
    I have Acrobat Pro XI for Mac.  recently I've run into pdf files that will show the document on screen ok, show up on print preview screen ok, but when I send it to a printer I either get:
    1.  no printout... the document passes through the printer queue ok, but nothing comes out (no blank paper, nothing).  no data seems to even reach the printer/print server.  no error.  the print job basically vanishes into thin air like the job was never sent
    2.  prints out with all the characters of a text substituted with squares (again, no error. just prints squares instead of text)
    But when I print the same document using Apple's Preview program on the same machine, the file prints out fine.
    I experience this problem with two different Macs, with two different OS versions.  Again both machines will print the .pdf file fine using Apple Preview, but not with Acrobat Pro XI.
    I've searched for this problem, but no one seems to have this problem. I've tried just printing one page, etc., and no difference (won't print, or print wrong using Acrobat, but prints fine using Preview)
    the files are typically sent via e-mail from a vendor, or a web downloaded form (invoice, forms filled out.  some are secure, some are not).  and these are from multiple sources.
    Any ideas what might be the problem, and how to fix this?
    system:
    Mac Pro (early 2008) and MacBook Pro (mid-2011)
    MacOS 10.8.4 and 10.6.8 (multiple computers have this same problem)
    Acrobat Pro XI, 11.0.04
    printer: HP LaserJet 5MP (yes.. old.. but it works) via HP JetDirect + print server on  LAN

    I just found this solution on another board, I tried it  (I removed the same file listed below) and it worked for me.... 
    Safari won’t save or print PDFs: how to fix
    :: Tuesday, January 29th, 2013 @ 5:29:46 am
    :: Tags: Computers
    If Safari won’t save or print PDFs (but views them without any problems), you probably have an Adobe PDF plug-in installed. In Safari, go to Help->Installed Plug-ins and do a search for “PDF.” If you have anything with “PDF” in it other than “WebKit built-in PDF,” that is probably the culprit.
    On my computer, the problem was “AdobePDFViewerNPAPI.plugin”. To remove it, I quit Safari, did a Spotlight search (Command-Option space) for that file name, and then dragged it to the trash. When I restarted Safari, I could print and save PDFs again. You can also manually find the plugins by going to the system “Library”  folder (the one at the root of your hard disk, not in your user folder) and looking in the “Internet Plug-Ins” folder.
    I’m on OS X 10.8.2, running Safari 6.0.2 (8536.26.17).

  • How to print a pdf file from Labview

    Hi,
    Does anyone know how to print a pdf file form Labview. I need to be able to point on the pdf file and to print it.
    Activex examples doesnt seem to be working it always displays an error, on every PC that I tryed to run it.
    {"code 3005" ,,,"Automation Open: Object specified is not creatable in Display PDF in Dialog.vi"}.
    Thank you for your help.
    Regards,
    Jenia.

    You can use the "System Exec.vi". The command line should have the following structure:
    "<Path to AcroRd32.exe>" /t "<Path to document>" "Printer name"
    For example"
    "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe" /t "C:\myreport.pdf" "Tektronix Phaser 300i"
    Regards;
    Enrique
    www.vartortech.com

Maybe you are looking for