Convert document content to pdf

Hi,
I have a problem. I would like to import a document and save the content on the server (AL11) in the PDF format.
First I convert the content into a xstring and then I put the content into a binary table. After that I write the binary table to the server.
To test the functionality I have the opportunity to save the data manually onthe desktop from the AL11. If I do that I get not a PDF, but always the type of original document.
Can anybody help me?
Regards,
Nik
CODE:
DATA: lr_cmdocument     TYPE REF TO if_bol_bo_property_access,
        lr_mixed_mode     TYPE REF TO cl_bsp_wd_mixed_node,
        lr_marked_item    TYPE REF TO cl_crm_bol_entity,
        lv_xpath          TYPE crmt_ic_ac_identify_path,
        ls_doc_attr       TYPE zssc_epa_doc_att_struc,
        lv_filename       TYPE string,
        lv_filesize       TYPE n,
        lv_content_type   TYPE char128,
        lv_xstring        TYPE xstring,
        l_tab_file        TYPE tsfixml,
        l_length_file     TYPE i,
u2026
  lr_cmdocument ?= er_cmdocument.
  CHECK lr_cmdocument IS BOUND.
  lr_mixed_mode ?= lr_cmdocument.
  lr_marked_item ?= lr_mixed_mode-> if_bsp_wd_ext_property_access~get_model_node( ).
CALL METHOD cl_crm_ic_content_management=>get_doc_content
    EXPORTING
      iv_doc    = lr_marked_item
    RECEIVING
      rv_result = lv_xstring.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
      buffer        = lv_xstring
    IMPORTING
      output_length = l_length_file
    TABLES
      binary_tab    = l_tab_file.
  IF lv_filename is not INITIAL.
    concatenate '/tmp/' lv_filename into lv_filename.
  ENDIF.
  pfad_sap = lv_filename.
  OPEN DATASET pfad_sap FOR OUTPUT in BINARY MODE.
  LOOP AT l_tab_file INTO wa_tab.
    TRANSFER wa_tab TO pfad_sap.
  ENDLOOP.
  CLOSE DATASET pfad_sap.
  CLEAR pfad_sap. CLEAR wa_tab.

Hello Nik,
Not sure what you are trying to do here and the purpose behind it.
Do you want to upload the file in PDF format in AL11 and want to view it ins PDF format in AL11? If this is the requirement then you can't view a file in PDF format in AL11. Try using SAP standard transaction CG3Z (for upload to application server) and you will see that the PDF can be uploaded in application server but it will not be visible in that format in AL11. Over there it is in binary format.
If however your idea is to upload the content of the PDF to application server and then be able to download it at a later stage - for viewing, email or whatever purpose - then what you can do is to use FM CONVERT_OTF to convert the content to OTF and then save it AL11.
Whenever you want it view or read it then you can read it from AL11 and then use FM CONVERT_OTF_2_PDF to convert to PDF.
Let me know if you took this approach and it worked for you.
Good Luck,
Neeraj

Similar Messages

  • Convert site content to pdf

    Sorry to disturbe you all, i do see sometime when am searching online, that some website just open in like a pdf format, so you can download all the content of the site at once. just like a website grabber. This site clearcydia.com, and other forums contain some post i need and i cant go through them all at once. How can i get a page into pdf and read later without having to copy and past.

    No.
    Adobe Acrobat Reader only views pdf files. What you need is something that can convert web pages into pdf files. Acrobat Reader isn't the right tool. The only tool I know that Adobe makes is, like I mentioned earlier, Adobe Acrobat.
    Keep in mind that even Acrobat may or may not work as expected. It really depends on the site itself and how it is set up. Some sites work, others don't. Especially sites that serve up dynamic content.
    You can give it a shot by installing the fully functional trial of Adobe Acrobat (good for 30 days) from here: Adobe Document Cloud | Adobe Acrobat DC

  • PDF - PDF/A Conversion: Converted documents are not PDF/A compiant

    Hi,
    I am using adobe LiveCycle 8.2 to convert PDF documents to PDF/A.
    I tried this in two ways.
    First I used the toPDFA method of the DocConverterService. In that case most of the pdf-documents could not be converted.
    In another case I used the toPS method of the ConvertPdfService to convert the file to PostScript and then the createPDF method of the DistillerService service to go from PostScript to PDF/A. When I open the converted files in Adobe Reader 9, I get the message "You are viewing this document in PDF/A mode", but when I check the document with the isPDFA method of the DocConverterService then in most cases the document is not PDF/A compliant. When I use toPDFA method on this document it can be made PDF/A compliant.
    What is the preferred way to convert PDF to PDF/A?
    When is a document PDF/A compliant? When Adobe Reader says it is, or when LiveCycle says it is? And if Adobe Reader is right, Is there a way to check compliance with LiveCycle?
    Thanks.
    Jan.

    Which Reader version you are using? Do you see any error by double clicking on pdf simply?
    Share error snapshot if you see some.

  • Convert web content to pdf file

    I would like to know if adobe has a service or option to convert web content to a pdf book. I done it manually but it's taking a lot of time.
    My questions :
    If I export the web content in word or excel format can it be converted into a pdf ?
    Is there any other solution/ software ?
    Brgds

    How are you currently doing it? Have you tried Web Capture? If not:
    Acrobat 9: Advanced > Web Capture > Create PDF Form/Append Web Page
    Acrobat 10: File > Create > PDF from Web Page

  • How to convert document file in PDf format through workflow using sharepoint designer

     Please suggest me solution it's urgent.....please.

    Hi Anil,
    If Word Automation Services is installed in your environment then that may be an option (Providing you are only interested in converting MS-Word documents). However SharePoint does not ship with an out-of-the-box workflow activity that makes use of this.
    You may want to consider some third party software that supports formats other than MS-Word as well and comes with workflow actions for SharePoint Designer (and Nintex Workflow) out of the box. Have a look at the
    Muhimbi PDF Converter for SharePoint.
    Disclaimer, I worked on this product so I am obviously biased. (It works great though :-)

  • Converting Robohelp Content to a Word and PDF document.

    I am in the process of creating an online help manual with several jpg images.  The jpg images are clear in Robohelp, but when I convert the content to a Word or PDF, the content and images are fuzzy and blurry, especially the PDF. Any thoughts or suggestions as to why this is occurring?  I did not have this issue with my last project, the clarity, content, and formatting was very clear including the jpg images.
    Thanks,
    Wendy

    Hi Wendy,
                there is almost no conversion of images on generating any output from RoboHelp, can you please also specify how those topics with images were created.
    if possible please share a sample image and correponding code snippet from RoboHelp.
    you can try removing any resizing done to those images and then generate the output.
    Ashish

  • Why can I not Convert a Microsoft Office Document to a PDF using the Context Menu?

    Why can I not Convert a Microsoft Office 2013 Document to a PDF using the options found in the Context Menu? (Ex: Convert to PDF, Combine Supported Files into PDF?)
    I updated to Acrobat XI PRO recently, but now i'm unable to combine or convert microsoft word docs to PDF.
    In Adobe Acrobat X I had this feature below, and it would combine Microsoft Office Documents all into a single PDF. Now I no longer have this issue in Adobe Acrobat XI Pro. It seems like it was program named Adobe Elements that was running the conversion.

    Ajlan. That page is showing as not available. Would the fix apply to Adobe Acrobat X and XI?
    Zach Moses
    Direct Phone and Fax (615) 577-5814 | [email protected]
    W Squared, Inc.
    5500 Maryland Way | Suite 200 | Brentwood, TN 37027 | www.wsquared.com<http://www.wsquared.com>
    This email and any attachments may be confidential and are solely for the use of the individual to whom they were intended. If you are not the intended recipient of this email, you must take no action based upon it, nor must you copy it or show it to anyone. Please immediately reply to the sender if you suspect you were not the intended recipient. All contents of this email are provided "as-is" without warranty of any kind and are subject to change without notice. W Squared assumes no risk from the recipient's use of this email. W Squared is not a certified tax firm or law firm and recipient should not rely on any communication from W Squared or its employees as having such authority.

  • How to convert a protected document into a PDF?

    Hello,
    I need to develop a plugin that needs to convert a protected document in office format into a pdf. I looked into the sdk and found the method AVConversionConvertToPDFWithHandler (). But can this method also apply the digital rigths of the protected document to the newly created pdf?
    Is there any other way to convert a protected document into a pdf and at the same time apply the rights to the pdf? I don't want to use Adobe LiveCycle for digital rights management.
    What are the requirements to develop a DRM plugin for acrobat?
    Please Help!
    Thanks in advance!

    The AVConversion APIs will use Office itself to perform the conversion (well, the rendering part).   I would ASSUME that when Office opens the document, it will ask for any necessary passwords or other information to determine if the user has the rights to view and/or process the content of the document.  If they do, then the conversion will succeed otherwise it will fail.   The PDF will not have any DRM applied to it, since we don't know anything about the Office DRM options.
    If you wish to apply DRM to the PDF, you will need to do that yourself or using tools such as LiveCycle Rights Management.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Tue, 29 Nov 2011 02:26:37 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: How to convert a protected document into a PDF?
    How to convert a protected document into a PDF?
    created by poortip87<http://forums.adobe.com/people/poortip87> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4051919#4051919

  • How do I convert a word document into a pdf and then upload it to a web site

    How do I convert a word document into a pdf and then upload it to a web site so people can read it from my
    site with Dreamweaver 4?. How can I do this? Can anyone please help? I'm only a newbie. Thanking you in anticipation.

    First you need to install a means of printing to pdf from word.  I like cutepdf writer ( http://cutepdf.com/Products/CutePDF/writer.asp ).  Once installed you will print the doc in word and under the printer selection you choose pdf.
    Once you have the file you put it in your local site folders and upload it using Dreamweaver.  Be sure to link to it from a page so users can get to it and I would recommend giving the link a target of _black so it will open in a new window (see the properties inspector in DW).

  • How can I convert a pages color document to a PDF Black and White doc.

    How can I convert a pages color document to a PDF Black and White doc.  Or, covert the color to B&W in a new doc?

    > How can I convert a pages color document to a PDF Black and White doc.  Or, covert the color to B&W in a new doc?
    The general idea is that you colour correct photographs once, archive, and convert with or without colour changes. The archived photograph is unchanged - or we would be colour correcting the same photographs again and again and again.
    If you have a photograph with a corrected exposure, you can open the photograph in the Apple ColorSync Utility, apply a colour space conversion to a grayscale appearance using the preinstalled ICC profile, save the photograph under another name, and place that in your pagination.
    If you have a paginated document with corrected exposures, and any such non-scalable bitmap or scalable spline graphics as you have chosen to add, you can render the pagination as a whole to PDF through the same ICC profile, carrying out the same colour space conversion on any and all objects.
    Caveat: If you intend the pagination for certain processes, in particular offset lithography, then you are probably  expected not to render the type to grayscale, but rather to render it to single ink solid black. No software can determine what printing process you intend, you have to understand a bit about printing, and how to set up general colour space conversions in software. Ask your prepress provider, and if the answer is not prompt and proficient, pick another provider.
    /hh

  • Printing a PDF document to virtual PDF printer converts text to image in output PDF-file

    When I "print" any regular PDF document to a PDF virtual printer, it always converts a source regular (textual) PDF document into an image only document. It applies even to pure plain text documents (say, HTML source code etc.)
    (I often need to create a PDF document from the existing PDF. Yes, I know, it might seems quite pointless, but actually it makes sense.)
    Thus I have 2 questions:
    1) Is such sonvertion normal or I do anything wrong myself?
    2) It is by design, is there any woraround to prevent conveting text to image?
    Many thanks in advance!

    Have you checked to see if the "Print As Image" option is inadvertently checked? In the Print dialog, click the Advanced button then look for the checkbox.

  • Why is the footer blurry when I convert my document to a PDF?

    When I am viewing my document in Pages (using the Club newsletter template) my logo in the footer looks fine.
    However, when I convert the document to a PDF and then view it as a PDF, the footer looks blurry, as though there are two of them.
    I've tried deleting and repasting and using a different format for the logo (e.g., jpg, png), and nothing seems to work.  Could it be a sizing issue?  (obviously I have to shrink my logo quite a bit to get it to fit into the footer....)
    Help appreciated!
    Thanks!

    In your version of Pages, I went into layout mode, selected the footer, and enlarged it enough to cram a 180 dpi 1024x768 image into a thumb-sized image. In the Wrap Inspector, I selected make background objects selectable, and enabled in background. I turned off Object causes wrap.
    I then chose Format > Advanced > Move Object to Section Master, and exported to PDF Best. At 400% enlargement in Preview, the image and footer looked normally sharp.
    Here is a screen grab of that PDF footer image at 400%.
    OS X 10.9.3

  • Converting multiple WordPerfect 9 documents into 1 PDF

    Greetings.
    I'm new, hope it's the right place to post and get some insight.
    Does anyone know that Adober Acrobat X Standard support WordPerfect 9 PDF conversion? We would like to convert multiple WP 9 documents into 1 PDF file. However, I did not see such option available from the selection list... that is when I try to convert/select multiple documents, the list does not give me the WordPerfect as the source file type... Any suggestion is welcome.
    Thanks.

    Corel's WP has not been and is not supported by Acrobat.
    Back in the day Corel used an in-house routine to create PDF.
    A few years ago a news release discussed Corel using a Nuance routine.
    Current news release speaks to Corel's PDF Fusion.
    So, yes PDF can created out of WP; just not with Acrobat.
    To learn what PDF creation or post-processing features Corel has or does not have you'll want to visit Corel's web space.
    If you want amped up PDF manipulation / post-processing you'll want to consider Acrobat Pro.
    Be well...

  • Convert a word document to multiple PDF documents

    Hello
    I would like to convert a word document to multiple PDF documents. (i.e. convert 20 page word document into 20 single page PDF's). Is it possible to do this easliy and quickly.
    I have used word mail merge to create multiple cover letters in word
    I would now like to convert each cover letter (which is 1 page each) into individialized PDF's so that I can email them out as attachments
    I currently have been copying and pasting from my master word document into a fresh word document (one page at a time) then, saving, then converting to PDF one cover letter at a time. Although this works it is time consuming and I figured there may be an easier quicker way to do this
    Any thoughts, suggesstions, would be greatly appreciated
    Thanks

    It is possible to convert the word document into a PDF then while the PDF is open do:
    Document
    Extract Pages
    1-20
    Check "Extract pages as seperate files"
    This will give you 20 seperate files.
    Hope it helps!

  • How do convert a Word document to a PDF on an iMac running 10.6.8?

    How do I convert a Word Document to a pdf file on my iMac running OS X 10.6.8?

    File- Print-Print PDF- Save as PDF

Maybe you are looking for