Won't convert PM7 to PDF
I have a document in PageMaker7 that I want to convert to a PDF. I used to be able to do this. I chose Export, Adobe PDF. The PDF options screen pops up. I don't change any of the default settings and click on Export and name the file to save. It begins running the conversion then pops up Distiller screen which says: Could not open file (says the file name.pdf). File may be in use. It is not in use and it doesn't matter what I try to name it! I click on Ok and a PageMaker screen pops us stating: Can not send Post Script to Distiller. I click on Ok and it sends me back to the Export screen. Do I need to re-install Distiller or all of PageMaker or how can I fix this?
I've had this problem from time to time for four years -- finally figured out a solution.
If you take the PM doc you're trying to PDF out of the folder that it's in and put it on your desktop. Then open it and PDF, it should work. It's been the solution for me. I set the distiller to 'ebook'. that's the only other thing I play with.
I can put the PM doc *back* into the folder it came from and the distiller will fail to produce a postscript file for which it gives me an error message. Take the PM out and put onto the desktop....no problem, it PDFs right away.
Haven't gotten around to creating a new folder and trying to put it in there. Long as it works this easily, I'm fine.
John Hook
Similar Messages
-
Acrobat XI Pro Won't Convert 206 Page Word Document into PDF
Hi there
As menetioned above, Acrobat XI Pro Won't Convert my 206 Page Word Document into a PDF. The Word document was originally a PDF file that I converted to Word and it has split all the text into sections.
It sounds like converting a PDF into Word isn't the best way to edit, re-format and then save as a PDF again. I would love to hear your advice on this.
Thanks very much for your help!
FionaFirst before you recreate the PDF from the Word Document.
In word: Open Document
Next open a new Blank docment
switch back to Word click on the ¶ button
scroll to of go to very end of docment.
click just to right of the perion in the last sentence.
now go to very beginning of document
Hold down the Shift and click to the right of first letter in document.
Now choose copy.
Now switch to Blank document
Choose Paste special.
Now choose Text only.
If works all the words will be there spaced correct but with no ¶'s.
Now insert returns as desired.
Now save as a docx file under a different name.
IF you are on a Mac use the following directions:
go to File menu > Print > PDF Hold down PDF button until Context menu pops up.
Choose adobe PDF.
follow steps when the first window opens.
Save as PDF in desired location.
Now open the PDF in Acrobat. Document should be properly formatted and ready to go.
AS you've found The conversion is not seamless. Acrobat doesn't distingish between automatic end of line breaks and Returns and you have to put the pieces back again. I wish Adobe and MS would get over the jealouscy of each other and share howcode works so Thatapplications could work seamlessly together. BUt they never will. -
I used to use the free version of Adobe Reader to convert my publisher files to pdf files. When I was making a booklet for our hockey team, it said I had to buy it. Now I bought it and it won't convert the files. I am ready to throw this computer out the window!! Can you tell me what is the problem? No it does not exceed 100 M. either.
Adobe Reader never converted Publisher files to PDF, for free, never. I suspect you use to have the (paid for) Adobe Acrobat. Sometimes people have Acrobat (more than $300 worth) and install Adobe Reader over the top, losing that valuable software.
That said, if you subscribed to PDF Pack it should do this conversion. What exactly happens now. -
Adobe X PDF files converted to jpg, edited and converted back to PDF have ragged, unclear text. I didn't have this problem with Acrobat 9 standard. What is the remedy for this. If this is the best I can expect, I won't be able to use X standard.
I can't imagine any worse workflow than converting to JPEG to edit text, then back to PDF. Text in a PDF is a vector thing, smooth at all resolutions. And JPEG is made for photos. EVERY conversion to JPEG and back loses quality but how much loss there is will vary.
If you must go to an image format, try PNG. -
Adobe Acrobat 8 Pro won't convert Publisher docs to PDF
Adobe Acrobat 8 Pro won't convert Publisher docs to PDF. It converts other Microsoft docs. Any suggestions?
How are you trying to convert?
Are you using the File-Print function, and selecting the Acrobat printer? -
Paid for export PDF, worked for a while, but now tells me i only have free service so won't convert document
Hi dmkelec,
I did not find your account under the given email id.
Can you provide me the email id associated with your subscription that would be helpful.
Regards,
Florence -
What would cause this document to suddenly not convert to PDF?
To all those having trouble converting documents to pdfs, I did some research and found a work around.
Go to File and choose Save & Send. Then choose Create PDF/XPS document. Click the Create button. PDF is generated. -
Docs won't convert to .pdf
WIN XP Home; WordPerfect Office 12; Adobe Acrobat 7.0 Standard; HP Deskjet 722C - do all my doc work in WP12; have been able to convert docs to .pdf with no problems (Print, choose Adobe printer, go); today, however, for whtever reason when attempting to do such conversion from any doc in WP12, Acrobat is snitty and tells me that there is a problem with the doc(s); attempting to convert from within Acrobat results in the same. So, anyone able to tell me which gremlin(s) I need to kill to get this to work correctly again? Have already uninstalled/reinstalled Acrobat; didn't change anything. Any help much appreciated. Thanks
The log info is typically only 10 lines or so. If so, post it here as there are some folks who are pretty good at reading them. Sometimes I can catch the jist. Often the problem is a font that is not found or is not allowed for embedding. If that is the case, you can try to disable the button on the font menu of the Job Settings that causes the job to fail if the font issue comes up. The font would be wrong in the resultant PDF, but the file would be created. It might be something to check.
You really do not have to do the extra step of printing to file, but generally the log file is written in the folder where the PDF was to do if conversion fails and you can open it separately. -
When converting a document to PDF, it won't convert my landscape format !
In Microsoft, when I convert a document that's in landscape format to a PDF, it converts in portrait format. In the PDF I open print, select orientation and/or page setup, change the format but all the text does'nt change back to landscape. How do I get my original format when converting to a PDF ?
This isn't the proper forum for that. This is for the free Reader application which does not convert files to PDF.
Depending on what you actually use to convert to PDF, you may need a Microsoft forum or the Adobe Acrobat forum. -
Pre-configure save location for converting files to PDF from shell context menu
Hi all,
I like Acrobat's integration into the Windows Explorer through the shell context menu command "Convert to PDF", which allows me to drag select a number of files (word documents et cetera) to batch convert them into PDF. It beats doing batch processing fr the Acrobat interface.
However, it asks me for the save location of each file individually. I would like to have them saved in the same directory as the original file, as the default option so I won't have to attend to the conversion. I can't find such an option in Acrobat's preferences menu though
Any gurus or users here know of a way around that?
Regards,
JayDoes your user have custom add-ons besides the Acrobat PDFMaker add-on? If so, try disabling the other add-ons as a test to see if you get the same results.
Does your user have a custom template? Try moving it out and using the standard MS Word template as test?
Did your user have a previous installation of Adobe Acrobat?? If so, check the Add-ons to see if an older version is still registered with MS Word. -
i upgraded my plan to 89.00 a year so i can convert word to pdf. But it won't allow me to make changes. Do i have to pay additional?
Hi Karen Tennyson,
May I know is this happening with all files or with a specific file?
Would you send your PDF document to [email protected] as an email attachment?
I will check it from my end.Please add the link to this forum post for reference.
Regards,
Florence -
How to convert html to pdf using acrobat sdk 8.0?
hi
I am a beginner of acrobat sdk .
I want to know How to use acrobat sdk 8.0 to convert html to pdf?
herere some questions :
1:How to support navigation inside PDF file that generated using acrobat sdk 8.0? For example: theres catalog in the top of HTML file, customer hopes can navigate inside the PDF file just like navigating inside the HTML file.
2:How to support operating some controls in the PDF file that generated using acrobat sdk 8.0? For example: therere some drop down list and text box in HTML file, customer hopes can input text in the text box, click the drop down list to see available options in it just like in HTML file.
Thanks in advance for any help and suggestion.Hello,
I want a system to re-brand my 37 pages PDF for affiliates.
I want a php dynamic link in the PDF online in order to personalize automatically the PDF for each affiliate. I need to change 2 links each time. The affiliate ID and the Paypal email (payment button) in page 36.
Can you help?
Please let me know
Thank you
Alex
PS My system is online and i can give you the url if it helps. -
URGENT ----- Problem in converting spool to pdf .
Error - File cannot be opened because of no pages ......
Hi experts,
I am passing internal table contents to spool --> then spool to pdf -
> then mail sending.
Everything is fine but only error is in the receiving mail the above error is coming.
given the code...
<b>I think the error is in converting into pdf function module</b>
<b>Help me to solve this problem as it is very urgent</b>
include data_declare. " pasted down
select * from kna1 into table itab up to 50 rows.
CALL FUNCTION 'RSPO_OPEN_SPOOLREQUEST'
EXPORTING
dest = 'LP01'
immediate_print = 'X'
IMPORTING
handle = handle
SPOOLID = spoolid.
loop at itab.
concatenate itab-kunnr itab-name1 itab-land1 into text separated by
space.
CALL FUNCTION 'RSPO_WRITE_SPOOLREQUEST'
EXPORTING
handle = handle
text = text.
endloop.
CALL FUNCTION 'RSPO_CLOSE_SPOOLREQUEST'
EXPORTING
handle = handle.
Convert Spool to PDF **********************************
<b>CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = spoolid "gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
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.
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.</b>
Processing Mail Sending ************************************
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.
MOVE 'Orders Rejeced 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-009
'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'.
CLEAR gt_mail.
SELECT SINGLE * FROM zmail INTO gt_mail
WHERE grpnr = '1'.
IF NOT gt_mail-mail1 IS INITIAL.
t_receivers-receiver = gt_mail-mail1.
APPEND t_receivers.
ENDIF.
IF NOT gt_mail-mail2 IS INITIAL.
t_receivers-receiver = gt_mail-mail2.
APPEND t_receivers.
ENDIF.
IF NOT gt_mail-mail3 IS INITIAL.
t_receivers-receiver = gt_mail-mail3.
APPEND t_receivers.
ENDIF.
IF NOT gt_mail-mail4 IS INITIAL.
t_receivers-receiver = gt_mail-mail4.
APPEND t_receivers.
ENDIF.
LOOP AT gt_mail.
t_receivers-receiver = gt_mail-mailid..
APPEND t_receivers.
ENDLOOP.
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.
ENDFORM. " send_file_as_email_attachment
Data Declaration ************************************
DATA : handle LIKE sy-tabix.
data itab like kna1 occurs 0 with header line.
data: text(50) type c.
data: spoolid type TSP01-RQIDENT.
DATA : gt_listobject LIKE abaplist OCCURS 10 .
DATA : gt_objcont LIKE soli OCCURS 10 WITH HEADER LINE.
DATA : gt_objcont1 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_message LIKE soli OCCURS 10 WITH HEADER LINE,
gt_message1 LIKE soli OCCURS 10 WITH HEADER LINE.
DATA: gt_scheme LIKE ztrc_scheme OCCURS 0 WITH HEADER LINE,
gt_mail LIKE zmail_prov OCCURS 0 WITH HEADER LINE.
gt_mail LIKE zmail." 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,
days TYPE i.
<b></b><b></b><b></b>Hi Prashant,
Thanks for your reply. Really it is very useful one.
In this, the output list is getting populated into spool and to pdf.
But my requirement sending the internal table contents to spool directly without dispalying in the output list.
I did the program like the above mentioned one already. But my requirement is not that one.
Regards
chakradhar -
Converting report to PDF and mailing
Hi every one,
I've gone through various threads and i'm aware of the Functional module's used to
convert the report to pdf and mail it back.Like CONVERT_OTFSPOOLJOB_2_PDF, CONVERT_OTF_2_PDF and for mailing we have SEND_NEW_DOCUMENT_ATT_SEND_API1.
I've worked with this but my problem is i'm not able to convet the report output to pdf.When i'm doing this i'm getting the output of my functional module converted to pdf like the number of header and item records available for the given data in the selection screen.
Since all the threads i've gone through is converting the single internal table which has the output to pdf.
But i've got the REUSE_ALV_HIERSQL_LIST_DISPLAY, hierarchial report which as known has got two internal tables.How to the same to this kind of report....More over is it possible to convert report to pdf in online without transfering it to spool and getting the spool id to convert it to pdf.........
Any help or suggestions will surely be rewarded......
Thanks in Advance.....Here is the complete code for you;
It Converts spool request into PDF document and emails it.
<b>http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm</b>
Regards,
Vishal -
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
Maybe you are looking for
-
Can I get rid of the color presets?
I like to have a few presets that I can just apply to a clip and tweek as needed, but I don't want them down at the bottom of the list. Alien Lab? Are you kidding me? Can I get rid of these or is there another place to save favorites? I'd like to be
-
Hi, I hope i could find a tip here. I have a mac mini server with mountain lion and an imac with mountain lion. I have several network users created. When i loggin on the mac mini : everything is OK. Messages and facetime are working as expected. Whe
-
Can anyone help me cut a word into an image?
I believe it is called merge?? I am new to illustrator and am working on learning new tricks, I have come to a road block here. Here is a set up: I have font image with a tail connected to the font, Inside the tail i have another font that i want
-
IPhoto 08 crashing on startup since Leopard installation. Help!!
I had iPhoto 08 working with OS 10.4.11 just fine. Installed Leopard tonight -- ran all software updates. All looks good except iPhoto crashes on startup every time. It looks fine but the second I click anywhere one it (menu, event photo, bar to drag
-
Whats the best desk arm for an imac
I want to mount my iMac on a movable arm. but there are several out there. which one would be best? I also have two other 24" monitors, and would like to mount them on either side, and be adjustable. but do any of these arms seperate enough to put th