Jar file to convert text into pdf
java coding or jar file to convert text file into pdf. i dont want exe file...
any converter to convert text into pdf.... to run in a webapplication
This website is used to convert Word, Text , Excel file into pdf. I think it is useful to you.
http://www.planetpdf.com
Message was edited by:
ggopi
Similar Messages
-
Jar file for converting html to pdf
Does anybody have jar file for converting a html document to pdf?
Are u particular about using jar file ?
I have developed form which converts any type of files especially word, txt ,html to pdf. Let me check if I have that
Rajesh ALex -
How can I convert JPG files in multiple subfolders into PDFs with a batch?
So here's the situation. I'm sitting on 400+ files, each in its own individual subfolder which also contains 4-10 other files. Those files I don't care about, only the .jpg file. I want to be able to take all of those .jpg files and convert them into PDFs, saving them in the same original folder. I've tried making an action to do this but it selects all the files in the folder and converts them as well.
Should be, yes... It's one of the options of the batch processes. I believe
it's under the first step, the one where you select which folder/files to
process. There should be a window there to select which file types to
process as well. Untick everything except for JPG and it should work... -
Is there a way to edit a PDF file without converting it into a word document?
Is there a way to edit a PDF file without converting it into a word document?
Then you posted in the wrong forum...
At any rate, you can use the Edit Text & Images tool (under Tools - Content Editing) to make changes to the file. You'll need to be a bit more specific about what you want to change if you want more detailed instructions. -
How to use OCR Font A type by the time of writing some text into Pdf fil
Hi,
I am generating one pdf file in java. How can I use OCR Font A for text of pdf file ..Please can any one help where can I get OCR Font A and how to use that one in java ... I want to write some text into pdf file and that text should use OCR Font A family ...
Thanks.This document shows how to disable OCR during conversion; just do the opposite: https://forums.adobe.com/docs/DOC-3062
-
Converting pictures into PDF files
How do I convert pictures into PDF files, is this possible?
If you want to use acrobat reader, you have to pay for it.
So, I use other free or cheap apps to do so =>
* powerpdf
* dragonprinter (draakprinter in dutch)
* writepdf
* scanapp (to convert parts of a picture)
I even think that almost every scan-app can convert pictures into pdf's. -
How to convert text to PDF?
Hi,
I have a text file that I would like to create a pdf for it.
is there any function that can convert text to pdf format?
Thanks,
ItaySee the example code :
DATA: it_otf TYPE STANDARD TABLE OF itcoo,
it_docs TYPE STANDARD TABLE OF docs,
it_lines TYPE STANDARD TABLE OF tline,
st_job_output_info TYPE ssfcrescl,
st_document_output_info TYPE ssfcrespd,
st_job_output_options TYPE ssfcresop,
st_output_options TYPE ssfcompop,
st_control_parameters TYPE ssfctrlop,
v_len_in TYPE so_obj_len,
v_language TYPE sflangu VALUE 'E',
v_e_devtype TYPE rspoptype,
v_bin_filesize TYPE i,
v_name TYPE string,
v_path TYPE string,
v_fullpath TYPE string,
v_filter TYPE string,
v_uact TYPE i,
v_guiobj TYPE REF TO cl_gui_frontend_services,
v_filename TYPE string,
v_fm_name TYPE rs38l_fnam.
CONSTANTS c_formname TYPE tdsfname VALUE 'ZTEST'.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
i_language = v_language
i_application = 'SAPDEFAULT'
IMPORTING
e_devtype = v_e_devtype.
st_output_options-tdprinter = v_e_devtype.
*st_output_options-tdprinter = 'locl'.
st_control_parameters-no_dialog = 'X'.
st_control_parameters-getotf = 'X'.
.................GET SMARTFORM FUNCTION MODULE NAME.................
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = c_formname
IMPORTING
fm_name = v_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
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 SMARTFORM............................
CALL FUNCTION v_fm_name
EXPORTING
control_parameters = st_control_parameters
output_options = st_output_options
IMPORTING
document_output_info = st_document_output_info
job_output_info = st_job_output_info
job_output_options = st_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.
ELSE.
.........................CONVERT TO OTF TO PDF.......................
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = v_bin_filesize
TABLES
otf = st_job_output_info-otfdata
doctab_archive = it_docs
lines = it_lines
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
........................GET THE FILE NAME TO STORE....................
CONCATENATE 'smrt' '.pdf' INTO v_name.
CREATE OBJECT v_guiobj.
CALL METHOD v_guiobj->file_save_dialog
EXPORTING
default_extension = 'pdf'
default_file_name = v_name
file_filter = v_filter
CHANGING
filename = v_name
path = v_path
fullpath = v_fullpath
user_action = v_uact.
IF v_uact = v_guiobj->action_cancel.
EXIT.
ENDIF.
..................................DOWNLOAD AS FILE....................
MOVE v_fullpath TO v_filename.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_bin_filesize
filename = v_filename
filetype = 'BIN'
TABLES
data_tab = it_lines
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF. -
Convert SmartForm into PDF(PDF should be password protected)
Hi Friends,
This is my requirement.
Need to convert SmartForm into PDF and this PDF should be send as an email with attachment and PDF should be password protected.
Can anyone plz help me???Dear Jena,
This is my code.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZBIN_SMARTFORM'
IMPORTING
fm_name = v_fm.
*& ASSIGNING VALUES TO FORM CONTROL STRUCTURE AND FORM COMPOSER
gs_ctrlop-getotf = 'X'.
gs_ctrlop-device = 'PRINTER'.
gs_ctrlop-preview = ' '.
gs_ctrlop-no_dialog = 'X'.
gs_outopt-tddest = 'LOCL'.
* GETTING THE OTF DATA
CALL FUNCTION v_fm
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
control_parameters = gs_ctrlop
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
output_options = gs_outopt
user_settings = ' '
wa_lfa1 = wa_lfa1
wa_t001 = wa_t001
wa_ekko = wa_ekko
wa_adrc = wa_adrc
IMPORTING
* DOCUMENT_OUTPUT_INFO =
job_output_info = gs_otfdata
* JOB_OUTPUT_OPTIONS =
TABLES
it_ekpo = it_ekpo
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.
* ASSIGNING THE OTFDATA TO OTF STRUCTURE TABLE
CLEAR gt_otf.
gt_otf[] = gs_otfdata-otfdata[].
* CONVERTING THE OTFDATA
CLEAR gt_lines.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
* ARCHIVE_INDEX = ' '
* COPYNUMBER = 0
* ASCII_BIDI_VIS2LOG = ' '
* PDF_DELETE_OTFTAB = ' '
* PDF_USERNAME = ' '
* PDF_PREVIEW = ' '
* USE_CASCADING = ' '
IMPORTING
bin_filesize = bin_file
* bin_file = bin_file
TABLES
otf = gt_otf
lines = gt_lines
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 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.
DATA l_file TYPE string .
CONCATENATE 'D:\usr\sap\CID\DVEBMGS00\work' '.PDF' INTO l_file.
OPEN DATASET l_file FOR OUTPUT IN BINARY MODE .
IF sy-subrc = 0 .
LOOP AT gt_lines INTO gs_lines .
TRANSFER gs_lines TO l_file .
ENDLOOP.
CLOSE DATASET l_file .
ELSE.
WRITE : / 'operating system could not open file' .
ENDIF.
* ASSIGNING THE DESCRIPTION OF THE OBJECT SENT IN MAIL
CLEAR gs_docdata.
gs_docdata-obj_name = gc_tst.
gs_docdata-obj_descr = gc_testing.
gs_docdata-obj_langu = sy-langu.
* ASSIGNING THE EMAIL-ID TO STRUCTURE OF API RECIPIENT LIST TABLE
CLEAR : gt_reclist,gs_reclist.
***IF INTERNAL MAIL-ID
* gs_reclist-receiver = sy-uname.
* gs_reclist-rec_type = 'B'.
***IF EXTERNAL MAIL-ID
gs_reclist-receiver = '[email protected]'.
gs_reclist-rec_type = 'U'.
APPEND gs_reclist TO gt_reclist.
* PASSING THE SAP SCRIPT LINES TO SAP OFFICE
CLEAR : gs_objbin,gs_lines.
LOOP AT gt_lines INTO gs_lines.
gv_pos = 255 - gv_len.
IF gv_pos > 134.
gv_pos = 134.
ENDIF.
gs_objbin+gv_len = gs_lines(gv_pos).
gv_len = gv_len + gv_pos.
IF gv_len = 255.
APPEND gs_objbin TO gt_objbin.
CLEAR : gs_objbin,gv_len.
IF gv_pos < 134.
gs_objbin = gs_lines+gv_pos.
gv_len = 134 - gv_pos.
ENDIF.
ENDIF.
ENDLOOP.
IF gv_len > 0.
APPEND gs_objbin TO gt_objbin.
ENDIF.
* FILLING THE DETAILS IN SAP OFFICE
DESCRIBE TABLE gt_objbin LINES gv_tab_lines.
CLEAR gs_objbin.
READ TABLE gt_objbin INTO gs_objbin INDEX gv_tab_lines.
IF sy-subrc = 0.
gs_objpack-doc_size = ( gv_tab_lines - 1 ) * 255 + strlen( gs_objbin ).
gs_objpack-transf_bin = 'X'.
gs_objpack-head_start = 1.
gs_objpack-head_num = 0.
gs_objpack-body_start = 1.
gs_objpack-body_num = gv_tab_lines.
gs_objpack-doc_type = 'PDF'.
gs_objpack-obj_name = 'ATTACHMENT'.
gs_objpack-obj_descr = 'TEST'.
APPEND gs_objpack TO gt_objpack.
ENDIF.
DATA: BEGIN OF command_list OCCURS 0.
INCLUDE STRUCTURE sxpgcolist.
DATA: END OF command_list .
DATA: BEGIN OF exec_protocol OCCURS 0.
INCLUDE STRUCTURE btcxpm.
DATA: END OF exec_protocol.
DATA: status LIKE btcxp3-exitstat,
commandname LIKE sxpgcolist-name VALUE 'ZB_TEST',
sel_no LIKE sy-tabix.
* GET LIST OF EXTERNAL COMMANDS
CALL FUNCTION 'SXPG_COMMAND_LIST_GET'
EXPORTING
commandname = commandname
operatingsystem = sy-opsys
TABLES
command_list = command_list
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'SXPG_COMMAND_CHECK'
EXPORTING
commandname = command_list-name
operatingsystem = sy-opsys
EXCEPTIONS
no_permission = 1
command_not_found = 2
parameters_too_long = 3
security_risk = 4
wrong_check_call_interface = 5
x_error = 6
too_many_parameters = 7
parameter_expected = 8
illegal_command = 9
communication_failure = 10
system_failure = 11
OTHERS = 12.
CLEAR command_list.
REFRESH command_list.
DATA: v_dir_input TYPE sxpgcolist-parameters.
DATA: v_dir_input1 TYPE sxpgcolist-parameters.
command_list-name = 'ZB_TEST'.
command_list-opsystem = 'Windows NT'.
DATA : doc TYPE string.
DATA : pass TYPE string ,
name(40).
doc = 'invoice'.
pass = '123456'.
CONCATENATE 'cnd/c d:\pdf\encryptpdf.exe' doc'.PDF' INTO name.
CONCATENATE 'cmd /c d:\pdf\encryptpdf.exe' '-i' name '-o ' name '-u' pass INTO v_dir_input SEPARATED BY space .
READ TABLE command_list INDEX sel_no.
CONCATENATE command_list-opcommand v_dir_input INTO command_list-opcommand SEPARATED BY space.
* CHECK AUTHORIZATION
command_list-addpar = 'X'.
APPEND command_list.
CONSTANTS: c_extcom TYPE sxpgcolist-name VALUE 'ZB_TEST',
c_oper TYPE syopsys VALUE 'Windows NT'.
DATA: t_result TYPE STANDARD TABLE OF btcxpm.
v_dir_input = command_list-opcommand.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = c_extcom
additional_parameters = v_dir_input
operatingsystem = c_oper
TABLES
exec_protocol = t_result
EXCEPTIONS
no_permission = 1
command_not_found = 2
parameters_too_long = 3
security_risk = 4
wrong_check_call_interface = 5
program_start_error = 6
program_termination_error = 7
x_error = 8
parameter_expected = 9
too_many_parameters = 10
illegal_command = 11
wrong_asynchronous_parameters = 12
cant_enq_tbtco_entry = 13
jobcount_generation_error = 14
OTHERS = 15.
OPEN DATASET l_file FOR INPUT IN BINARY MODE.
IF sy-subrc = 0.
READ DATASET l_file INTO itab_attach.
CLOSE DATASET l_file.
ENDIF.
CALL METHOD cl_bcs_convert=>xstring_to_solix
EXPORTING
iv_xstring = itab_attach
RECEIVING
et_solix = t_attachment.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gs_docdata
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
* IMPORTING
* SENT_TO_ALL =
* NEW_OBJECT_ID =
TABLES
packing_list = gt_objpack
* OBJECT_HEADER =
CONTENTS_BIN = gt_objbin
* CONTENTS_TXT =
CONTENTS_HEX = t_attachment
* OBJECT_PARA =
* OBJECT_PARB =
receivers = gt_reclist
* EXCEPTIONS
* TOO_MANY_RECEIVERS = 1
* DOCUMENT_NOT_SENT = 2
* DOCUMENT_TYPE_NOT_EXIST = 3
* OPERATION_NO_AUTHORIZATION = 4
* PARAMETER_ERROR = 5
* X_ERROR = 6
* ENQUEUE_ERROR = 7
* OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
WRITE 'SENT SUCCESSFULLY'.
ENDIF.
SUBMIT rsconn01 WITH mode EQ 'INT' AND RETURN.
The mail is sent to inbox successfully,but when am opening the attachment am getting the below error as,
---> There was an error while opening this file.The file is damaged and couldnt be repaired. -
How can I convert text to PDF in the new "Pages" without losing info.
How can I convert text to PDF in the new "Pages" without losing a lot if information?
Select Export To from Pages' File menu, then select PDF from the sub-menu.
-
Want to create a function module which will convert smartform into PDF .
Hi All ,
Requirement : I want to create a function module/report which will convert smartform into PDF .
Thanks in advanceHi All ,
zsuresh_test : for converting smartform into pdf.
when I am excuting this report(zsuresh_test) and by passing the smartform name FOPCR_STANDARD_F1
I am getting error :
Incorrect parameter with CALL FUNCTION
Can you please help me out..
REPORT zsuresh_test.
Variable declarations
DATA:
w_form_name TYPE tdsfname VALUE 'FOPCR_STANDARD_F1',
w_fmodule TYPE rs38l_fnam,
w_cparam TYPE ssfctrlop,
w_outoptions TYPE ssfcompop,
W_bin_filesize TYPE i, " Binary File Size
w_FILE_NAME type string,
w_File_path type string,
w_FULL_PATH type string.
Internal tables declaration
Internal table to hold the OTF data
DATA:
t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
Internal table to hold OTF data recd from the SMARTFORM
t_otf_from_fm TYPE ssfcrescl,
Internal table to hold the data from the FM CONVERT_OTF
T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
This function module call is used to retrieve the name of the Function
module generated when the SMARTFORM is activated
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = w_form_name
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = w_fmodule
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Calling the SMARTFORM using the function module retrieved above
GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
format of the output
w_cparam-no_dialog = 'X'.
w_cparam-preview = space. " Suppressing the dialog box
" for print preview
w_cparam-getotf = 'X'.
Printer name to be used is provided in the export parameter
OUTPUT_OPTIONS
w_outoptions-tddest = 'LP01'.
CALL FUNCTION w_fmodule
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = w_cparam
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = w_outoptions
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = t_otf_from_fm
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.
t_otf[] = t_otf_from_fm-otfdata[].
Function Module CONVERT_OTF is used to convert the OTF format to PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = W_bin_filesize
BIN_FILE =
TABLES
otf = T_OTF
lines = T_pdf_tab
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 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.
To display File SAVE dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
WINDOW_TITLE =
DEFAULT_EXTENSION =
DEFAULT_FILE_NAME =
FILE_FILTER =
INITIAL_DIRECTORY =
WITH_ENCODING =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
filename = w_FILE_NAME
path = w_FILE_PATH
fullpath = w_FULL_PATH
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_bin_filesize
filename = w_FULL_PATH
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
tables
data_tab = T_pdf_tab
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
Hallo,
1) what is the best way to convert text to pdf from as3?
2) what is the best way to import pdf in fash?
Thanks.you'll need to use a 3rd party library like alivePDF, AlivePDF - ActionScript 3 Open-Source PDF Library – 100% client side PDF generation which makes you and your server happ… and/or purePDF, purePDF, a complete actionscript PDF library - sephiroth.it - flash world
-
Is Any Body Tell Me How to Creat a Script Form(converting script into pdf)
waiting for u r responce, pls help me in this concernd
Welcome to SDN.
If you want to conver SCRIPT to PDF format check this link -
hi, hoe to convert script form into pdf format
how to convert script into PDF
If you want to convert it to Adobe Forms refer this -
Adobe Forms
Regards,
Amit
Reward all helpful replies. -
Hello ABAP Experts,
I have a request to convert a HTML Response (FM: HTTP2_GET) into a PDF Document.
Has any body an idea how to handle that.
Thank you very much for you answers.
Kind regards
AxelThe easiest way to convert web pages/sites into PDF is with Acrobat! Important: this is Acrobat (costs a few dollars) and not Acrobat Reader!
Acrobat has a web capture tool. With the older version I tested there was some minor problems.
(1) It is not recognized as a browser we support. You will have to knock out the browser checking for this to work. Look at the cl_htmlb_content->runtime_validation. The last case statement. Modify your system to temporarily comment this out. (Do not forget to place it back!).
(2) The older version I tested with had problems to convert complex pages into PDF. The new rendering we use is to browser specific. Your milage might vary.
Alternative could be just to "print" the page from the browser into a PDFWriter (kind of printer driver that comes with Acrobat). This actually worked very well.
Alternative is just to make screenshots into word document and convert this into PDF.
> Please help me ..
With this, I think we have now helped you. In return, you can help us with a nice append (or better a small weblog) about the "huge project that was a challange". These war stories shared by the fire side makes for interesting reading, and I am sure other people would also be interested in seeing what you achieved. Looking forward to it.
++bcm -
Convert tline into pdf file document in Java
Dear ALL,
I built a RFC FM to convert smartform into tline which including PDF data.
the Code:
Converting to PDF Format
DATA l_lines TYPE TABLE OF tline WITH HEADER LINE.
* DATA l_lines1 TYPE TABLE OF solix_tab WITH HEADER LINE.
DATA l_docs TYPE TABLE OF docs.
DATA len TYPE i.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = len
TABLES
otf = job_output_info-otfdata[]
doctab_archive = l_docs[]
lines = l_lines[] "this inner table include pdf file data
EXCEPTIONS
err_conv_not_possible? = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
*CALL METHOD cl_gui_frontend_services=>gui_download
* EXPORTING
* bin_filesize = len
* filename = 'c:\pdf.pdf'
* filetype = 'BIN'
* CHANGING
* data_tab = l_lines[]"i_objbin[]
* EXCEPTIONS
* OTHERS = 1.
"If i want to save it in my PC ,call this FM CALL METHOD cl_gui_frontend_services=>gui_download.
But i dont want to do it.I want to pass the parameter l_lines[] to java(web) by RFC, and convert to pdf file and show in java(web).
thanks
FreddyHi,
Update:
I have tested this and here is some code:
SAP:(I got the OTF from CALL FUNCTION 'PRINT_TEXT')
FORM get_pdf_data
USING
tdname TYPE thead-tdname
CHANGING
it_tline TYPE text_line_tab
bin_file TYPE xstring .
DATA: st_thead TYPE thead .
DATA: it_lines TYPE tline_tab .
st_thead-tdobject = 'TEXT' .
st_thead-tdname = tdname .
st_thead-tdid = 'ST' .
st_thead-tdspras = 'E' .
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = st_thead-tdid
language = st_thead-tdspras
name = st_thead-tdname
object = st_thead-tdobject
IMPORTING
header = st_thead
TABLES
lines = it_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc NE 0 .
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 .
ENDIF.
DATA: it_otfdata TYPE otf_t_itcoo .
DATA: st_options TYPE itcpo.
st_options-tdgetotf = abap_true .
CALL FUNCTION 'PRINT_TEXT'
EXPORTING
dialog = abap_false
header = st_thead
OPTIONS = st_options
TABLES
lines = it_lines
otfdata = it_otfdata
EXCEPTIONS
canceled = 1
device = 2
form = 3
OPTIONS = 4
unclosed = 5
unknown = 6
format = 7
textformat = 8
communication = 9
bad_pageformat_for_print = 10
OTHERS = 11.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
DATA: it_otfdata_m TYPE otf_t_itcoo .
* "Merge pdf output demo"
APPEND LINES OF it_otfdata TO it_otfdata_m .
* DATA: bin_file TYPE xstring .
DATA: it_lines_dummy TYPE tline_tab .
DATA: bin_filesize TYPE i .
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_file = bin_file
bin_filesize = bin_filesize
TABLES
otf = it_otfdata_m
lines = it_lines_dummy
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
ENDFORM. " GET_PDF_DATA
Java:
final byte[] byteArray = function.getExportParameterList().getByteArray("BIN_FILE");
final Path path = Paths.get("My.pdf");
Files.write(path, byteArray, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.CREATE);
regards.
Another update:
Using in HttpServlet:
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.sap.conn.jco.JCoDestination;
import com.sap.conn.jco.JCoDestinationManager;
import com.sap.conn.jco.JCoException;
import com.sap.conn.jco.JCoFunction;
import com.sap.conn.jco.JCoRepository;
import com.sap.conn.jco.ext.Environment;
import destinations.MyDestination;
public class MyServlet extends HttpServlet {
@Override
protected void doGet(final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse) throws ServletException, IOException {
httpServletResponse.setContentType("application/pdf");
httpServletResponse.setStatus(HttpServletResponse.SC_OK);
final ServletOutputStream servletOutputStream = httpServletResponse.getOutputStream();
servletOutputStream.write(getPDF());
servletOutputStream.flush();
servletOutputStream.close();
private byte[] getPDF() {
try {
Environment.registerDestinationDataProvider(new MyDestination());
final JCoDestination destination = JCoDestinationManager.getDestination(destinations.Id.sapdev2.name());
final JCoRepository repository = destination.getRepository();
final JCoFunction function = repository.getFunction("Y_R_EITAN_TESTS_03");
function.execute(destination);
final byte[] byteArray = function.getExportParameterList().getByteArray("BIN_FILE");
return byteArray;
} catch (final JCoException exception) {
exception.printStackTrace();
return null; -
How can i convert image into pdf file
Hi Friends,
I want to convert image file(i.e. jpeg,bmp,gif) into pdf file using java apis OR is there any tool which can convert it & which we can integrate into our java application
Thanks in adva.Is there any solution to this case.....?
Maybe you are looking for
-
Hi All I am on portal 7.3 ehp1 sp 07. We are getting ready to go live with a portal on device implementation and I am having a fairly big issue. I have developed a number of apps using bsp and jquery mobile 1.3.1. My problem is that the page height i
-
I'm using JDev 10.1.2, Struts, ADF BC. I have an 'input form from' a view that displays all the records. I click on Find and Execute to search for particular record it works fine too. But, if there are no records for the 'find', it doesn't display an
-
In December of 2005, I bought a mac mini. I bought it because of my pervious experience with the complete invulnerability of macs to doltish users like me, and because I just happen to like the way macs run. My mini has been fairly slow the entire ti
-
Hi Guys, I have tandberg management suite and i have forgot the password, can anyone help to tell the procedure how to change the password from SSH or console.
-
Fire Fighter Mail Notification
Hi Gurus, I have an issue with fire fighter....if i am not wrong...When i add a firefighter id to a user id ...it should send a mail...Fore Fighter controller and owner with a link to approve and then they approve the access...then it will send the u