Determine size of pdf from spool
All,
does anyone know how to determine size of pdf from spool.
i'm using RSPO_RETURN_ABAP_SPOOLJOB to get pdf file, but i want to know its size.
any idea?
Assume the PDF data is in internal table gt_messg_att.
MOVE p_spoolno TO lv_spoolno.
* CONVERT THE SPOOL TO PDF
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = lv_spoolno
no_dialog = lc_no_dialog
* DST_DEVICE =
* PDF_DESTINATION =
IMPORTING
pdf_bytecount = lv_bytecount
* PDF_SPOOLID =
* OTF_PAGECOUNT =
* BTC_JOBNAME =
* BTC_JOBCOUNT =
TABLES
pdf = gt_pdf_output
EXCEPTIONS
err_no_otf_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_dstdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
* Transfer the 132-long strings to 255-long strings
LOOP AT gt_pdf_output INTO wa_pdf_output.
TRANSLATE wa_pdf_output USING ' ~'.
CONCATENATE v_buffer wa_pdf_output INTO v_buffer.
MODIFY gt_pdf_output FROM wa_pdf_output.
CLEAR wa_pdf_output.
ENDLOOP.
* TO CONVERT THE DATA INTO PDF FORMAT ELSE THE PDF FILE
* WON'T OPEN & REPORT WOULD GIVE A MESSAGE THAT
* THE FILE IS DAMAGED & COULD NOT BE OPENED
TRANSLATE v_buffer USING '~ '.
CLEAR : wa_messg_att,
gt_messg_att.
DO.
wa_messg_att = v_buffer.
APPEND wa_messg_att TO gt_messg_att.
SHIFT v_buffer LEFT BY 255 PLACES.
IF v_buffer IS INITIAL.
EXIT.
ENDIF.
CLEAR wa_messg_att.
ENDDO.
ENDIF.
* Get size of attachment
DESCRIBE TABLE gt_messg_att LINES lv_cnt.
READ TABLE gt_messg_att INTO wa_messg_att INDEX lv_cnt.
lwa_doc_data-doc_size = ( lv_cnt - 1 ) * 255 + STRLEN( wa_messg_att ).
Similar Messages
-
Unable to save a 'smallest size file' pdf from illustrator 5.5
We recently insalled Adobe Standard 5.5
I often save PDF files from Illustrator using the built in PDF options available from the PDF drop down menu bar when saving files. Usually I will save a visual as a 'smallest file size' or make use of the 'high quality print' option for other files etc.
Why cant I do this on CS5.5?
In addition, the colour is not acurate at all!
Please helpHi Scott - I found the following thread on the net. So I had a look on my time machine back-ups and copied the files from there, which I then pasted into my Settings folder as you suggested.
Ta da!! All working again!
Any idea how I could restore these settings from a backup?
Thanks!
The PDF presets reside in Root/Library/Application Support/Adobe/Adobe PDF/Settings/
After I had installed 10.6.5, 6 preset files were removed from the Settings folder. The folder tree itself remained, it was just that some of the contents of "Settings" were deleted. I have fixed the problem by copying the deleted settings files from a backup.
These are the files which were deleted:
Smallest File Size.joboptions
Press Quality.joboptions
PDFX4 2008.joboptions
PDFX3 2002.joboptions
PDFX1 2001.joboptions
High Quality Print.joboptions
These files were not deleted:
Standard.joboptions
PDFA1b 2005 RGB.joboptions
PDFA1b 2005 CMYK.joboptions
Oversized Pages.joboptions
Somebody at Adobe community support for Indesign directed me to restore these files from a backup, which solved the problem.
Re: Unable to save a 'smallest size file' pdf from illustrator 5.5 -
Convert OTF to PDF and print PDF from Spool
Hi,
I have searched all the forums and service market place but could not find solution to my problem.
I am using Function module
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = p_spool
no_dialog = 'X'
dst_device = 'ISJB'
pdf_destination = 'S'
IMPORTING
pdf_bytecount = lv_bytecount
pdf_spoolid = lv_spoolid
otf_pagecount = lv_pagecount
btc_jobname = lv_jobname
btc_jobcount = lv_jobcount
TABLES
pdf = gt_pdf
EXCEPTIONS
err_no_otf_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_dstdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
this generates spool in SP01. Ideally it should generate a PDF spool file but it generates a BIN file of Format G_RAW. When I display the spool it displays all kinds of japanese characters which does not make sense,.
I setup printer ISJB with device type JPPDF (PDF converted for Japanese characters). Does any one know where the problem could be? Why I could not print the Spool in PDF?
Thank you,
JagadishHi,
check out this program which will convert spool to pdf
REPORT zsmartform_spool_g.
*************Types Declaration ****************************
TYPES : BEGIN OF gty_tab, " Spool Requests
rqident TYPE tsp01-rqident, " Spool request number
rqdoctype TYPE tsp01-rqdoctype, " Spool: document type
rqo1name TYPE tsp01-rqo1name, " TemSe object name
END OF gty_tab.
*********Work Area ****************************************
DATA: form_name TYPE rs38l_fnam, " Used to get the function module of Smartform
wa_outopt TYPE ssfcompop, " SAP Smart Forms: Smart Composer (transfer) options
gs_tab TYPE gty_tab. " Spool Requests
*******Internal Table Declarations ************************
DATA: gt_tab TYPE STANDARD TABLE OF gty_tab, " Spool Requests
gt_pdf TYPE STANDARD TABLE OF tline, " SAPscript: Text Lines
gt_spoolid TYPE tsfspoolid, " Table with Spool IDs
gt_otfdata TYPE ssfcrescl. " Smart Forms: Return value at end of form prnt
*********Variable Declarations ****************************
DATA: gv_bytecount TYPE i, "#EC NEEDED " PDF Byte Count
gv_file_name TYPE string, " File name
gv_file_path TYPE string, " File Path
gv_full_path TYPE string, " Path
gv_binfilesize TYPE i, " Bin File size
gv_rqident TYPE tsp01-rqident, " Spool request number
gv_name TYPE tst01-dname, " TemSe object name
gv_objtype TYPE rststype-type, " TemSe: Object type name
gv_type TYPE rststype-type. " TemSe: Object type name
START-OF-SELECTION.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZPDF_G'
IMPORTING
fm_name = form_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.
*Get Spool IDs
wa_outopt-tdnewid = 'X'.
wa_outopt-tddest = 'LP01'.
CALL FUNCTION form_name
EXPORTING
output_options = wa_outopt
user_settings = 'X'
IMPORTING
job_output_info = gt_otfdata
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.
*Assign the spool id
gt_spoolid = gt_otfdata-spoolids.
Generate spool and pdf for the output of the form
PERFORM sub_generate_spool_pdf.
END-OF-SELECTION.
*& Form sub_generate_spool_pdf
Generate Spool and PDF output
FORM sub_generate_spool_pdf .
DATA: ls_spoolid LIKE LINE OF gt_spoolid.
*----Get the Spool Number
CLEAR ls_spoolid.
READ TABLE gt_spoolid INTO ls_spoolid INDEX 1.
IF sy-subrc = 0.
gv_rqident = ls_spoolid.
ENDIF.
CLEAR gt_tab.
SELECT rqident rqdoctype rqo1name INTO TABLE gt_tab
FROM tsp01 WHERE rqident = gv_rqident.
IF sy-subrc = 0.
CLEAR gs_tab.
Get the TemSe: Object name into variable gv_name
READ TABLE gt_tab INTO gs_tab INDEX 1.
IF sy-subrc = 0.
gv_name = gs_tab-rqo1name.
ENDIF.
ENDIF.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
authority = 'SP01'
client = sy-mandt
name = gv_name
part = 1
IMPORTING
type = gv_type
objtype = gv_objtype
EXCEPTIONS
fb_error = 1
fb_rsts_other = 2
no_object = 3
no_permission = 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.
Check if temse object name type is 'OTF' or 'LIST'
IF gv_objtype(3) = 'OTF'.
PERFORM get_otf_spool_in_pdf.
ELSE.
PERFORM get_abap_spool_in_pdf.
ENDIF.
Generate F4 functionality from spool to pdf
PERFORM write_pdf_spool_to_pc.
ENDFORM. " sub_generate_spool_pdf
*& Form get_abap_spool_in_pdf
Generate the Spool number
FORM get_abap_spool_in_pdf .
REFRESH gt_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gv_rqident
IMPORTING
pdf_bytecount = gv_bytecount
TABLES
pdf = gt_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
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.
ENDFORM. " get_abap_spool_in_pdf
*& Form get_otf_spool_in_pdf
Generate OTF data from the Spool Number
FORM get_otf_spool_in_pdf .
REFRESH gt_pdf.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gv_rqident
IMPORTING
pdf_bytecount = gv_bytecount
TABLES
pdf = gt_pdf
EXCEPTIONS
err_no_otf_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_dstdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " get_otf_spool_in_pdf
*& Form write_pdf_spool_to_pc
Generate PDF format
FORM write_pdf_spool_to_pc .
CALL METHOD cl_gui_frontend_services=>file_save_dialog
CHANGING
filename = gv_file_name
path = gv_file_path
fullpath = gv_full_path
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.
----DOWNLOADING THE PDF DATA***
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = gv_binfilesize
filename = gv_full_path
filetype = 'BIN'
TABLES
data_tab = gt_pdf
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.
ENDFORM. " write_pdf_spool_to_pc -
Printing SFP ADOBE generated pdf from spool.
I am trying to print ADOBE PDF file to HP Designjet Z5400 plotter. It successfully writes a pdf file to the spool. When I either release that spool file to print or have the print job set to print immediately I get a spool error - unable to read format G_RAW l_rc =128. However I can print the pdf from preview. It is NOT an issue with the printer printing the pdf file as I can do this. My issue is that I cannot print directly to the printer via the SAP spooler. I have entered incident to SAP with specific example of my program that produces the pdf spool file. I am directed to read notes that imply I have ADS problem which is ridiculous as I have plenty of SFP generated pdf files printing to HP and Canon laser printers. Again i am trying to print a very large label 2 X2 foot to HP Designjet Z5400 plotter directly via spool. My task is to direct label to different printers based upon MATNR field.
I would appreciate response from only people who have printed SPF ADOBE pdf to plotters.
The pdf that was created file size 5.7 KB.
SPAD settings
Device Type HPGL HPGL : Bus.Graphics: HP/GL plotter Device Class Standard printer
Model HP Designjet Z5400
Host Spool Access Method G G: Frontend print with control technologienew component SAPPDFPRINT, interactive forms can be printed on any Windows printer just like all of the other spool requests with the SAPWIN device types.
Refer to SAP notes:
1444342 - Device type-independent printing of ADS forms
968394 - Forms Printing from spool and from Preview PDF differ
1630403 - Mass printing of Adobe documents
Regards
Sandy -
Is it possible to download pdf from spool in smallest form
Hi Gurus,
our customer wants a report that has many columns, so I create a report with line size 1023. But also they want to download it to a pdf form, so I send the report to spool and download it to pdf form by running standard report RSTXPDFT4. But pdf form takes only little part of the report, many columns can't seen in it. Is there any way to take it in smallest font or any other thing that I can take all the columns or print columns in other page??
thanks..Hi,
Implement SAP note #1226758. Ensure that you make the setting below in SPAD as decribed in the note:
'SP01: Number of Columns for List Display from Format'.
This should ensure that the wide format is used for the PDF also.
Regards,
Aidan -
Send a pdf from spooler to an email address
Hi all,
as the subject says i am trying to send a pdf that exists in the spooler at an email address. Is there an FM that reads the pdf ?
As far as i can see all the procedures convert OTF to PDF, but i already have a pdf.
Any proposal is welcome, thank you in advance.
Regards,
Alex.Hi you can do like this
data decleration for mail and pdf.
DATA : gt_listobject LIKE abaplist OCCURS 10 .
DATA : gt_objcont LIKE soli OCCURS 10 WITH HEADER LINE.
DATA : gt_objhead LIKE soli OCCURS 10 WITH HEADER LINE.
DATA : gt_att_head LIKE soli OCCURS 10 WITH HEADER LINE.
DATA : gt_receivers LIKE soos1 OCCURS 10 WITH HEADER LINE.
DATA : gt_packing_list LIKE soxpl OCCURS 10 WITH HEADER LINE.
DATA : gt_so_ali LIKE soli OCCURS 100 WITH HEADER LINE.
DATA : gt_so_ali1 LIKE soli OCCURS 100 WITH HEADER LINE.
DATA : gt_document_data LIKE sood1.
DATA: lineno TYPE i , length TYPE i , size TYPE i.
DATA: gt_scheme LIKE ztrc_scheme OCCURS 0 WITH HEADER LINE.
DATA: gd_recsize TYPE i.
Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des.
Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
DATA: check TYPE c.
DATA: spid LIKE tsp01-rqident.
converting spool to pdf..
spid = syst-spono . " give your spool number here
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = spid
TABLES
pdf = it_pdf_output.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
sending mail
DATA: p_email LIKE somlreci1-receiver,
p_sender LIKE somlreci1-receiver,
sub(40).
DESCRIBE TABLE it_mess_att LINES gd_recsize.
CHECK gd_recsize > 0.
REFRESH it_mess_bod.
Default subject matter
gd_subject = 'Subject'.
gd_attachment_desc = text-002.
it_mess_bod = text-001.
APPEND it_mess_bod.
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
*concatenate sy-datum into sub separated by space.
MOVE 'Orders Released on' TO sub.
WRITE: sy-datum DD/MM/YYYY TO sub+27(10).
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
TABLES it_mess_bod
it_mess_att
USING
p_email
sub "text-003
'PDF'
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
CHANGING gd_error
gd_reciever.
ENDFORM. " process_email
*& Form send_file_as_email_attachment
text
-->P_IT_MESS_BOD text
-->P_IT_MESS_ATT text
-->P_TEXT_009 text
-->P_1058 text
-->P_GD_ATTACHMENT_NAME text
-->P_GD_ATTACHMENT_DESC text
<--P_GD_ERROR text
<--P_GD_RECIEVER text
FORM send_file_as_email_attachment TABLES it_message
it_attach
USING
p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
CHANGING p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = it_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
t_receivers-receiver = '[email protected]'.
APPEND t_receivers.
function module to send mail with pdf attachment
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
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.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
this will work...for further calrification reply -
While Changing ABAP List from Spool to PDF Whole List is not displaying
Hi,
There is Z Program to convert Payslip ABAP List to PDF, when it is generating in PDF from Spool, I cannot view whole Payslip.
Previously it is dislpaying fully in PDF file, But not Now.
Please Help me...............
With Regards,
Gaurav.Hi,
Thank you very much. My problem has been solved
Thanks & Regards,
Gaurav Mittal -
Creating PDFs from BDC for VL01N
Hi,
I've to create PDFs for the deliveries which are being created in a BDC program.With some setting in config (which I'm unaware about,) as soon as the delivery is created, the output gets printed. I need to download the print preview at the same time at the desktop in PDF format. (The BDC program uses CALL TRANSACTION 'VL01N').
Can you please help me knowing how can I fetch the spool no in this case to feed it to the FM used to convert the data into PDF from spool no?
Thanks.
Chinmay.This is a Quark problem - have you thought of using Adobe InDesign
(since it's an Adobe application)?
Jon -
Max limit on size of PDF when converting from OTF spool to PDF
I have a scenario where I need to process as many OTF spool files into one PDF file, and then send this PDF as a ZIP file in an email attachment.
Is there a limit on the size of PDF that ABAP code can handle?
Also, what are the ABAP steps to accomplish this.
Thank you,
ShipraHello Shipra,
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
data_set = dataset " dataset name
destination = 'LP01' " Output device
expiration = '1' " one day in spool
immediately = space " no immediate print
list_name = listname " listname
layout = 'X_65_132' " Layout
new_list_id = 'X' " new spool id
no_dialog = 'X' " no print popup
IMPORTING
out_parameters = pri_params
valid = valid
EXCEPTIONS
OTHERS = 4.
CHECK sy-subrc EQ 0 AND valid NE space.
* Begin of Spool Generation.
NEW-PAGE PRINT ON
PARAMETERS pri_params
NO DIALOG .
SELECT single * FROM /itsam/smmmt into ls_smmmt
where mtask_id = '0015600EB8A41DDB9980CAB61CD154D7' .
* Write the report in required format
*WRITE: 'Test page'.
CONCATENATE ls_smmmt-mtask_id ' ' ls_smmmt-TASK_NR into str_text.
write: / str_text .
*write: / ls_smmmt-description .
* End of Spool Generation.
NEW-PAGE PRINT OFF.
CONCATENATE c_pdf_filepath c_pdf_filename INTO pdf_filename.
CALL FUNCTION 'RSPO_FIND_SPOOL_REQUESTS'
EXPORTING
rq0name = spoolname
rq2name = spooldsn
TABLES
spoolrequests = spool_ids
EXCEPTIONS
OTHERS = 0.
READ TABLE spool_ids ASSIGNING <spool> INDEX 1.
CHECK sy-subrc EQ 0.
spoolid = <spool>-rqident.
filename1 = pdf_filename.
CALL FUNCTION 'GUI_CREATE_DIRECTORY'
EXPORTING
dirname = c_pdf_filepath
EXCEPTIONS
failed = 1
OTHERS = 2.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = spoolid
no_dialog = ' '
IMPORTING
pdf_bytecount = numbytes
pdf_spoolid = pdfspoolid
TABLES
pdf = li_pdf
and then use CL_ABAP_ZIP to convert it into a zip file -
How to move PDF file from Spool to Application Server?
How to move PDF file from Spool to Application Server?
Cannot use RSTXPDFT4 because that converts OTF to PDF and the file is already PDF.
RSTXPDFT5 doesn't work. It picks the file up and assigns it a 'text' type and outputs a 1 line txt (1kb in size) on the server with the spool number in it!
The program which outputs the file to the spool, in the first place, uses adobe forms and outputs to a printer of type PDF.Hi Gemini ,
Please refer the below links.
[http://sap.ittoolbox.com/groups/technical-functional/sap-hr/convert-a-spool-to-pdf-and-save-on-application-server-in-background-720959]
[http://www.sapfans.com/forums/viewtopic.php?f=13&t=325628&start=15]
Edited by: Prasath Arivazhagan on Apr 13, 2010 4:48 PM -
How to create a 4 page pdf from images - each page should open at same size
How do I create a 4 page pdf (from 4 images - all the same size) that opens each page at full page size?
Thank you so much.
Ginger
PREVIOUS MSG:
My goal is to create multi page pdfs that are created from images (scans of old brochures). I receive images (scans of pages) all at the same size.
I have been able to create the 4 pdfs (each opens at full page size) and merge into 1 pdf. When I open that final pdf, I see a column of 4 pages, page 1 image being larger than the remaining 3. When I click on the left, page 1, icon, I get the full page. When I click on icons for pages 2 - 4, I get nothing. The only way I can get the other pages in a full page view is to adjust the scaling after left icon is selected. That is not what I want.
How I created the files.
I can either create pdf pages using Photoshop, or using Acrobat Pro itself through:
File> Create PDF> From File and adding each of the images. I then, for each, choose Properties> Initial View> Fit Page> Save. Then I use File> Combine> Merge Files into Single PDF> Save.
Then I open the multi page pdf.
I appreciate any help.
Thank you,
Ginger
PREVIOUS MSIt seems to me what you want to do is create one document which a combination of all four and then one page of each.
To create a Document with 4 pages combined in to one PDF. open the first in a Series the to Edit menu and click on add pages click on next document (browse to document first) the choose attach to to end of document or add to end of document. Repeat until you get all images added. They will end up (or should ) center in center of their own page. Save this document with a new name for now.
Next go back to Photo shop and reduce size of images to fit desired sheet of paper (8-1/2 by 11, 8-1/2 by 14, whatever) place them side by side and row by row so you have 4 images on one page.
now save as Pdf.
now decide which you want to swap to the Thumbnails (the 4 on one page, or 4 individual pages. I would use the thumbnails and make each a button that references the page in the document you save as a 4 page pdf that applies.
Then on that page write a line saying click each illustration to see full size image (you might have to write this line while in Photoshop) then save this as PDF file
Try out. You might have to use some javascript controls to do this. But I am not experienced in JavaScript to do this. I'm sure it cane be done.
But note you will have to save both documents with the Thumbnails and the four page and Thumbnail page in a folder and send to prospect
If you want just four separate pages in one Pdf just do first two paragraphs above -
How can I create one pdf from a FrameMaker Book with mixed page sizes.
Looking for an easier way to create one pdf from a FrameMaker book that has files with different pages sizes; letter and tabloid.
So far, I have not been able to find a way to set up the Adobe PDF printer or Distiller to read the page size from the source files in the book and then create one pdf with the appropriate page sizes based on the file sizes in the FrameMaker book. I can create a pdf of the book using a multi-step process where I create a pdf for each page size and then combine them into one file. This is a lot of work.
Is there a way to set the Adobe PDF printer where it reads page size from the source files and then creates one pdf with a mixed page sizes?
Using FrameMaker 7 and 10 and Acrobat X Pro.
Thanks for any suggestionshttp://forums.adobe.com/message/4013068#4013068
http://forums.adobe.com/message/3519366#3519366
http://forums.adobe.com/thread/485331?tstart=0 -
I'm trying to print from a full-size, 30x42 pdf of an AutoCAD file. I only want to print an 8 1/2 x 11 portion, in scale. How do I select the window and print in scale on my 8 1/2 x 11 printer (Brother MFC-9340CDW)?
You might be better off contacting an AutoCAD support group.
-
Creating .pdf from a ppt or .doc in acrobat 9 resulting in strangely large file sizes
I am printing to .pdf from Microsoft Word and Powerpoint (previously Office 07 - now Office 10) and the file sizes are sometimes doubling in size. Also, for some larger documents, multiple .pdfs are generating as if acrobat is choosing where to cut off a document due to large file size and generating secondary, tertiary, etc., docs to continue the .pdf. The documents have placed images (excel charts, etc) but they are not enormous - that is until they are being generated into a .pdf. I had hoped that when i upgraded to Office 10, this issue would go away, but unfortunately, it hasn't. Any ideas? thoughts? Thanks so much!
One thing that can happen with MS Office applications when an image contains transparency is the "image" is actually composed of multiple one pixel images when converted to PDF. This could be confirmed by examining the file. Try selecting the images using the TouchUp Object tool to see if what looks like a single image it entirely selected.
-
Create pdf from html, how to adjust page size
I have a large html file that I need to convert to a pdf. I am able to open the html in acrobat and save as pdf, but I cannot find where to adjust the page size. When I save the html in acrobat, the saved file is still a single page, but when I open the page in reader, then there are page breaks.
How do I adjust the page size and create a single page document?
There is also a header and footer line that I don't want. How do I get rid of those?
LHHWhen you open the window for create PDF from web, select the settings. You can adjust the size and header/footer there.
Maybe you are looking for
-
Crystal Report 11, List of Runtime DLLs, Runtime.hlp File
I am using Crystal Report 11 with my Delphi 7 application. I need the list of runtime dlls which I will need to distribute with my application. The Help file which comes with the Delphi 7 VCL Component (UCRPE32.hlp) says : QUOTE check RUNTIME.HLP in
-
Hi all, I am having problems migrating my Toplink Workbench project from 9.0.4.5 to 10.1.3.1.0! I used the Toplink Workbench to open and convert the existing project. The conversion succeeded, but when I tried to export the mappings I got this: java.
-
How to format external drive to MAC OS Extended w/ MBR scheme?
Hello all, I have a Maxtor 1TB drive that I would like to format to MAC OS Extended (Journaled) but also using a Master Boot Record partition map scheme. Every time I try using the Disk Utility, I get a partition error. It will only let me partition
-
Do I Really need to render this much all the time????
I just upgraded from a G4 to a MacBook Pro. I am using FC 5.0 HD. I decided to use the Offline RT Photo Jpeg option to capture all my footage and edit on my MacBook. I figured I could render faster and store a lot more footage on the go. Trouble is w
-
Just updated daughter's Ipod Touch with IOS 5 and lost ...
her most favorite app (Ultimate Pokedex). It's not listed anywhere, in her itunes or on her device. Any advice?