Incrementally appending  custom XMP metadata into PDF files

I have a problem writing custom XMP metadata into a PDF document (I'm using the XMP Toolkit SDK).
The problem is that I don't know whether is possible to expand the XMP packet in order to append metadata incrementally into the document, and, if it is possible, I don't know how to do it. The program I wrote succesfully appends an item to an array four times, but it fails when trying to append the fifth one. The reason obviously is that the packet gets full and there is not room for more metadata. The error message, if I force the PutXMP call, is:
ERROR: Can't fit into specified packet size
So, what can I do? How to enlarge the packet or make it expandable? Or, otherwise, have I to inject a new XMP packet with the up-to-date information in it? How?
And a last question: Have I to scan for packets when dealing with PDF files? No smart handlers are available for this kind of files?
Thanks in advance.
Xabier Artola.
Univ. of the Basque Country.

Were you able to find a solution to this problem? I am having the same issue.
Jason

Similar Messages

  • Incrementally appending custom XMP metadata

    I have a problem writing custom XMP metadata into a PDF document (I'm using the XMP Toolkit SDK).
    The problem is that I don't know whether is possible to expand the XMP packet in order to append metadata incrementally into the document, and, if it is possible, I don't know how to do it. The program I wrote succesfully appends an item to an array four times, but it fails when trying to append the fifth one. The reason obviously is that the packet gets full and there is not room for more metadata. The error message, if I force the PutXMP call, is:
    ERROR: Can't fit into specified packet size
    So, what can I do? How to enlarge the packet or make it expandable? Or, otherwise, have I to inject a new XMP packet with the up-to-date information in it? How?
    And a last question: Have I to scan for packets when dealing with PDF files? No smart handlers are available for this kind of files?
    Thanks in advance.
    Xabier Artola.
    Univ. of the Basque Country.

    One of the known limitations of the XMPToolkit is that it is NOT smart about PDF documents - it treats them as "generic binary" and thus can not add beyond the pre-allocated whitespace already in the PDF.
    If you are doing any serious operations of XMP with PDF - I recommend that you look at licensing the Adobe PDFLibrary which is a full functioning PDF library and incorporates the XMPToolkit inside it (among many other things).

  • Use of XMP Custom Panel to automate insertion of metadata into PDF file.

    I'm new to the world of XMP so please bear with me.
    I'm exploring ways of automating the insertion of metadata into PDF files, either at the time of creation, or through a batch process. The metadata values for a given set of documents would be static, so these could be "hard coded" into the mechanism use to insert the metadata.
    Would an XMP Custom Panel be something I could use to achieve this goal. If so, can you please provide some details on how to go about doing this.
    Thanks in advance.
    Louis

    Were you able to find a solution to this problem? I am having the same issue.
    Jason

  • C++ code to get XMP metadata from pdf files ??

    Hi,
    I am new to this field and now I have to write a C++ code which will read the XMP metadata from any pdf files. Could anyone please tell me how to do that or where to start? Is there any sample code available for that?
    I am reading the Programmer's guide and XMP specification to have the whole idea.
    I really appriciate your help. Thanks in advance.
    Regards,
    Suranjit Paul

    Hi,
    The same code for reading other formats will go for Pdf too.
    Only difference is while reading PDF it is not calling any smart filters.

  • How to insert xmp metadata into jpeg files?

    Hi
    Is it possible to automatically insert the metadata
    with the script using text extracted from my database.
    I have to insert the metadata into lots of images which are uploaded to a site.
    Thanks
    [signature deleted bu host]

    A scripting tool you may use, although complex, is ImageMagick.  It allows loads of image manipulate but also handles data.
    Another options is DBGallery, which will very easily allow XMP data to be written to hundreds or thousands of files at a time, but not via script (it's a Windows application).  You can see a quick screenshot tour of it's IPTC/XMP capabilities here.
    Hope this helps,
    Glenn
    Developer of DBGallery: The Photo DATAbase

  • How to import XMP metadata in pdf

    Could you please explain me, how to import XMP metadata in pdf file through "Live Cycle ES"?

    Yes, with LiveCycle ES (almost) all services can be invoked from any of the available endpoints (watch folder, EJB, WebService, etc).
    In this case since the ImportXMP requires two input files (the PDF and the XMP) you will need to drop a directory containing both of your files into the watch folder (not the individual files). This is because several requests can be dropped into the watch folder at the same time and without the sub directories LiveCycle couldn't tell what XMP when with what PDF.
    A com.adobe.idp.Document - AKA: Document - object is one of the common object types used across all LiveCycle products. When you deal with PDFs and many other binary file objects they are stored a Document object. It is more important that you know this when using Workbench, web services or the Java API.
    You should have a look at the documentation at: http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/001553.html

  • How do you embed/inject xmp metadata into a mpeg 2 video file?

    Im looking to add keywords and descriptions to original file (raw MPEG-2) and have the metadata stick when i go to the transcoding process and batch convert the orginal file to either a wmv and flash file. how can i achive this? what tools are available ? and or is this a custom job? any info and or programmers looking to test this im open to all the help i can get.

    Yeah I kind of figured that. I've been trying various ways of trying to batch inject metadata into video files and thought I would start with the master file but because of the limitations the raw digitized mpg 2 video file has. In that case I have yet to find a transcoding program that will batch out various formats and read a xmp side car file to inject the metadata into the outputted file (does anyone know if Adobe media encoder 4 can accomplish this where a xmp sidecar file is created then transcoding into a wmv and or flash file , curious if the metadata will stick and be read in the outputted file) In anycase  I may have find an alternative way and use my current Rhozet carbon coder transcoder program to try to inject an xml file during the batch transcoding process. If anyone has successfully accomplished this with injecting xmp metadata in a batch transcoding program please let me know. I've been exhausted searching for the solution this problem for a long time and I don’t want to wait till a mpeg 7 solution comes out.

  • [CS3 JS] Possible to Inspect Custom XMP Metadata With JavaScript?

    I am using custom XMP metadata in InCopy and InDesign docs in CS3 to hold custom metadata that can vary wildly. I know the full set of possible items but not what values will be in a particular document.
    Short of writing the XMP to a file and then processing that from my script, is there a way to inspect the custom properties from JavaScript. I didn't see a way to do it from the data model.
    Thanks,
    Eliot

    Here is another script to catch MetaData, some more than the basic:
    // metaDataOfLinks.jsx
    //DESCRIPTION: Catches MetaData of linked images and creates a report at the DeskTop.
    // Martin Fischer 10/2008
    var myLinkXmpArray = ["author", "copyrightInfoURL", "copyrightNotice", "copyrightStatus   ", "creationDate", "creator", "description", "documentTitle", "format", "jobName", "keywords", "modificationDate", "serverURL"];
    var myIPTCArray = ["CiAdrCity", "CiAdrCtry", "CiAdrExtadr", "CiAdrPcode", "CiAdrRegion", "CiEmailWork", "CiTelWork", "City", "CiUrlWork", "CopyrightNotice", "Country", "CountryCode", "Creator", "CreatorContactInfo", "CreatorJobtitle", "DateCreated", "Description", "DescriptionWriter", "Headline", "Instructions", "IntellectualGenre", "JobID", "Keywords", "Location", "Provider", "Province-State", "RightsUsageTerms", "Scene", "Source", "SubjectCode", "Title"];
    var myPSArray = ["photoshop:AuthorsPosition", "photoshop:CaptionWriter", "photoshop:Category", "photoshop:City", "photoshop:Country", "photoshop:Credit", "photoshop:DateCreated", "photoshop:Headline", "photoshop:Instructions", "photoshop:Source", "photoshop:State", "photoshop:SupplementalCategories", "photoshop:TransmissionReference", "photoshop:Urgency"];//var myPSArray = ["photoshop:AuthorsPosition", "CaptionWriter", "Category", "City", "Country", "Credit", "DateCreated", "Headline", "Instructions", "Source", "State", "SupplementalCategories", "TransmissionReference", "Urgency"];
    var myTiffArray = ["tiff:ImageWidth", "tiff:ImageLength", "tiff:BitsPerSample", "tiff:Compression", "tiff:PhotometricInterpretation", "tiff:Orientation", "tiff:SamplesPerPixel", "tiff:PlanarConfiguration", "tiff:YCbCrSubSampling", "tiff:YCbCrPositioning", "tiff:XResolution", "tiff:YResolution", "tiff:ResolutionUnit", "tiff:TransferFunction", "tiff:WhitePoint", "tiff:PrimaryChromaticities", "tiff:YCbCrCoefficients", "tiff:ReferenceBlackWhite", "tiff:DateTime", "tiff:ImageDescription", "tiff:MakeProperName", "tiff:Model", "tiff:Software", "tiff:Artist", "tiff:Copyright"];
    var myExifArray = ["exif:ExifVersion", "exif:FlashpixVersion", "exif:ColorSpace", "exif:ComponentsConfiguration", "exif:CompressedBitsPerPixel", "exif:PixelXDimension", "exif:PixelYDimension", "exif:UserComment", "exif:RelatedSoundFile", "exif:DateTimeOriginal", "exif:DateTimeDigitized", "exif:ExposureTime", "exif:FNumber", "exif:ExposureProgram", "exif:SpectralSensitivity", "exif:ISOSpeedRatings", "exif:OECF", "exif:ShutterSpeedValue", "exif:ApertureValue", "exif:BrightnessValue", "exif:ExposureBiasValue", "exif:MaxApertureValue", "exif:SubjectDistance", "exif:MeteringMode", "exif:LightSource", "exif:Flash", "exif:FocalLength", "exif:SubjectArea", "exif:FlashEnergy", "exif:SpatialFrequencyResponse", "exif:FocalPlaneXResolution", "exif:FocalPlaneYResolution", "exif:FocalPlaneResolutionUnit", "exif:SubjectLocation", "exif:ExposureIndex", "exif:SensingMethod", "exif:FileSource", "exif:SceneType", "exif:CFAPattern", "exif:CustomRendered", "exif:ExposureMode", "exif:WhiteBalance", "exif:DigitalZoomRatio", "exif:FocalLengthIn35mmFilm", "exif:SceneCaptureType", "exif:GainControl", "exif:Contrast", "exif:Saturation", "exif:Sharpness", "exif:DeviceSettingDescription", "exif:SubjectDistanceRange", "exif:ImageUniqueID", "exif:GPSVersionID", "exif:GPSLatitude", "exif:GPSLongitude", "exif:GPSAltitudeRef", "exif:GPSAltitude", "exif:GPSTimeStamp", "exif:DateTimeOriginal,", "exif:DateTimeDigitized.", "exif:GPSTimeStamp", "exif:GPSSatellites", "exif:GPSStatus", "exif:GPSMeasureMode", "exif:GPSDOP", "exif:GPSSpeedRef", "exif:GPSSpeed", "exif:GPSTrackRef", "exif:GPSTrack", "exif:GPSImgDirectionRef", "exif:GPSImgDirection", "exif:GPSMapDatum", "exif:GPSDestLatitude", "exif:GPSDestLongitude", "exif:GPSDestBearingRef", "exif:GPSDestBearing", "exif:GPSDestDistanceRef", "exif:GPSDestDistance", "exif:GPSProcessingMethod", "exif:GPSAreaInformation"];
    var myCameraRawArray = ["crs:AutoBrightness", "crs:AutoContrast", "crs:AutoExposure", "crs:AutoShadows", "crs:BlueHue", "crs:BlueSaturation", "crs:Brightness", "crs:CameraProfile", "crs:ChromaticAberrationB", "crs:ChromaticAberrationR", "crs:ColorNoiseReduction", "crs:Contrast", "crs:CropTop", "crs:CropLeft", "crs:CropBottom", "crs:CropRight", "crs:CropAngle", "crs:CropWidth", "crs:CropHeight", "crs:CropUnits", "crs:Exposure", "crs:GreenHue", "crs:GreenSaturation", "crs:HasCrop", "crs:HasSettings", "crs:LuminanceSmoothing", "crs:RawFileName", "crs:RedHue", "crs:RedSaturation", "crs:Saturation", "crs:Shadows", "crs:ShadowTint", "crs:Sharpness", "crs:Temperature", "crs:Tint", "crs:ToneCurve", "crs:ToneCurveName", "crs:Version", "crs:VignetteAmount", "crs:VignetteMidpoint", "crs:WhiteBalance"];
    var myInfo = new Array;
    var myDoc = app.activeDocument;
    var myLinks = app.documents[0].links;
    for ( i = 0; i < myLinks.length; i++)
       getMetaData ( myLinks[i] );
    writeData ( 'Metadaten zu ' + myDoc.name + '\r-----------\r\r' + myInfo.join ( '\r\r'), File ('~/Desktop/Metadaten_' + myDoc.name.replace(/.indd$/, '') + '.txt'));
    // ===============================================================
    //                                  Funktionen
    // ===============================================================
    function getMetaData ( aLink )
       var myLinkXmp = aLink.linkXmp.properties.toSource().replace( /^\(\{/,'' ).replace (/\)\}$/,'').replace( /parent.+$/,'').replace(/:/g, ':\t').split( ', ');
       var myString = aLink.name;
       myString += loopLinkXmp ( aLink, myLinkXmpArray );
       myString += loopArray ( aLink, "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/",  "Iptc4xmpCore:CreatorContactInfo/Iptc4xmpCore:",  myIPTCArray);
       myString += loopArray ( aLink, "http://ns.adobe.com/photoshop/1.0/",  "", myPSArray );
       myString += loopArray ( aLink, "http://ns.adobe.com/tiff/1.0/", "", myTiffArray );
       myString += loopArray ( aLink, "http://ns.adobe.com/exif/1.0/", "", myExifArray );
       myString += loopArray ( aLink, "http://ns.adobe.com/camera-raw-settings/1.0/",  "", myCameraRawArray );
       myInfo.push( myString.replace( /, $/,'') );
    function loopArray( aLink, s1, s2, anArray )
       var temp = '\r\t--- ' + s1 + ' ---\r\t';
       for ( var a = 0; a < anArray.length; a++)
          try {
             var theEvalString = 'aLink.linkXmp.getProperty(\"' + s1 + '\", \"' + s2 + anArray[a] + '\")';
             var myCode = eval( theEvalString );
             if ( myCode != '' )
                temp += '[' + anArray[a] + ']\t' +  myCode + '\r\t'; 
          } catch (e){ //temp +=e + '\r'
       return temp;
    function loopLinkXmp( aLink, anArray )
       var temp = '\r\t--- LinkMetadata ---\r\t';
       for ( var a = 0; a < anArray.length; a++)
          try {
             var theEvalString = 'aLink.linkXmp.' + anArray[a] ;
             var myCode = eval( theEvalString );
             if ( myCode != '' )
                temp += '[' + anArray[a] + ']\t' +  myCode + '\r\t'; 
          } catch (e){ //temp +=e + '\r'
       return temp;
    function writeData ( aData, theFile )
       theFile.open ( 'w', 'Text', 'R*ch' );
       theFile.encoding = 'UTF-8';
       theFile.write ( aData );
       theFile.close ();
    Ressources:
    Adobe XMP Developer Center: http://www.adobe.com/devnet/xmp/
    XMP Specification: http://www.adobe.com/devnet/xmp/pdfs/xmp_specification.pdf
    Martin Fischer

  • How do you import  (or convert) XMP metadata into iPhoto '08?

    Having recently made OS X my primary operating system, I switched from using Picasa/Windows Photo Gallery on Vista to catalogue my photos to iPhoto '08. However, the 7,000+ pictures I have all have XMP metadata tags. None of them show up in iPhoto '08 after import. Needless to say, I am not looking forward to having to retag 7,000+ pictures in iPhoto.
    I know people in various forums, here and elsewhere, have said that iPhoto '08 does not do XMP at all. Is this true? Is there a workaround or plugin? I find it weird that XMP has been an open standard since May, and 6 months later, there isn't a plugin or solution, especially from Apple. Unless I am just daft and missing something obvious, which is entirely possible.
    At any rate, I would really appreciate any help in me not having to retag over 7,000 pictures...thanks in advance!

    mrbofus:
    Do you still have the PC and the photos on it? If so you might look into the demo version of iView MediaPro and see it if can read those Picasa files and embed the metadata into the files like it can when reading an iPhoto library on the Mac platform. If it can, you'll be able to write the metadata to the files and bring them over again to the Mac and import into a new library. This is only speculation as I'm not conversant in Windows at all.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Urgent: Error while uploading into pdf file

    Hi ,
    I got a requirement that converting smartform into pdf file and sending into application server, And uploading the that pdf file into presentation server once a day am geting error when uploading into pdf format from application server .
    Error : There was an  error while tryinging to parse an image.
    Please help me out its urgent.
    Thanks in advance
    Regards
    krishna
    Edited by: krishna rao on Feb 13, 2008 12:05 PM

    U can use this code
    Reward if useful
    REPORT  ZMN_PDF_UPLOAD.
    data: begin of itab occurs 0,
    field(256),
    end of itab.
    data: dsn(100) value '\usr\sap\DEV\DVEBMGS00\work\testpdf',
    length like sy-tabix,
    lengthn like sy-tabix.
    call function 'GUI_UPLOAD'
    exporting
    filename = 'c:\temp\test.pdf'
    filetype = 'BIN'
    importing
    filelength = length
    tables
    data_tab = itab.
    open dataset dsn for output in binary mode.
    loop at itab.
    transfer itab-field to dsn.
    endloop.
    close dataset dsn.
    clear itab.
    refresh itab.
    *To crosscheck if it went well
    open dataset dsn for input in binary mode.
    do.
    read dataset dsn into itab-field.
    if sy-subrc = 0.
    append itab.
    else.
    exit.
    endif.
    enddo.
    call function 'GUI_DOWNLOAD'
    exporting
    filename = 'c:\temp\testn.pdf'
    filetype = 'BIN'
    bin_filesize = length
    importing
    filelength = lengthn
    tables
    data_tab = itab.
    *Or
    *Use the TCode
    *CG3Z or CG3Y
    *for downloading to Application Server.

  • Exporting/Sharing Custom XMP metadata schema not possible?

    I've written a Python script which automatically encodes Quicktime files which I've mastered out of Premiere Pro CC with embedded custom XMP metadata (created using "New Schema" in the Metadata Display panel). I'm using the embedded custom metadata to drive the Python script (e.g. "Spot Title", "Client Name", fields etc etc), which encodes the source QT file to several different formats, based on the delivery specifications of various local TV broadcasters which the encoded files will go to.
    Everything about the XMP metadata entry/writing/parsing is fantastic. My only hitch is in the exporting/sharing of the custom metadata schema which I created for this purpose. I would like to roll the schema out to the other editors in our facility, so that they can also enter the XMP metadata on their own systems when they export out master timelines from Premiere.
    But unless I'm missing something, I can't figure out a way to "share" or export my custom schema for use on another system. Is this not possible in Premiere Pro CC?

    There's no feature for exporting and importing custom schemas, but it's entirely doable. Here are the path to the custom schemas
    MAC: Macintosh HD ▸ Users ▸ <username> ▸ Library ▸ Application Support ▸ Adobe ▸ XMP ▸ Custom File Info Panels ▸ 4.0 ▸ custom
    WIN: C:\Users\AppData\Roaming\Adobe\XMP\custom file info panels\4.0\panels [I can't vouch for this path as I'm on Mac at the moment and it's been ages since I poked around for custom schemas, but this should at least be the right neighborhood.]
    You might also be interested in sharing your custom metadata display profiles. They in Documents ▸ Adobe ▸ Premiere Pro ▸ 8.0 ▸ Profile-mapes ▸ Metadata Preferences.

  • Custom command for custom XMP metadata

    Hi
    I'm trying to create a custom command for setting and getting custom XMP metadata using InDesign CS3 SDK with Xcode.
    I think I got the step 1) to 3) ok. But not so sure about step 4).
    Please take a look and tell me if I have got anything wrong.
    1) Create 2 classes and 1 interface
    MyCustomMetadata
    MyCustomMetadataSetCmd
    IMyCustomMetadata
    2) Define class definitions in the resource file
    /** Boss class for kMyCustomMetadataBoss */
    Class
    kMyCustomMetadataBoss,
    kInvalidClass,
    IID_IMYCUSTOMMETADATA, kMyCustomMetadataImpl,
    /** Boss class for kMyCustomMetadataSetCmdBoss */
    Class
    kMyCustomMetadataSetCmdBoss,
    kInvalidClass,
    IID_ICOMMAND, kIQAdTicketMetaDataSetCmdImpl,
    IID_IMYCUSTOMMETADATA, kMyCustomMetadataImpl,
    3) Define functions for setting and getting values in MyCustomMetadata
    GetMyTitle()
    SetMyTitle()
    Within these functions, use IMetadataAccess interface to set/get values.
    4) Create Do() function in MyCustomMetadataSetCmd
    ??? I'm not sure what I'm supposed to do here ???
    Any help would be really appreciated.
    Thanks,
    JP

    m41miller42 wrote:
    I am attempting to create a custom RSS file (.mrss) that references XMP metadata from Premiere.
    I was basing the move on this statement. This was posted in the Adobe Connect forums.

  • Embedding Full-text Index into PDF File

    Hello Everyone,
    I've tried to create and embed full-text index into PDF file, but with no luck. I've followed steps described at http://help.adobe.com/en_US/Acrobat/9.0/Standard/WSC28D4DBB-6A78-4027-9E04-F50FE411CFB9.w. html - there can be seen progress of collecting of data and at the end the button Update index is enabled. This is signal for me that Index was created. After clicking on Ok button, saving document as new one and then reopening "new created" document, there is info that no Index is embedded in the Manage Embedded Index dialog. Is there any other step necessary to do? Or is it bug? Adobe Acrobat Pro 9.1 on Windows Vista 32bit is used.
    Jan
    PS: Interesting is also comment at the bottom of above mentioned help page...

    Thanks for the response. It is true that if I make changes and look at the embedded index status, it shows that it needs updating
    However the problem I can't get around after extensive testing is that sometimes for no apparent reason the index is dropped on save. This can happen if I check the status of the index to make sure it is valid, save the file, and reopen it.
    I've concluded that this must be a bug and am using other indexing options for the time being.

  • How to enable commenting into pdf files using java?

    Hi All,
    Is there any way available to enable comments into pdf files through java. I have a Adobe Reader 9 and also I want put some comments into pdf file, but the reader is not allowed to place a comment into pdf file before enabling the Comments into pdf. After enabling the comments in pdf file then only we can place the comments and we can the pdf file with comments.
    Is there any way available to enable comments into pdf file to view acrobat reader.
    Thanks in advance.

    The end user who uses the web application has Acrobat installed in their mahcine needs it only for the purpose of enabling comments in pdf. If this task of enabling comments in pdf is done through my application there is no need for acrobat in such user's machine which was requested as a cost cuttnig measure.
    For this purpose, i need to know about how to enable comments in pdf through java api.
    I have used itext java api for other pdf related manipulation in java. But it does not have feature as per the requirement posted above. Can any body suggest relevant java api to achieve the task requested?
    Tahnks in Advance.

  • In smartform word document convert into pdf file

    Hi Experts,
    I have issue on smartform, i have done two page smartform in preview its coming properly but
    when i give to print its not coming properly...output is not coming properly...so please sugest me
    even how to covert smartform word document into PDF file...im waiting for your replay. Thanks in
    Advance....
    Regards
    Ashwini

    Hi,
       I hope its printer problem check with u r basis, and for Smartform to PDF bewlow is my coding in which by using OTF data from Smartform it ill veiw in PDF.
    *& Report  ZSAP_PDF_VIEWER_DEMO_2
    REPORT  ZSAP_PDF_VIEWER.
    DATA: LT_PDF TYPE TABLE OF TLINE,
          LS_PDF LIKE LINE OF LT_PDF,
          LV_URL TYPE CHAR255,
          PDF_FSIZE TYPE  I,
          LV_CONTENT  TYPE XSTRING,
          LT_DATA TYPE STANDARD TABLE OF X255.
    DATA : L_JOB_OUTPUT_INFO TYPE SSFCRESCL.
    DATA : LS_CONTROL_PARAM  TYPE SSFCTRLOP.
    DATA : G_HTML_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
           G_HTML_CONTROL   TYPE REF TO CL_GUI_HTML_VIEWER.
    DATA: LO_DIALOG_CONTAINER TYPE REF TO CL_GUI_DIALOGBOX_CONTAINER.
    DATA: LO_DOCKING_CONTAINER TYPE REF TO CL_GUI_DOCKING_CONTAINER.
    DATA : P_VBELN TYPE  VBELN_VL.
    FIELD-SYMBOLS <FS_X> TYPE X.
    INITIALIZATION.
    LS_CONTROL_PARAM-GETOTF = 'X'.
    LS_CONTROL_PARAM-NO_DIALOG = 'X'.
    START-OF-SELECTION.
      CALL FUNCTION '/1BCDWB/SF00000034'
    EXPORTING
       ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
         CONTROL_PARAMETERS         = LS_CONTROL_PARAM
         P_VBELN                    = P_VBELN
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
    IMPORTING
         DOCUMENT_OUTPUT_INFO  = L_DOCUMENT_OUTPUT_INFO
           JOB_OUTPUT_INFO       = L_JOB_OUTPUT_INFO
         JOB_OUTPUT_OPTIONS    = L_JOB_ OUTPUT_OPTIONS
    EXCEPTIONS
        FORMATTING_ERROR           = 1
        INTERNAL_ERROR             = 2
        SEND_ERROR                 = 3
        USER_CANCELED              = 4
        OTHERS                     = 5
      IF SY-SUBRC  <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = 'PDF'
        IMPORTING
          BIN_FILESIZE          = PDF_FSIZE
        TABLES
          OTF                   = L_JOB_OUTPUT_INFO-OTFDATA
          LINES                 = LT_PDF
        EXCEPTIONS
          ERR_MAX_LINEWIDTH     = 1
          ERR_FORMAT            = 2
          ERR_CONV_NOT_POSSIBLE = 3
          OTHERS                = 4.
    convert pdf to xstring string
      LOOP AT LT_PDF INTO LS_PDF.
        ASSIGN LS_PDF TO <FS_X> CASTING.
        CONCATENATE LV_CONTENT <FS_X> INTO LV_CONTENT IN BYTE MODE.
      ENDLOOP.
       CALL SCREEN 100.
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS '100'.
    **CREATE OBJECT LO_DOCKING_CONTAINER
    EXPORTING
       REPID     = SY-REPID
       DYNNR     = '100'"SY-DYNNR
       SIDE      = LO_DOCKING_CONTAINER->DOCK_AT_LEFT
       EXTENSION = 1200.
    CREATE OBJECT g_html_container
       EXPORTING
         container_name = 'HTML'.
    *CREATE OBJECT G_HTML_CONTROL
    EXPORTING
       PARENT = LO_DOCKING_CONTAINER.
      CREATE OBJECT G_HTML_CONTAINER
          EXPORTING
            CONTAINER_NAME = 'HTML'.
        CREATE OBJECT G_HTML_CONTROL
          EXPORTING
            PARENT = G_HTML_CONTAINER.
    Convert xstring to binary table to pass to the LOAD_DATA method
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          BUFFER     = LV_CONTENT
        TABLES
          BINARY_TAB = LT_DATA.
    *application/
    Load the HTML
      CALL METHOD G_HTML_CONTROL->LOAD_DATA(
         EXPORTING
           TYPE         =  'application'
           SUBTYPE      =   'pdf' "
         IMPORTING
           ASSIGNED_URL         = LV_URL
         CHANGING
           DATA_TABLE           = LT_DATA
         EXCEPTIONS
           DP_INVALID_PARAMETER = 1
           DP_ERROR_GENERAL     = 2
           CNTL_ERROR           = 3
           OTHERS               = 4 ).
    CALL METHOD G_HTML_CONTROL->show_url
         EXPORTING  url        = lv_url
                   in_place    = 'X'
         EXCEPTIONS cntl_error = 1.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    MODULE user_command_0100 INPUT.
      DATA ok_code LIKE sy-ucomm.
      MOVE sy-ucomm TO ok_code.
      CASE ok_code.
        WHEN 'BACK' OR 'EXIT'.
         CALL METHOD LO_DOCKING_CONTAINER->free.
          CALL METHOD g_html_control->free.
          LEAVE TO SCREEN 0.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.                 " USE

Maybe you are looking for