2012 Jun 22 5:32 PM
Hello All,
I would like to convert multi page FAX (TIFF) document into OTF in order to be able to split it on pages. There are function modules available for converting to different formats, but I have not enough knowledge about how to use them.
CALL FUNCTION 'SX_OBJECT_CONVERT___T_PRT'
EXPORTING
format_src = 'RAW'
format_dst = 'OTF'
addr_type = 'FAX'
devtype = 'PRINTER'
FUNCPARA = ???
CHANGING
transfer_bin = transfer_bin "BOOLEAN
content_txt = content_txt_01 "CHAR25
content_bin = content_bin_01 "RAW255
objhead = objhead "CHAR255
len = len "CHAR12
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
FUNCPARA - what this parameter means? Looks it is not obligatory, maybe in my case it is important.
DEVTYPE - there are several Device types maintained in our system. In which transaction I could check them? Because result of conversion depends on this parameter.
CONTENT_TXT_01 - here I should receive OTF document, is this correct? If yes, how to convert such single column format to 2 column format of typical OTF?
CONTENT_TXT_01 - here I supply my source document in RAW format.
OBJHEAD - how to use this parameter?
Thanks and best regards,
Alex
2012 Jun 24 11:41 PM
Hi,
I think there is a confusion here. SX_OBJECT_CONVERT_* function modules are used for SAPconnect (mails) document conversion. It can't convert RAW to OTF (see SCOT transaction to see the possibilities, for instance conversion of OTF spools into PDF). By the way, here RAW corresponds to the RAW SAPoffice documents, i.e. the short text messages ("raw emails"); it doesn't mean the original binary TIFF file.
Now, if your requirement is to split subfiles from a TIFF file, one subfile being one page, into several files so that to insert a page break between subfiles, you should probably use an external image processing software.
Sandra
Hello All,
I would like to convert multi page FAX (TIFF) document into OTF in order to be able to split it on pages. There are function modules available for converting to different formats, but I have not enough knowledge about how to use them.
CALL FUNCTION 'SX_OBJECT_CONVERT___T_PRT'
EXPORTING
format_src = 'RAW'
format_dst = 'OTF'
addr_type = 'FAX'
devtype = 'PRINTER'
FUNCPARA = ???
CHANGING
transfer_bin = transfer_bin "BOOLEAN
content_txt = content_txt_01 "CHAR25
content_bin = content_bin_01 "RAW255
objhead = objhead "CHAR255
len = len "CHAR12
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
FUNCPARA - what this parameter means? Looks it is not obligatory, maybe in my case it is important.
DEVTYPE - there are several Device types maintained in our system. In which transaction I could check them? Because result of conversion depends on this parameter.
CONTENT_TXT_01 - here I should receive OTF document, is this correct? If yes, how to convert such single column format to 2 column format of typical OTF?
CONTENT_TXT_01 - here I supply my source document in RAW format.
OBJHEAD - how to use this parameter?
Thanks and best regards,
Alex
2012 Jun 24 11:41 PM
Hi,
I think there is a confusion here. SX_OBJECT_CONVERT_* function modules are used for SAPconnect (mails) document conversion. It can't convert RAW to OTF (see SCOT transaction to see the possibilities, for instance conversion of OTF spools into PDF). By the way, here RAW corresponds to the RAW SAPoffice documents, i.e. the short text messages ("raw emails"); it doesn't mean the original binary TIFF file.
Now, if your requirement is to split subfiles from a TIFF file, one subfile being one page, into several files so that to insert a page break between subfiles, you should probably use an external image processing software.
Sandra
2012 Jun 25 11:37 PM
Hi Sandra,
thanks for reply.
The problem is that I read these FAX(TIFF) files from SAP Archive, so it is not possible to put a page break in advance, the whole file comes up in a single internal table in RAW format.
I tried to debug the SAP ArchiveLink in order to get the idea of how these files should be interpreted, but not really succesfully.
Also I though maybe it is possible to save them in spool and to read from spool as PDF files page by page, but even if this works out, not so easy to convert PDF to image.
Any ideas appreceated.
Thank you again,
Regards,
Alex.
2012 Jun 27 11:46 PM
Hi,
The only available TIFF converter in SAP is in SE78 transaction, and stores it as a "Form Graphic" in BDS (into a SAP internal format); it is used later for being included into SAPscript forms or Smart Forms. (for information, there is also an obsolete technology to achieve the same, program RSTXLDMC, and it stores it into a SAPscript text). And there's also a program to convert them into the MIME repository so that it can be used within Adobe forms.
I did a test with RSTXLDMC to import a multipage TIFF, though the return code was "success", without any warning, but I could make sure that it only stored the first page, and ignored the second page. I think that SE78 very probably has the same limitation.
I found this blog Web Dynpro ABAP: Display tiff images, but it seems that CL_IGS_IMAGE_CONVERTER is only able to do simple conversions, here it converts the TIFF in only one JPEG image.
If you really want to handle all pages with ABAP, you may adapt SAP's programs.
This question about converting images has been discussed many times in the forum, and it is now clear that SAP is not a format converter except for some very frequent or simple formats. For others, it is more secure to use an external software (because the company will provide support if there are bugs or upgrades needed).
BTW, I was probably not clear: IMHO, within SAP (I mean in SAPoffice/SAPconnect) "RAW" means text, it has not the meaning like "raw image format".
Sandra
2012 Jul 01 7:14 PM
Hello Sandra,
thank you for help.
I also have checked these ways in past, before writting to forum, but also just first page was processed sucesfully and the second ignored.
I will share the solution, if I find it.
Kind regards,
Alex
2013 Oct 02 10:27 AM
2015 Feb 03 5:49 AM
Hi Alex,
I have similar requirement.
We have multipage Tiff images stored in SAPArchiv table. I get tiff image in Binary format.
I want to conver it to PDF or any other image format and display it in browser.I used class CL_IGS_IMAGE_CONVERTER but it converts only 1st page.
Have you converted tiff image into PDF?
How to handle such scenarios?
Thanks.
2015 Feb 17 4:41 PM
Hello Anjor, hello Daniel,
in my case requiriment is postponed, no solution so far
It might be a solution to call third party software from ABAP for converting to PDF, but not all customers are keep to this.
BR, Alex
2015 Nov 30 11:32 PM
Anjor Wagle wrote:
I used class CL_IGS_IMAGE_CONVERTER but it converts only 1st page.
Class CL_IGS_IMAGE_CONVERTER converts multipage-tiff image into single page PNG for me.
Method get_image has a parameter INDEX to get several output files for a single input file.
CALL METHOD lo_converter->get_image
EXPORTING
index = li_index
IMPORTING
blob = lt_data
blob_size = li_blob_size
blob_type = lc_blob_type.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |