Print PDF to File -- OutOfMemory-Exception

Hi all,
versuch gerade mit Acrobat 7/8 Prof. Pdf-Dateien über die SDK in Datei zu drucken, um ein Spoolfile im Format PCL, PS, XPS usw. zu erhalten, je nachdem über welchen Drucker gedruckt wird...
Bei Acrobat 7 Prof. erhalte ich, sobald der Outputfilename gesetzt ist, eine OutOfMemory-Exception.
Das gleiche Sample liefert bei Acrobat 8 Prof. allerdings eine InvalidArguments-Exception...
Lasse ich den Outputfilename-Parameter weg, dann funktioniert der Druck prinzipiell...
Was muss im PrintParams-Objekt alles gesetzt sein um ein PDF auf einem beliebigen Drucker in Datei auszugeben??
Für jede Hilfe bin ich dankbar,
Jo
Hier nochmals mein Post vom Planet-PDF-Forum, aber da tut sich leider auch nichts... :(
not sure if this is the right place, but I'll just give it a try...
currently I'm trying to get this sample to run. It should print a pdf to file without user-interaction. I'm using Adobe Acrobat 7.0 Professional and C#/.NET
This is the VB-Sample I have found:
Module Module1
Sub Main(ByVal CmdArgs() As String)
Dim oApp As Acrobat.CAcroApp
Dim oAvDoc As Acrobat.AcroAVDoc
Dim oDoc As Acrobat.CAcroPDDoc
Dim oJS As Object
Dim oPrinterParams As Object
Dim PRINTER As String
Dim INPUT As String
Dim OUTPUT As String
PRINTER = CmdArgs(0)
INPUT = CmdArgs(1)
OUTPUT = "\" + CmdArgs(2).ToString.Trim
oApp = CreateObject("AcroExch.App")
oAvDoc = CreateObject("AcroExch.AVDoc")
oDoc = CreateObject("AcroExch.PDDoc")
If oAvDoc.Open(INPUT, "") Then
oDoc = oAvDoc.GetPDDoc()
oJS = oDoc.GetJSObject()
oPrinterParams = oJS.getPrintParams()
oPrinterParams.printerName = PRINTER
oPrinterParams.interactive = oPrinterParams.constants.interactionLevel.silent
oPrinterParams.fileName = OUTPUT
oJS.print(oPrinterParams)
End If
oDoc.Close()
oApp.Exit()
End Sub
End Module
However I always get the error #1001: "OutOfMemoryError: Nicht genug Speicher."
System.Runtime.InteropServices.COMException wurde nicht behandelt.
ErrorCode=1001
Message="OutOfMemoryError: Nicht genug Speicher."
Source="Acrobat JavaScript"
StackTrace:
bei Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)
bei Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
bei PDFPrintToFile.Module1.Main(String[] CmdArgs) in C:\Projekte_XPS\PDFPrintToFile\Module1.vb:Zeile 28.
bei System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()
When I use the same example without printing to file it works fine, but not when printing to file... why??? anyone got an idea??
thanx for any help...
I have tried it right now with Acrobat 8 Prof. and I even can't get it to run with that version!??
I'll get either "invalid arguments"-Exception (Must be the 'fileName' parameter - when I comment that one out, at least it shows a SaveAs-Dialog)
or a RPC_E_SERVERFAULT error...

or a RPC_E_SERVERFAULT error...
System.Runtime.InteropServices.COMException was unhandled
ErrorCode=-2147417851
Message="Ausnahmefehler des Servers. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))"
Source="Microsoft.VisualBasic"
StackTrace:
at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
at PDFPrintToFile.Module1.Main(String[] CmdArgs) in C:\Dokumente und Einstellungen\Administrator\Desktop\PDFPrintToFile\Module1.vb:line 28
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
System.Reflection.TargetInvocationException was caught
Message="Exception has been thrown by the target of an invocation."
Source="mscorlib"
StackTrace:
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at PdfPrintTestApp.Form1.PrintWithAcrobatSDK(String pdfFile) in C:\Dokumente und Einstellungen\Administrator\Desktop\PdfPrintTestApp\Form1.cs:line 99
InnerException -> {"InvalidArgsError: Ungültige Argumente."}
what am I doing wrong here!? anyone got an idea what's going wrong here!?

Similar Messages

  • Problem printing PDF picture files imported from JPG using HP Colour InkJet cp1700 printer

    When I print PDF picture files imported from JPG using an HP Colour InkJet cp1700 printer, the picture spills over.  A wide range of other PDF files print OK.  Have tried things such as configuring the printer to scale to letter size, etc,, but without success.  Have a Windows 7 64 bit computer and Adobe Acrobat Pro Extended 9.5.5.  Any ideas?

    Hello there! Welcome to the forums @rt70 
    I understand you're having some issues with printing PDF files from a website on Windows 7.
    I would personally suggest trying to print from that website using a different web browser. If you're using Internet Explorer, try FireFox or Chrome, for example.
    You can also try running the Print and Scan Doctor tool, that will search and try and fix printing issues.
    If you have any issues that continue, please let me know what they are and which programs, websites, and web browsers you have tried, along with the results from running the diagnostic tool above.
    Good luck and have a great day
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • Can one stop Firefox from printing PDF Protected files

    Locking as a duplicate. Please continue with [/questions/992183]
    Fire Fox prints PDF Protected files. How do I stop this from happening and letting users steal my work?

    Basically if an image is published it is likely to be copied one way or another. Maybe consider watermarking and or only providing low resolution copies of images in such pdf s.
    I will close this question. Anyone wishing to give detailed advice may do so in your original thread
    * ''Firefox allows the printing of PROTECTED files on my server. WHY?'' [/questions/992183]
    I could certainly copy an image from a pdf displayed or downloaded by browsers other than Firefox.

  • Cannot print PDFs in any application except Adobe

    I upgraded to OS 10.5 recently (and now 10.5.1 on my laptop), and I am no longer able to print PDF files from Preview, nor am I able to produce PDF files from the printer dialog in any program. Printing PDFs in Adobe Reader works fine. Whatever other program I try to do this in crashes--TeXShop and Preview crash when I try to print a PDF document, while any program crashes when I try to produce a PDF file through the print dialog. The two computers I use are a Macbook Pro 2.0 duo core and a brand-new new iMac. The printer I use is a Brother 2030. I am able to print non-PDF documents such as .rtf files in programs such as Nisus Writer and TextEdit.
    I have to print and deposit my PhD thesis very soon; help will be most appreciated. I could print it from Adobe, but the print quality is much poorer for some reason.

    Do you have the old printer queue in use? This made problems in my case. Remove the queue and the printer in prefpane. Add the printer again and try out. Perhaps in your case it is a differnt problem, but you have nothing to loose.
    Klaus

  • Unable to print PDF internet file unless I save it first

    I am a real estate agent, and all of my software is "cloud" software including the local MLS database.  Most properties have uploaded pdf
    files such as sellers disclosures, surveys, etc.  A few months ago I noticed two issue with the internet pdf files when I open them up - I can now occasionally only print the pdf document if I save it on my own PC first, and another difference is the way that the print option is now displayed as a small pop up box with "print / save" icons in it, BUT this box does not always appear, sometime I just get the menu bar where I have to select print.
    My client database software (also cloud) uses pdf files for letters, envelopes and reports, and it also had a similar issue start about the same time in that the small icon box did not appear and there was no menu bar option, so I could not print at all. I was able to get past that by having the software tech support walkl me through changing the pdf settings to get the small box to appear with the print icon.
    The issue is why are these issues occuring when I'm not changing any defaults?  When I select menu/file/print, or the print icon on the popup box (if it appears), I get the next pop up of my printer and its defaults just like normal. I can make changes or select another printer, or change papertype - whatever I might want to do - or change nothing and take all of the printing defaults, but then NOTHING HAPPENS when I select print. It's like my PC thinks that it's printing, but the file never gets to the printer itself. The print file just seems to disapper into oblivion.
    I tried control panel/programs/uninstall/recover for Adobe Reader, but this did not change anything. I have Adobe 9.3.3 using Windows 7.

    It may be the settings in the HPLJ. On the older HPLJs that I have, the paper size in the printer has to be the same as in the document printing to the printer, or the printer will not print. Check the paper dimensions and compare to the paper settings in the HPLJ -- that may provide the solution, or at least is worth the check.

  • Printing pdf portfolio file list

    How do I print the file list (not individual pdfs) in a pdf portfolio?

    Open it as you did in 1. Portfolios look like normal pdfs but they are not. Pdf Portfolios were a wonderful idea, but the implementation caused a few issues one of which you are experiencing.

  • Print pdf/wdf files from DMS background

    Hi,
    need some guidelines for this topic. i have a requirement to print the pdf or dwf files from DMS server.
    i have write a program to download the files from DMS to local PC, and call method to print the files. However, this is only applicable to foreground.
    is there any way i can do for background?
    please advise.
    thanks in advance.

    Thanks for your reply.
    The file menu doesn't show the print option either. We used to work this way, after installing the 9.0 and Reader X version, this option has disappeared from both the File menu and the right mouse button. For other filetypes, for example Excel the Print option is still available and works properly. Logged in as administrator on the serverconsole, there is no problem. So it seams to be something specific to pdf-formats in a server 2003 environment. The userrights are all set on full control (same as administrator).
    Thanks again

  • Can print .pdf on all computers except one...

    Hi, I looked through here for an answer before posting my question and didn't really find an answer and Adobe charges $39 for support so I am taking this low cost alternative.  Here's my situation.  I was trying to print out a copy of my W-2 for to start my taxes and I was on Google Chrome, right clicked and the page crashed.  Went to IE8, Firefox, Opera and got the same thing.  I got a print preview that has a blank grey screen in the preview section.  I tried to print and a progress bar completed but the Epson Printer Dialog box didn't pop up and give it's respective status bar as it usually does.  This is funny because I went to another computer that I own and the document printed out fine.  This just started happening because I used to could print from this computer that I am typing this question on.  I updated to Reader X and still the same result.  I also went to saved .pdf files and the same thing.  I turned off the firewall and still the same result.  Can anyone out there identify with this problem and perhaps help me out?  I mean I could have both computers in this room but that is inconvenient and make all of my .pdf files obsolete if I can't print them out.  Thanks in advance for your help.
    MC

    Oh yes, the OS I am running is Windows XP Media Edition.  It started when I tried to do this in Reader 9, didn't work so I upgraded to X still didn't work.  Restarted computer didn't work, however didn't uninstall then reinstall.  I also have a wireless printer that I have to turn off the firewall to print other documents for some reason, but .pdf files won't print whether or not firewall is on.  If no help from forum I may be forced to spend the $39 support fee because all of my tax files are on this computer...
    MC

  • Orarrp can't print pdf file directly to printer

    oracle remote print utility (orarrp) can't print pdf file directly to printer.
    we expect orarrp utility can handle ".rrpa" file (i.e. pdf file generated on the application server) by directly print the file to the client's printer, i.e. invoke the acrobat reader on the client side, display the the printer selection dialogue, after confirmation print the pdf file, then the acrobat reader close automatically nicely.
    However we are disappointed as the acrobat reader startup and display the pdf file content but does not print and does not close.
    After testing the problem several times, there are some findings:-
    Finding (A):-
    (a) for the success of direct printing of pdf file, a physical path must be provided; we have tried 2 methods:
    1) using drag & drop to copy the pdf file directly to the browser
    2) open pdf file in the browser directly using browser menu-->File-->Open.
    (b) for the failure of direct printing, a virtual path is involved and we have also tried 2 methods:
    1) when web.show_document() is used
    2) enter the url to the URL bar of the browser,
    eg. http://appsvr.com:7777/report/test_printout/APPSVR1094707.rrpa (this is a virtual path/url)
    Finding (B):-
    (a)when the physical path is used, a temporary pdf file is generated in the same directory where the rrpa file exists in the application server,
    e.g. in application server: d:/printout/yyy.pdf is generated for d:/printout/xxx.rrpa when direct print occurs
    (b) however when the virtual path is used, there is no such temp "pdf" file generated and direct print failed.
    May be when virtual path is used, orarrp utility don't know where to generate the temp "pdf" so direct print doesn't occur.
    So, anyone has similar experience or further queries or has solutions, please join.
    Thanks for your attention.

    Hi,
    It is really late to give response this post. But still who ever refering to this post for the same issue this solution is useful for achieving same in background:
    Even same can be used in smartforms, for getting spool request in PDF format as well which will decrease the size of file when printing in SAP printer.
    ct_tline is PDF output:
    DATA: lv_pdfsource TYPE xstring.
    FIELD-SYMBOLS:<p> TYPE x. " <p> type any.
    LOOP AT ct_tline INTO cs_tline.
      ASSIGN cs_tline TO <p> CASTING TYPE x.
      CONCATENATE lv_pdfsource <p> INTO lv_pdfsource IN BYTE MODE.
    ENDLOOP.
    * ->Create spool request in PDF format
    CALL FUNCTION 'ADS_CREATE_PDF_SPOOLJOB'
      EXPORTING
        printer  = 'LOCL'            "Printer name supporting PDF device type
    *   DEST     =
        pages    = 1
        pdf_data = lv_pdfsource        "XSTRING internal table
    *   NAME     =
    *   SUFFIX1  =
    *   SUFFIX2  =
    *   COPIES   =
    *   PRIO     =
        IMMEDIATE_PRINT         = 'X'
    *   AUTO_DELETE             =
    *   TITLELINE               =
    *   RECEIVER =
    *   DIVISION =
    *   AUTHORITY               =
    *   LIFETIME = '0'
    * IMPORTING
    *   SPOOLID  =
    * EXCEPTIONS
    *   NO_DATA  = 1
    *   NOT_PDF  = 2
    *   WRONG_DEVTYPE           = 3
    *   OPERATION_FAILED        = 4
    *   CANNOT_WRITE_FILE       = 5
    *   DEVICE_MISSING          = 6
    *   NO_SUCH_DEVICE          = 7
    *   OTHERS   = 8
    IF sy-subrc <> 0.
    * Implement suitable error handling here
    ENDIF.

  • How to directly print PDF file(which is stored in SAP) in ABAP report?

    Hi experts,
    I searched SDN for printing PDF file but everything is about OTF to PDF and to use fm: CONVERT_OTF which is not the solution for my problem.
    I have to build ABAP report which will take the PDF file attached to SAP document (CV02N) and print it.So, which function module or program can I use to print the PDF file?
    Thank you very much.
    Kind regards,
    Danijela

    Dear
       this is the code for down load smartform for PDF format. its working properly
    2nd way is
    set your Acrobat Printer as your default printer
    when you print select printer as LOCAL
    then you will file dialog box for Naming PDF
    DATA  :  T_OTF          TYPE ITCOO OCCURS 0 WITH HEADER LINE.
      DATA  :  WA_CTRLOP      TYPE SSFCTRLOP.
      DATA  :  WA_OUTOPT      TYPE SSFCOMPOP.
      DATA  :  T_OTFDATA      TYPE SSFCRESCL.
      DATA  :  T_PDF_TAB      LIKE TLINE OCCURS 0 WITH HEADER LINE.
      DATA  :  V_FILESIZE     TYPE I.
      DATA  :  W_BIN_SIZE     TYPE I.
      WA_CTRLOP-GETOTF = 'X'.
      WA_CTRLOP-NO_DIALOG = 'X'.
      WA_OUTOPT-TDNOPREV = 'X'.
      CALL FUNCTION P_LV_FNAME
        EXPORTING
          OUTPUT_OPTIONS     = WA_OUTOPT
          USER_SETTINGS      = 'X'
          CONTROL_PARAMETERS = WA_CTRLOP
        IMPORTING
          JOB_OUTPUT_INFO    = T_OTFDATA
        EXCEPTIONS
          FORMATTING_ERROR   = 1
          INTERNAL_ERROR     = 2
          SEND_ERROR         = 3
          USER_CANCELED      = 4
          OTHERS             = 5.
      T_OTF[] = T_OTFDATA-OTFDATA[].
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = 'PDF'
          MAX_LINEWIDTH         = 132
        IMPORTING
          BIN_FILESIZE          = W_BIN_SIZE
        TABLES
          OTF                   = T_OTF
          LINES                 = T_PDF_TAB
        EXCEPTIONS
          ERR_MAX_LINEWIDTH     = 1
          ERR_FORMAT            = 2
          ERR_CONV_NOT_POSSIBLE = 3
          OTHERS                = 4.
      DATA  :  LV_DOWN_FILE TYPE RLGRAP-FILENAME.
      DATA  :  LV_TEXT      TYPE STRING.
      CASE SSCRFIELDS-UCOMM.
        WHEN 'REPRUNMOLD'.
          CONCATENATE '(' SO_SCHDT-LOW '-' SO_PLANT-LOW ')' INTO LV_TEXT.
          CONCATENATE '\\lkdb01\FTP-Loadstar\0.PP_Planning\ZPP014\Run_Moulds\' SY-DATUM '-' SY-TIMLO '-' 'Running Mould' '-' LV_TEXT '.pdf' INTO LV_DOWN_FILE SEPARATED BY SPACE.
        WHEN  'REPLINESIT'.
          CONCATENATE '(' SO_SCHDT-LOW '-' SO_PLANT-LOW '-' SO_LINE2-LOW ')' INTO LV_TEXT.
          CONCATENATE '\\lkdb01\FTP-Loadstar\0.PP_Planning\ZPP014\Line_Situation\' SY-DATUM '-' SY-TIMLO '-' 'Line Situation' '-' LV_TEXT '.pdf' INTO LV_DOWN_FILE SEPARATED BY SPACE.
      ENDCASE.
      CALL FUNCTION 'WS_DOWNLOAD'
        EXPORTING
          BIN_FILESIZE            = W_BIN_SIZE
          FILENAME                = LV_DOWN_FILE
          FILETYPE                = 'BIN'
        IMPORTING
          FILELENGTH              = V_FILESIZE
        TABLES
          DATA_TAB                = T_PDF_TAB
        EXCEPTIONS
          FILE_OPEN_ERROR         = 1
          FILE_WRITE_ERROR        = 2
          INVALID_FILESIZE        = 3
          INVALID_TYPE            = 4
          NO_BATCH                = 5
          UNKNOWN_ERROR           = 6
          INVALID_TABLE_WIDTH     = 7
          GUI_REFUSE_FILETRANSFER = 8
          CUSTOMER_ERROR          = 9
          OTHERS                  = 10.
      IF SY-SUBRC <> 0.
        MESSAGE  'File not downloaded succesfully' TYPE 'I'.
        EXIT.
      ELSE.
        MESSAGE 'PDF File downloaded succesfully' TYPE 'I'.
      ENDIF.
    ENDFORM.                    " Print_PDF
    Rewards if useful.

  • How to print PDF file content from ABAP in background?

    Hi,
    Is it possible to print PDF file content from ABAP in background?
    I have some PDF content which I need to print it, these PDF files are generated outside the SAP.
    Please have you any suggestions?
    Thank you
    Tomas

    <b><u>Solution:</u></b><br>
    <br>
    The target output device must support PDF print, this is only one limitation.<br>
    <br>
    REPORT  z_print_pdf.
    TYPE-POOLS: abap, srmgs.
    PARAMETERS: p_prnds LIKE tsp01-rqdest OBLIGATORY DEFAULT 'LOCL',
                p_fname TYPE file_table-filename OBLIGATORY LOWER CASE,
                p_ncopi TYPE rspocopies OBLIGATORY DEFAULT '1',
                p_immed AS CHECKBOX.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
      DATA: lv_rc     TYPE i,
            lv_filter TYPE string.
      DATA: lt_files TYPE filetable.
      FIELD-SYMBOLS: <fs_file> LIKE LINE OF lt_files.
      CONCATENATE 'PDF (*.pdf)|*.pdf|' cl_gui_frontend_services=>filetype_all INTO lv_filter.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          file_filter             = lv_filter
        CHANGING
          file_table              = lt_files
          rc                      = lv_rc
        EXCEPTIONS
          OTHERS                  = 1.
      IF sy-subrc NE 0 AND lv_rc EQ 0.
        MESSAGE 'Error' TYPE 'E' DISPLAY LIKE 'S'.
      ENDIF.
      READ TABLE lt_files ASSIGNING <fs_file> INDEX 1.
      IF sy-subrc EQ 0.
        p_fname = <fs_file>-filename.
      ENDIF.
    AT SELECTION-SCREEN.
      DATA: lv_name   TYPE string,
            lv_result TYPE boolean.
      lv_name = p_fname.
      CALL METHOD cl_gui_frontend_services=>file_exist
        EXPORTING
          file                 = lv_name
        RECEIVING
          result               = lv_result
        EXCEPTIONS
          OTHERS               = 1.
      IF sy-subrc NE 0.
        MESSAGE 'Bad file!' TYPE 'E' DISPLAY LIKE 'S'.
      ENDIF.
      IF lv_result NE abap_true.
        MESSAGE 'Bad file!' TYPE 'E' DISPLAY LIKE 'S'.
      ENDIF.
    START-OF-SELECTION.
    END-OF-SELECTION.
      PERFORM process.
    FORM process.
      DATA: lv_name     TYPE string,
            lv_size     TYPE i,
            lv_data     TYPE xstring,
            lv_retcode  TYPE i.
      DATA: lt_file TYPE srmgs_bin_content.
      lv_name = p_fname.
      CALL METHOD cl_gui_frontend_services=>gui_upload
        EXPORTING
          filename                = lv_name
          filetype                = 'BIN'
        IMPORTING
          filelength              = lv_size
        CHANGING
          data_tab                = lt_file
        EXCEPTIONS
          OTHERS                  = 1.
      IF sy-subrc NE 0.
        MESSAGE 'Read file error!' TYPE 'E' DISPLAY LIKE 'S'.
      ENDIF.
      CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
        EXPORTING
          input_length = lv_size
        IMPORTING
          buffer       = lv_data
        TABLES
          binary_tab   = lt_file
        EXCEPTIONS
          failed       = 1
          OTHERS       = 2.
      IF sy-subrc NE 0.
        MESSAGE 'Binary conversion error!' TYPE 'E' DISPLAY LIKE 'S'.
      ENDIF.
      PERFORM print USING p_prnds lv_data CHANGING lv_retcode.
      IF lv_retcode EQ 0.
        WRITE: / 'Print OK' COLOR COL_POSITIVE.
      ELSE.
        WRITE: / 'Print ERROR' COLOR COL_NEGATIVE.
      ENDIF.
    ENDFORM.                    " PROCESS
    FORM print USING    iv_prndst  TYPE rspopname
                        iv_content TYPE xstring
               CHANGING ev_retcode TYPE i.
      DATA: lv_handle    TYPE sy-tabix,
            lv_spoolid   TYPE rspoid,
            lv_partname  TYPE adspart,
            lv_globaldir TYPE text1024,
            lv_dstfile   TYPE text1024,
            lv_filesize  TYPE i,
            lv_pages     TYPE i.
      CLEAR: ev_retcode.
      CALL FUNCTION 'ADS_SR_OPEN'
        EXPORTING
          dest            = iv_prndst
          doctype         = 'ADSP'
          copies          = p_ncopi
          immediate_print = p_immed
          auto_delete     = 'X'
        IMPORTING
          handle          = lv_handle
          spoolid         = lv_spoolid
          partname        = lv_partname
        EXCEPTIONS
          OTHERS          = 1.
      IF sy-subrc NE 0.
        ev_retcode = 4.
        RETURN.
      ENDIF.
      CALL FUNCTION 'ADS_GET_PATH'
        IMPORTING
          ads_path = lv_globaldir.
      CONCATENATE lv_globaldir '/' lv_partname '.pdf' INTO lv_dstfile.
      OPEN DATASET lv_dstfile FOR OUTPUT IN BINARY MODE.
      IF sy-subrc NE 0.
        ev_retcode = 4.
        RETURN.
      ENDIF.
      TRANSFER iv_content TO lv_dstfile.
      IF sy-subrc NE 0.
        ev_retcode = 4.
        RETURN.
      ENDIF.
      CLOSE DATASET lv_dstfile.
      IF sy-subrc NE 0.
        ev_retcode = 4.
        RETURN.
      ENDIF.
      CALL FUNCTION 'ZBAP_RM_PDF_GET_PAGES'
        EXPORTING
          iv_content = iv_content
        IMPORTING
          ev_pages   = lv_pages.
      lv_filesize = XSTRLEN( iv_content ).
      CALL FUNCTION 'ADS_SR_CONFIRM'
        EXPORTING
          handle   = lv_handle
          partname = lv_partname
          size     = lv_filesize
          pages    = lv_pages
          no_pdf   = ' '
        EXCEPTIONS
          OTHERS   = 1.
      IF sy-subrc NE 0.
        ev_retcode = 4.
        RETURN.
      ENDIF.
      CALL FUNCTION 'ADS_SR_CLOSE'
        EXPORTING
          handle = lv_handle
        EXCEPTIONS
          OTHERS = 1.
      IF sy-subrc NE 0.
        ev_retcode = 4.
        RETURN.
      ENDIF.
    ENDFORM.                    " PRINT

  • Adobe reader 11.0.5 - cannot print pdf file to network printer

    I have a 64 bit HP Pavilion a6230n PC running Windows 7, fully updated. I have wireless connection to a home file/printer server. My printer, a Brother HL-5140, is connected via USB to the file/printer server. All my other Windows programs capable of printing can print on the network printer - all except adobe reader. Adobe Reader sees the printer and all printing processes appear to be sending the file to the printer, however, the printer never gets the document. I've tried printing as a document, in which case the document sits in the printer queue until I delete it. If I send it as an image, each queue entry is deleted after adobe thinks it has printed. Again, nothing ever prints on the printer, and again, no other program running on my computer has any problems printing to this printer.
    I would appreciate any help with this problem.
    Addendum - 4 Nov 13:
    I uninstalled adobe reader 11 and installed a much earlier version, and now I can print pdf files. Clearly the printing issue is with the current versions of adobe reader.

    This phenomenon can happen with PDF files that have errors in them.  Adobe Reader or Acrobat may be able to fix these errors, but if you close the application, it will ask to save the corrected file.  If you save it once, that should no longer occur when you open it again.
    This is just one explanation, but it doesn't explain why that happens with every PDF you have.
    Test: does it also happen with a PDF that is not supposed to contain any errors: http://helpx.adobe.com/pdf/adobe_reader_reference.pdf ?

  • Can no longer print PDF files on C310.

    Morning,
    have a HP C310.  Used to work fine...  Frustratingly it no longer prints PDF files.
    I've uninstalled everything and reinstalled it.
    Updated drivers.
    Tried the print as an image.
    Prints other documents fine.
    When I try and print a PDF file it seems like the printer is just ignoring the request.
    Any further suggests before I through it out the window and buy a printer that works.....  
    Thanks in advance,
    Daren

    Hmm...  OK, I happen to have the same printer (on wireless LAN) and OS and it prints fine for me....
    Are you printing from File, Print or from the printer icon?  I recall that Adobe applications may have their own version of what the default printer is.  If using the printer icon try instead with File, Print and make sure the c310 is selected as the printer.  Also check the Advanced settings in the print menu.  In my case all the boxes are unchecked (except the grayed-out selection for downloading Asian fonts in the postscript box). 
    One other thing to check would be to open the print spooler and then print a PDF and make sure that a print job does show up and then disappear from the spooler.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • HP 7780 All in One Printer will not print PDF files!!!

    I have an HP 7780 All in One printer setup as a network printer.  It will copy, scan, and print everything except PDF files.  Why will it not print PDF files?  You send a PDF file to print.  The printer spins up like its about to start printing and then nothing.  No error message or nothing.  Nothing even shows up in the print queue as waiting to print.

    Happy Monday edam. Green is actually the result of two or more color mixed together. Lets try printing a self test report:
    Make sure the All-in-One is on and loaded with unused, plain, white paper.
    Press Setup . The Setup Menu appears.
    Press the down arrow button to select Tools , and then press OK .
    Select Self-test Report , and press OK . The self-test report prints.
    Let me know the results of the self test. Are all the colors present on the self test or are you missing specific colors?
    Thanks!
    -SeanS
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • Cannot print a pdf off my mac 10.6.x. I can print all other files Epson printer  'Cancelling'

    Cannot print any pdf from my mac to Epson printer
    I can print all other files except pdf
    Using the most updated Adobe Reader XI
    Using the latest driver for the printer from Epson
    Using a USB cable
    Whats up?

    I have the same problem, I cannot print ANY PDF file from my Mac running 10.8.5 Mountain Lion and using Adobe ReaderXI 11.0.4 I have verified that all files print properly when printed from within Preview or within Libre office. There is no option in the Mac Adobe reader to reset the installation like there is on Windows. I have also tried deleting reader completely and re-installing and the same behavior.

Maybe you are looking for

  • Different number of rows for different columns in JTable

    hi I need to create a JTable with different number of rows for different columns... Also the rowheight should be different in each column... say there is a JTable with 2 columns... Col1 having 5 rows and column 2 having 2 rows... The rowHeight in Col

  • HT1212 Ipad Mini Frozen

    M Ipad mini is frozen and holding the home and lock button do not fix it.  Also not able to connect with itunes to restore it as the message indicates the ipad is lock but it's really frozen.  It will not respond to anything-help

  • Lightroom 5 without Creative Cloud?

    I do not want Creative Cloud. How do I download a paid version of Lightroom 5 (an upgrade from my current Lightroom 3) as a stand alone? I have a class that starts tomorrow so need help asap please.     [email protected]

  • While validating windows when ienter legitcheck it says internet explorer script error line:94 char:5 error 's' is undefined

    Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable. Please try the following: Click the Refresh button, or try again later. If you have visited this page previously and you want to view what

  • Setting Library Storage Locations

    Hi, can you please help regarding setting my Storage Locations to an external drive (FCPX 10.1.4). I want to work from a single external drive, so I obviously set my  MEDIA to the external drive, but what about CACHE and BACKUPS? Is it best to leave