Pdf preview from smartform
Hi all
I have developed a smart form which have copies window in it.
in copies window logic is implemented that if
if sfsy-copycount = 1
then it is original
if 2 then bank
if gt2 then extra.
now an application program is developed for this which will show the print preview of form
in pdfformat.
printpreview is coming in pdf fornat but only first copy is shown ie original,
rest copies are not coming.
my reqment is such that if 1 give 1 copy then first copy should shown
when two copy then original copy and bank copy .
the code is as follows.
*& Report ZSFDRIVER_to_pdf1
REPORT zsfdriver_to_pdf1.
TABLES: vbrk ,vbrp .
DATA l_fname TYPE rs38l_fnam .
DATA: w_otfdata TYPE ssfcrescl.
DATA: ls_control_param TYPE ssfctrlop.
DATA: ls_composer_param TYPE ssfcompop.
DATA: BEGIN OF it_itcoo OCCURS 0.
INCLUDE STRUCTURE itcoo.
DATA: END OF it_itcoo.
DATA: w_otf TYPE itcoo.
DATA: t_vbrp LIKE STANDARD TABLE OF vbrp. " initial size 0 with header line.
PARAMETERS: p_vbeln LIKE vbrk-vbeln.
START-OF-SELECTION.
SELECT * FROM vbrp INTO TABLE t_vbrp
WHERE vbeln = p_vbeln.
SELECT *
FROM vbrk
INTO vbrk
UP TO 1 ROWS
FOR ALL ENTRIES IN t_vbrp
WHERE vbeln = t_vbrp-vbeln.
ENDSELECT.
end-of-selection.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'YCOPY'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = l_fname
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.
ELSE.
ENDIF.
ls_control_param-getotf = 'X'.
CALL FUNCTION l_fname
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = ls_control_param
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = ls_composer_param
user_settings = ' '
i_vbrk = vbrk
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = w_otfdata
job_output_options =
TABLES
i_vbrp = t_vbrp[]
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.
LOOP AT w_otfdata-otfdata INTO w_otf.
APPEND w_otf TO it_itcoo.
ENDLOOP.
CALL FUNCTION 'HR_IT_DISPLAY_WITH_PDF'
TABLES
otf_table = it_itcoo.
when i give 1 copy
Hi,
In the print preview of your form before converting to .pdf check all the pages are coming or not? If it is coming then you can try like generate a spool and execute RSTXPDFT4 with that spool. See whether all the pages are coming or not? .
Just try in different way.
Regards,
Abhijit
Similar Messages
-
PDF Conversion from Smartform-Thai
Hi All,
we have smartform which has Thai Characters along with bar codes. we want to convert it into PDF, as have tried PDF! however the Thai in not coming as correct. we have uploaded TTF as well. please anyone suggest any SAP notes for this or solution.
Thank you very much!
Regards,
PradeepHi Wen,
TH_VISTA_FONTS is already activated in the system. please refer the attached screenshot.
Regards,
Pradeep -
Tamper proof or noneditable PDF file creation from smartforms.
Experts,
We have requirement to create PDF file from smartforms that should be tamper proof.
As we know there any many PDF to word convertors tools are in market.
So PDF file should not be copied and not converted in word (should be tamper proof and non-editable).
So do we have solution with in SAP only to achieve above requirement ?
Please take your time answering, I'm not the kind of person that demands an answer really quickly, because that would be a bit rude.
Message was edited by: Matthew Billingham - "hurry up" text replaced.Dear Jelena,
True PDF is non-editable, but we can copy PDF content or even we can use tool to convert into word/docx format. for basically we are using information.
Orignal source will never change.
Let me explain you example.
Let say i have converted invoice (smartform) into PDF and send to X person.
Now X person can convert PDF into word format.
X person did some changes in word and converted back to PDF (miss use of orignal data/PDF file).
So requirement is that X person should not copy PDF content (Ctrl + C) and X person should be restrcited from converting to word.
Acrobat/Adobe has this feature but this is external (need to use some third pary tool)
Can this requirement accomplished within SAP only or include some Adobe package (class & method in SAP ). -
After about a month of using Designer 7, the "PDF Preview" item under the "View..." menu is now disabled? Anybody have this problem before or know what might cause it?
Jason,
I think you can turn it back on by right click on the "Body Page" tab and select "PDF Preview" from the pop-up menu. -
Safari adobe pdf preview printing problem
Hello,
I use HP laserjet color 1600. After downloaded Maverick, I can't print pdf preview from Safari anymore. Error is "filter failed" or "bit depth and / or color not supported by threshold set".
Problem is that this is an official dynamic pdf document protected, that you can only fill in on line; I can't dowload it as regular pdf file.
Still before I installed maverick, I could always print those type of pdf preview from Safari.
So I already updated java and adobe, as my printer software, and I already launched "system updates"... I mean after I install Maverick.
But I'm still stuck
Any tips to solve it ?
ThanksDoes anybody know if this has been fixed on 10.1.3?
-
Color graphic in a PDF generated from a SmartForm causes error
I have a SmartForm containing a color graphic. It works correctly,
appears just the way it should in Print Preview, and it prints
correctly. However, when I generate a PDF file from, Adobe Reader
complains that the PDF file is corrupt and refuses to print it. If I
remove the color graphic from the SmartForm and don't make any other
changes, I get a good PDF file that can be parsed, displayed, and
printed without any problems.
Why is the presence of the color graphic in the SmartForm leading to a
corrupt PDF file? Is there any workaround (short of removing the color
graphic) that I can use to get a good PDF file?
Here is a more detailed description of what I am doing.
1. Creating the color graphic
A. I started with a color .TIF file
B. I went to transaction SE78,
Form Graphics -> Stored on Document Server ->
GRAPHICS General Graphics -> BMAP Bitmap Images
C. Clicked on the "Import" icon
D. In the "File name" field, navigated to my .TIF file
E. Typed the name of my graphic in the "Name" field and some
descriptive text in the "Description" field
F. Selected the "Color Bitmap Image" radio button
G. Set the "Print Attributes" as follows:
Unchecked - Resides in the Printer Memory
Checked - Reserve Height Automatically
Unchecked - Compression
H. The color graphic seems to upload correctly
I. When I click on Print Preview, it is displayed perfectly.
J. When I use the Search Help associated with the name field to
find the graphic, it is shown with the name and description
that I gave it, the Object field is displayed as "GRAPHICS",
the ID field is displayed as "BMAP".
K. When I select Graphic -> Graphic Information, the Resolution is
75 DPI and the Size is 26.86 x 8.26 cm. When I use this graphic
in the SmartForm, I will enter the resolution as 300 DPI - in
order to get an image whose dimensions are one-quarter of these
dimensions, but which will have a good resolution for a laser
printer.
2. The use of the color graphic in the SmartForm
A. It is a "Graphic" node which is the first node on the first
(and only) page of the SmartForm.
i. The Name is the name of the graphic I created
ii. Object = "GRAPHICS"
iii. ID = "BMAP"
iv. The "Color Bitmap Image (BCOL)" radio button is selected
v. The Resolution = 300 DPI
B. The position and size are:
i. Left Margin = 15.00 MM
ii. Width = 69.00 MM
iii. Upper margin = 15.00 MM
iv. Height = 21.77 MM
3. The process of producing the PDF file
A. The function SSF_FUNCTION_MODULE_NAME is called to obtain the
name of the function module associated with the SmartForm.
B. The function module (whose name was returned by
SSF_FUNCTION_MODULE_NAME) is called with:
i. CONTROL_PARAMETERS = a SSFCTRLOP structure with
GETOTF = 'X'
NO_OPEN = space
NO_CLOSE = space
NO_DIALOG = 'X'
ii. OUTPUT_OPTIONS = a SSFCOMOP structure with:
TDPRINTER = 'POST2'
TDDEST = space
TDNEWID = 'X'
TDIMMED = 'X'
TDDELETE = space
TDCOVER = space
TDCOPOES = 1
iii. JOB_OUTPUT_INFO = a structure of type SSFCRESCL used to
receive the OTF file
C. The function CONVERT_OTF is called with:
i. FORMAT parameter = 'PDF'
ii. OTF table parameter = the OTFDATA table contained within
the JOB_OUTPUT_INFO SSFCRESCL structure returned from the
SmartForm function module.
iii. BIN_FILE parameter = an XSTRING used to receive the PDF
file
iv. BIN_FILESIZE parameter = an integer used to receive the
size of the PDF file.Hello David,
The reason for this problem is probably related to the FlateDecode compression described in SAP Note 843480 (PDF conversion: Compression of bitmaps and TrueType fonts).
Try switching off the usage of FlateDecode compression again via report RSTXPDF3 as described in Note #843480.
It is a little confusing. The option 'FLATE_COMPR_OFF' needs to be set to 'On' to turn off the FlateDecode compression.
To set this run as follows:
se38 -> RSTXPDF3 -> enter 'FLATE_COMPR_OFF' in the 'Name' field
-> Select 'Change Settings' radio button
You will get a pop-up 'Do not use flat compression'.
Select the 'on' button.
After this create a new PDF and check if the problem is resovled.
Regards,
Aidan -
Converting Smartform into PDF preview layout
Hi ABAP experts,
We have converted an existing invoice layout smart form into PDF layout in print preview mode. However, we have an issue with PDF layout alignment. Earlier, it used to print the documents correctly (layout is aligned properly at the middle of the page). But when use this 'PDF' preview layout (triggered from smart form) the layout is left aligned/ larger right margin (but not at the middle).
We have gone through the existing forum links on this PDF layout generating from smart form. But no luck on this left alignment issue. Do we need to modify the OTF data that is being populated in the layout. Can it be modifed with the position of the layout dynamically. Please advise.
Technical team has used "CONVERT_OTF_2_PDF" to populate the OTF data.
In SAP note # 323736 (issued in 2006), the below limitation was mentioned. But do we have any way to resolve this page alignment issue.
Page size for SAPscript/SmartForms: PDF conversion uses the page format from the form definition as page size for the PDF document. If this has been defined larger than the page size that is actually used (for example for INCH12, INCH11 and so on), a reduced document or a larger right margin are the
result when you view/print in Acrobat Reader.
Thanks in advance.
Regards,
SatyaHi Satya,
'We tried that option of "PDF!" but it didn't work for this smart form. Do we need to include/activate any option for this in the smart form.'..What do you mean by it didn't work for this smartform.?
Execute your smartform and when you are in the print preview mode of the form means you get the output, then type PDF! in the command and hit ENTER. A popup will get displayed if you are using windows 7
or Allow and decline type of radiobutton option will be displayed if you are using Windows XP. So just click Allow and your smartform output will be displayed in pdf. Now you can save the pdf output file while clicking the save option in PDF. Your smartform output will be aligned properly in the PDF.
You don't need any activation or any FM for converting the output in pdf for this.
Basically, we do this to attach the smartform output in test plan.
NOTE: This is for only to get the output in PDF while you are in Print preview of the form.
Regards
Syed -
Generate a PDF from SmartForm with the CRM_PDF_PRINT ICF Service
Has anyone used the ICF Service /sap/crm/crm_pdf_print to convert a SmartForm into a Adobe Acrobat PDF file dynamically in the CRM web client?
Weu2019re using CRM 5.2 with the Web-client UI and want to generate a Print Preview of an existing SmartForm .
From what I can tell, there doesnu2019t appear to be any other way to set up previewing a SmartForm from the Web-client by configuration ( using the Action Framework ) in our version of CRM (OSS Note 1323062 only applies to CRM 6.0 & 7.0)
Thanks.Moved to Acrobat forum.
-
Converting Smartforms to PDF and displaying Smartforms on print preview
Hi,
How to convert smartforms to pdf?
How to attach this pdf to email?
How to attach this pdf to the email and at the same time can print preview the smartforms?
Thanks.Hi Navi,
Code Snippet for Simple Mail
*& Report ZZ_TEST *
REPORT zz_test .
INCLUDE zz_test_top.
INCLUDE zz_test01.
FORM entry *
--> RETURN_CODE *
--> US_SCREEN *
FORM entry USING return_code us_screen.
CLEAR retcode.
xscreen = us_screen.
PERFORM processing USING us_screen.
CASE retcode.
WHEN 0.
return_code = 0.
WHEN 3.
return_code = 3.
WHEN OTHERS.
return_code = 1.
ENDCASE.
ENDFORM. "entry
*& Include ZZ_TEST_TOP *
TABLES : nast,
tnapr.
TYPES : BEGIN OF t_SOUDNAMEI1.
INCLUDE STRUCTURE SOUDNAMEI1.
TYPES : END OF t_SOUDNAMEI1.
Internal Table declarations
DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
i_tline TYPE TABLE OF tline WITH HEADER LINE,
i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
*Objects to send mail.
i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
i_lips LIKE lips OCCURS 0 WITH HEADER LINE,
i_SOUDNAMEI1 TYPE STANDARD TABLE OF t_SOUDNAMEI1.
Work Area declarations
DATA:w_objhead TYPE soli_tab,
wa_control_parameters TYPE ssfctrlop,
wa_output_options TYPE ssfcompop,
w_return TYPE ssfcrescl,
w_doc_chng TYPE sodocchgi1,
w_data TYPE sodocchgi1,
w_buffer TYPE string,"To convert from 132 to 255
wa_SOUDNAMEI1 TYPE t_SOUDNAMEI1,
Variables declarations
w_form_name TYPE rs38l_fnam,
w_len_in LIKE sood-objlen,
w_len_out LIKE sood-objlen,
w_len_outn TYPE i,
w_lines_txt TYPE i,
w_lines_bin TYPE i,
retcode TYPE sy-subrc,
xscreen TYPE c,
w_spld TYPE usr01-spld,
w_receiver TYPE SOXNA-FULLNAME,
w_OBJ_RECORD TYPE OBJ_RECORD,
w_user type sy-uname,
w_email TYPE ad_smtpadr.
Constants Declaration
CONSTANTS : c_x TYPE c VALUE 'X',
c_atrate(1) TYPE c VALUE '@'.
*& Include ZZ_TEST01 *
FORM PROCESSING *
FORM processing USING proc_screen.
SELECT * FROM lips
INTO TABLE i_lips
WHERE vbeln = nast-objky.
Call Function module to Getfunction Module name Generated by Smartform
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = tnapr-sform
IMPORTING
fm_name = w_form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
retcode = sy-subrc.
ENDIF.
CLEAR : wa_control_parameters,
wa_output_options.
CASE nast-nacha.
WHEN '1'.
wa_control_parameters-device = 'PRINTER'.
WHEN '7'.
DATA: l_email TYPE ad_smtpadr.
wa_output_options-tdnoprev = c_x.
wa_control_parameters-getotf = c_x.
To get the default output device maintained in the
User profile
SELECT SINGLE spld FROM usr01
INTO w_spld
WHERE bname EQ nast-usnam.
IF sy-subrc EQ 0.
MOVE w_spld TO wa_output_options-tddest .
ENDIF.
wa_output_options-tdnoprev = c_x.
wa_control_parameters-getotf = c_x.
To get the email address maintained for the particular output
CALL FUNCTION 'NAST_GET_MESSAGE_OBJECT_RECV'
EXPORTING
pi_objkey = nast-tdname
IMPORTING
pe_addr = w_receiver
CHANGING
pc_objhandle = w_obj_record
EXCEPTIONS
maildata_not_readable = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF w_receiver NA c_atrate.
To retrieve the E-Mail Id in case we get the User name from NAST
CLEAR wa_soudnamei1.
REFRESH i_soudnamei1.
MOVE w_receiver TO wa_soudnamei1-fullname.
To get the user name
CALL FUNCTION 'SO_NAME_CONVERT_API1'
EXPORTING
name = wa_soudnamei1
TABLES
names = i_soudnamei1
EXCEPTIONS
user_not_exist = 1
parameter_error = 2
x_error = 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.
CLEAR wa_soudnamei1.
READ TABLE i_soudnamei1 INTO wa_soudnamei1 INDEX 1.
MOVE wa_soudnamei1-sapname TO w_user.
To get the e-mail Id maintained in the user profile
CALL FUNCTION 'FTR_CORR_CHECK_EMAIL_SAP_USER'
EXPORTING
i_user = w_user
IMPORTING
e_email_address = l_email
EXCEPTIONS
mail_address = 1
determination_error = 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.
MOVE l_email TO w_receiver.
ENDIF.
MOVE w_receiver TO w_email.
ENDCASE.
wa_control_parameters-no_dialog = c_x.
wa_control_parameters-langu = nast-spras .
wa_output_options-tdteleland = nast-tland.
wa_output_options-tdtelenum = nast-telfx .
wa_output_options-tdsenddate = nast-erdat .
wa_output_options-tdsendtime = nast-eruhr .
wa_output_options-tddataset = nast-dsnam .
wa_output_options-tdsuffix1 = nast-dsuf1 .
wa_output_options-tdsuffix2 = nast-dsuf2 .
wa_output_options-tdimmed = nast-dimme .
wa_output_options-tddelete = nast-delet .
wa_output_options-tdautority = nast-tdautority.
wa_output_options-tdcovtitle = nast-tdcovtitle .
wa_output_options-tdcover = nast-tdocover .
wa_output_options-tdreceiver = nast-tdreceiver.
wa_output_options-tddivision = nast-tddivision.
wa_output_options-tdcopies = nast-anzal .
wa_output_options-tdnewid = c_x.
wa_output_options-tdarmod = nast-tdarmod.
wa_output_options-tdnoarmch = c_x.
CALL FUNCTION w_form_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = wa_control_parameters
output_options = wa_output_options
user_settings = ' '
IMPORTING
job_output_info = w_return
TABLES
it_lips = i_lips
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF nast-nacha EQ 7 AND sy-subrc EQ 0.
i_otf[] = w_return-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = w_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 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.
Convert PDF from 132 to 255.
LOOP AT i_tline.
Replacing space by ~
TRANSLATE i_tline USING ' ~'.
CONCATENATE w_buffer i_tline INTO w_buffer.
ENDLOOP.
Replacing ~ by space
TRANSLATE w_buffer USING '~ '.
DO.
i_record = w_buffer.
Appending 255 characters as a record
APPEND i_record.
SHIFT w_buffer LEFT BY 255 PLACES.
IF w_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
REFRESH: i_reclist,
i_objtxt,
i_objbin,
i_objpack.
CLEAR w_objhead.
Object with PDF.
i_objbin[] = i_record[].
DESCRIBE TABLE i_objbin LINES w_lines_bin.
Document information.
w_doc_chng-obj_name = 'Smartform'.
w_doc_chng-expiry_dat = sy-datum + 10.
CONCATENATE 'Delivery' 'Note'
INTO w_doc_chng-obj_descr.
*w_doc_chng-obj_descr = 'Smart form output'.
w_doc_chng-sensitivty = 'F'. "Functional object
w_doc_chng-doc_size = w_lines_txt * 255.
Pack to main body as RAW.
Obj. to be transported not in binary form
CLEAR i_objpack-transf_bin.
Start line of object header in transport packet
i_objpack-head_start = 1.
Number of lines of an object header in object packet
i_objpack-head_num = 0.
Start line of object contents in an object packet
i_objpack-body_start = 1.
Number of lines of the object contents in an object packet
i_objpack-body_num = w_lines_txt.
Code for document class
i_objpack-doc_type = 'RAW'.
APPEND i_objpack.
Packing as PDF.
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 1.
i_objpack-body_start = 1.
i_objpack-body_num = w_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'Smartform'.
CONCATENATE 'Delivery' 'Note' '.pdf'
INTO i_objpack-obj_descr.
i_objpack-doc_size = w_lines_bin * 255.
APPEND i_objpack.
Document information.
CLEAR i_reclist.
e-mail receivers.
i_reclist-receiver = w_email.
i_reclist-express = 'X'.
i_reclist-rec_type = 'U'. "Internet address
APPEND i_reclist.
sending mail.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_doc_chng
put_in_outbox = 'X'
TABLES
packing_list = i_objpack
object_header = w_objhead
contents_bin = i_objbin
contents_txt = i_objtxt
receivers = i_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.
ENDIF.
ENDIF.
ENDFORM. "processing
OTF to PDF
========================================================================
Program1
*& REPORT zpmm_print1
REPORT zpmm_print1.
DATA : gw_ssfcrescl TYPE ssfcrescl.
DATA: gt_otf TYPE STANDARD TABLE OF itcoo ,
gt_tline TYPE STANDARD TABLE OF tline,
gv_len LIKE sood-objlen,
gw_ssfctrlop TYPE ssfctrlop, "for CONTROL_PARAMETERS
gw_ssfcompop TYPE ssfcompop. "for OUTPUT_OPTIONS
DATA fm_name TYPE rs38l_fnam.
gw_ssfctrlop-getotf = 'X'.
gw_ssfctrlop-no_dialog = 'X'.
gw_ssfcompop-tdnoprev = 'X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZPMM_1'
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
<error handling>
ENDIF.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = gw_ssfctrlop
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = gw_ssfcompop
user_settings = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = gw_ssfcrescl
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.
gt_otf[] = gw_ssfcrescl-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = gv_len
TABLES
otf = gt_otf
lines = gt_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 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.
DATA : gv_filename LIKE rlgrap-filename VALUE 'C:\swet.pdf'.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
bin_filesize = gv_len
filename = gv_filename
filetype = 'BIN'
filetype_no_show = 'X'
IMPORTING
act_filename = gv_filename
filesize = gv_len
cancel = ''
TABLES
data_tab = gt_tline.
Program 2
*& REPORT zpmm_print2
REPORT zpmm_print2.
DATA : gw_ssfcrescl TYPE ssfcrescl.
DATA: gt_otf TYPE STANDARD TABLE OF itcoo ,
gt_tline TYPE STANDARD TABLE OF tline,
gv_len LIKE sood-objlen,
gw_ssfctrlop TYPE ssfctrlop, "for CONTROL_PARAMETERS
gw_ssfcompop TYPE ssfcompop. "for OUTPUT_OPTIONS
DATA fm_name TYPE rs38l_fnam.
gw_ssfctrlop-getotf = 'X'.
gw_ssfctrlop-no_dialog = 'X'.
gw_ssfcompop-tdnoprev = 'X'.
CALL FUNCTION '/1BCDWB/SF00000041'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = gw_ssfctrlop
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = gw_ssfcompop
user_settings = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = gw_ssfcrescl
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.
gt_otf[] = gw_ssfcrescl-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = gv_len
TABLES
otf = gt_otf
lines = gt_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 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.
DATA : gv_filename LIKE rlgrap-filename VALUE 'C:\swet.pdf'.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
bin_filesize = gv_len
filename = gv_filename
filetype = 'BIN'
filetype_no_show = 'X'
IMPORTING
act_filename = gv_filename
filesize = gv_len
cancel = ''
TABLES
data_tab = gt_tline.
=========================================================================
Cheers
Mohinder Singh Chauhan -
Printing problem with PDF graphs from preview
Whenever I print PDF files from preview or from safari, some graphs print incorrectly, although they are displayed correctly on the screen. This only happens with black and white figures and either a negative image with the black and white are reversed is printed or the background of the graphic just prints as a black box. Colour elements are unaffected. This doesn't happen when printing the same files using Adobe Reader or Adobe Professional. Any suggestions for tweaking this, or am I going to have to start using the Adobe plugins instead?
Please try it on Adobe Reader version 10.1.0 , Please note that this forum is for Adobe Reader on android and not for PDF Viewer.
-vaibhav -
Email PDF from SmartForms but it is editable
In SD, we are emailing the invoice in PDF from SmartForm. The problem we are facing is that PDF is editable and we would like to protect PDF from editting for security reason. is it possible to control attribute of PDF file from SAP at the point of sending?
Thanks in advane,
Masahi
good
you can protect the pdf file using the authorization object, go through this link i hope this ll help you to solve your problem.
http://www.jhu.edu/hopkinsone/Secure_Private/Library/Blueprint/CrossFunc_Section6.pdf
thanks
mrutyun^ -
Annotations made in Preview to PDFs created from MS Word corrupts PDF
In Preview, when I save annotations to PDFs created from an MS Word document, the PDF seems to be corrupted. Searching in the PDF no longer shows any results, and text copied from the PDF is displayed as a series of meaningless characters when pasted into a note annotation, or pasted into another file (e.g. a TextEdit file). So for example, "the monitoring of progress" becomes ")@%8,1),&12%,=%4&,2&//" when copied and pasted.
Is there any way to prevent PDFs from being corrupted in this way, or to restore the PDF so that searching and copying work correctly?I suspect this is a problem with M$ failing to handle PDF files correctly. I would suggest you ask your question over on the M$ forums instead of here.
Allan -
I want to prevent "Preview" PDF viewer from opening the PDF's with sidebar. Trying to disable the sidebar, can't find anything that allows it to be disabled. I know how to disable the sidebar after the fact, but I find it annoying because it takes up space and is useless and I am constantly having to hide it. Can I just disable it from the preferences, that way when my PDF opens the sidebar is not there? Looked but couldn't find anything.
wonges88 wrote:
I think that this is an issue with how the author of the PDF saves and collates the file. I wish in the preferences there was simply a "turn off sidebar," but I have yet to find it.
Yes. I think so too.
All my PDFs open in Preview without the sidebar.
Matt -
hi i can't seem to copy and paste pdf files from preview to a microsoft word document. it always comes up with nonsense characters in the word document. how do i fix this? thanks in advance
Hi,
The quickest way to do this (tested with OS 10.8.2, MS Word 2011) is in one line:
tell application "Microsoft Word" to close every document whose name begins with "book"
The reason why your script doesn't work is that you aren't specifying to Word which document you want it to close.
So, changing one line ought to do it:
close document incrementvalue -- instead of "close document"
But... when you close a document, you change the document count. Document 2 becomes document 1, document 3 becomes document 2 etc. So eventually you'd get a message saying "The object you are trying to access doesn't exist".
Because of this, if you want to do it in a repeat loop, you have to work backwards:
tell application "Microsoft Word"
set doc_count to count documents
repeat with x from doc_count to 1 by -1
if name of document x begins with "book" then close document x
end repeat
end tell
Hope this helps. -
My macbookpro is not opening pdf sites from safari or firefox, it goes to the address but just gives me a black screen. I can however open a pdf file that I have saved on my HD, it opens on preview. any thoughts? osx 10.6.8
Back up all data.
Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
/Library/Internet Plug-ins
In the Finder, select
Go ▹ Go to Folder
from the menu bar, or press the key combination shift-command-G. Paste (command-V) into the text box that opens, then press return.
From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
I've seen an unconfirmed report that the "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you might need to remove it as well, if applicable.
If you still have the issue, repeat with this line:
~/Library/Internet Plug-ins
If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.
Maybe you are looking for
-
Help needed to create a filter
Experts, I would like to create a filter to return data corresponding to the last month of the year or the month for which the latest data is available. For example, If the end user selects 2012 from the year prompt (we have a PV associated to it), t
-
I saw the MIGO screen there for GR/GI slip no: F4 functionality have been given for forms AX45, AX45&FORMC, CT3, CT3&FORMC, FORMC, NONE. Why these people have configured this in MIGO can any one guide me on this......
-
A little confused in generating awr report using awrrpt.sql Here are the snapshots we have in the repository. 8257 13 Nov 2013 02:00 1 8258 13 Nov 2013 02:30 1 8259 13 Nov 2013 03:00 1 8260 13 Nov 2013 03:30 1 8261 13 Nov 2013 04:00 1 8262 13 No
-
TEXT datatype in Stored Procedure and concat Carriage returns
Anyone, I am trying to create a stored procedure that will allow me to grab a bunch of 255 Char records in a cursor and concatenate them together adding a carriage return after each row. Here is pseudo code would look like: CREATE OR REPLACE PROCEDUR
-
How do I delete previous searches from Google?
Whenever I hit the down arrow key on the keyboard when I am typing in the search field for Google (or any other search engine website), it brings up a list of all my previous searches...how do I get rid of these?