SAPScript to PDF for nonenglish characters
Hi All:
My requirement is to download some PDF files which will contain some Korean Characters.My custom program will do that from SAP Script which generate some spool.From that spool no I am using FM 'CONVERT_OTFSPOOLJOB_2_PDF' which will generate the PDF file.I have confirmed from the spool that the Korean characters are appearing properly.But when it's downloaded in PDF Korean characters are not displayed properly.Some NULL character is appearing.Any idea how to solve this one?Thanks.
~Sinchan
Hi,
While calling FM CONVERT_OTFSPOOLJOB_2_PDF, pass import parameter Country Key to SRC_SPOOLID.
i.e. SRC_SPOOLID-RQTELELAN.
I feel this should solve the problem.
Best regards,
Prashant
Similar Messages
-
Export to pdf for thai characters get blank result.
Dear expert,
I have a problem, when export Sales Order that contain thai characters to PDF in SAP B1 2007A SP01 PL08, the page converted to pdf successfully for english characters, but not for Thai character. Thai characters did not display anything, just blank.
I did refer to note 339832 , and i guess this note is for R3 system, and I think for B1 also should use the same method when export to pdf.
So, anyone have any idea to enable Thai characters to export to pdf in SAP Business One?
Thanks in advance for any help.
Reagrds
MatDear Carin,
Actually the purpose I want to export to pdf is because to attach wiith email that send direct from SAP.
My scenario here is:
- Open one Sales Order
- then click on Email icon to send email with attachment (I want to attach the SO). But, when I check the pdf before send the SO as attachment, i find out that the Thai characters missing/blank (as JimM said it is limitation in SAP for pdf function currently).
- the email sent successfully, but only the SO attachment is not correct because of Thai characters missing.
As per your suggestion, yes I can print as pdf first, then manually attach to email, but this involve too many manual steps just to send one SO via email.
Any way, thanks to all of you for reply.
JimM, thanks for the info and I will try to proceed to SAP development team for future use.
Regards
Mat -
Convert spool to pdf for Chinese characters
Hi,
I need to convert spool to pdf for chinese font.
Spool is creating successfully, and contents are displaying properly. When try to convert the spool to pdf using 'RSTXPDFT4', the pdf is generated successfully, when trying open the pdf, contents are missing, its like empy white pdf page. This is happening for the Chinese font. The same script is working fine for the English font.
Plz suggets
Thanks
BalajiHi Balaji,
I am having a similar issue with Simplified Chinese, Traditional Chinese, and Thai fonts when saving spools to PDF. Have you found any more information on why the output shows up as a blank screen?
We are printing Purchase Orders and the T&Cs are coming through fine because they are saved as picture files but the smartform does not display at all.
Any information would be appreciated!
Thanks,
Josh -
PDF conversion for chineese characters in Unicode system
I am facing a problem while converting the SAP Script Output to PDF format for Chinese characters.
I am working on ECC (5.0) Unicode system.
Scenario:
After saving a Purchase Order an E-mail is sent to the customer - attaching the
PO output in PDF format. E-mail was received successfully by the receiver, but while opening the pdf all the chinese characters were displayed in junk characters in the pdf. All the English characters are properly displayed. I tried to open the pdf file in Acrobat Reader versions 6.0, 7.0, 8.0. but no result. I used CONVERT_OTF function module for converting the OTF format to PDF format. I tried using the fonts CNSONG also.
I tried by executing the standard program RSTXPDFT4 for converting to PDF by giving the spool. In the spool it is showing the Chinese characters perfectly but in the PDF the Chinese characters were were showing as Junk.
Can you please help and advice to see the Chinese characters in PDF in Unicode systems.
Thanks in advance.>
Juraj Danko wrote:
> Hi,
> I have similar problem than you ... how have you solved it?
> thanks
> Juraj
I found a solution, but I am not sure, if it was for this problem or
output problem with for example PL in non-unicode systems.
I created the input for CONVERT_OTF with CALL FUNCTION 'PRINT_TEXT'.
PRINT_TEXT has to be called with DEVICE = 'PRINTER',
DEVICE = 'ABAP' uses internally the wrong code page.
You have also to set otf_options-tdprinter to a valid printer,
if it is empty, the default printer from user settings is used.
You can use code example from SAP note 413295.
Before you call CONVERT_OTF, you can also check entries with 'FC' in OTF input.
The font (see description of OTF format in SAP help) must be set like described in SAP note 144718.
/Tibor
Edited by: Tibor Gerke on Jan 13, 2011 10:29 AM -
[Bug Report] CR4E V2: Exported PDF displays Japanese characters incorrectly
We now plan to transport a legacy application from VB to Java with Crystal Reports for Eclipse. It is required to export report as PDF file, but result PDFs display Japanese characters incorrectly for field with some mostly used Japanese fonts (MS Gothic & Mincho).
Here is our sample Crystal Reports project: [download related resources here|http://sites.google.com/site/cr4eexportpdf/example-of-cr4e-export-pdf]
1. PDFExportSample.rpt located under ..\src contains fields with different Japanese fonts.
2. Run SampleViewerFrameClient#main(..) to open a Java Report Viewer:
a) At zoom rate 100%, everything is ok.
b) Change zoom rate to 200% or 50%, some fields in Japanese font collapse.
c) Export to PDF file,
* Fonts "MS Gothic & Mincho": both ASCII & Japanese characters failed.
* Fonts "Meiryo & HGKyokashotai": everything works well.
* Open PDF properties, you will see all fonts are embedded with built-in encoding.
* Interest to note that copy collapsed Japanese characters from Acrobat Reader, then
paste them into a Notepad window, Notepad will show the correct Japanese characters anyway.
It seems PDF export in CR4E mistaking to choose right typeface for Japanese characters
from some TTF file.
3. Open PDFExportSample.rpt in Crystal Report 2008 Designer (trial version), and export it as PDF.
The result PDF displays both ASCII & Japanese characters without any problem.
Test environment as below:
* Windows XP Professional SP3 (Japanese) with MS Office which including extra fonts (i.e. HGKyokashotai)
* Font version: MS Gothic, Mincho, Meiryo, all in Version 5.0
You can download MS Meiryo from Microsoft's Site:
http://www.microsoft.com/downloads/details.aspx?familyid=F7D758D2-46FF-4C55-92F2-69AE834AC928&displaylang=en)
* Eclipse 3.5.2
* Crystal Reports for Eclipse, V2, 12.2.207.r916
Can this problem be fixed? If yes how long will it take to release a patch?
We really looking forward to a solution before abandoning CR4E.
Thanks for any reply.I have created a [simple PDF file|http://sites.google.com/site/cr4eexportpdf/inside-the-pdf/simple.pdf?attredirects=0&d=1] exported from CR4E. It is expected to display "漢字" (or in unicode as "\u6F22\u5B57"), but instead being rendered in different ones of "殱塸" (in unicode as "\u6BB1\u5878").
Look inside into this simple PDF file (you can just open it with your favorite text editor), here is its page content:
8 0 obj
<</Filter [ /FlateDecode ] /Length 120>>
stream ... endstream
endobj
Decode this stream, we get:
/DeviceRGB cs
/DeviceRGB CS
q
1 0 0 1 0 841.7 cm
13 -13 569.2 -815.7 re W n
BT
1 0 0 1 25.75 -105.6 Tm <-- text position
0 Tr
/ttf0 10 Tf <-- apply font
0 0 0 sc
( !)Tj <-- show glyphs [20, 21], which index is to embedded TrueType font subset
ET
Q
The only embeded font subset is defined as:
9 0 obj /ttf0 endobj
10 0 obj /AAAAAA+MSGothic endobj
11 0 obj
<< /BaseFont /AAAAAA+MSGothic
/FirstChar 32
/FontDescriptor 13 0 R
/LastChar 33
/Subtype /TrueType
/ToUnicode 18 0 R <-- point to a CMap object
/Type /Font
/Widths 17 0 R >>
endobj
12 0 obj [ 0 -140 1000 859 ] endobj
13 0 obj
<< /Ascent 860
/CapHeight 1001
/Descent -141
/Flags 4
/FontBBox 12 0 R
/FontFile2 14 0 R <-- point to an embedded TrueType font subset
/FontName /AAAAAA+MSGothic
/ItalicAngle 0
/MissingWidth 1000
/StemV 0
/Type /FontDescriptor >>
endobj
The CMap object after decoded is:
18 0 obj
/CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo <<
/Registry (AAAAAB+MSGothic) /Ordering (UCS) /Supplement 0 >> def
/CMapName /AAAAAB+MSGothic def
1 begincodespacerange <20> <21> endcodespacerange
2 beginbfrange
<20> <20> <6f22> <-- "u6F22"
<21> <21> <5b57> <-- "u5B57"
endbfrange
endcmap CMapName currentdict /CMap defineresource pop end end
endobj
I can write out the embedded TrueType font subset (= "14 0 obj") to a file named "[embedded.ttc|http://sites.google.com/site/cr4eexportpdf/inside-the-pdf/embedded.ttf?attredirects=0&d=1]", which is really a tiny TrueType font file containing only the wrong typefaces for "漢" & "字". It seems everything OK except CR4E failed to choose right typefaces from the TrueType file (msgothic.ttc).
Is it any help? I am looking forward to any solution. -
Converting from SAPSCRIPT to PDF
Sir,
I am converting form from sapscript to pdf. The form is converting but the ouput font in pdf is seen in bigger size so the alignment is getting distorted. Kindly advise solution. I am in 4.6C
Thanks & RegardsHi
See the sample code and do accordingly
REPORT zzz_jaytest .
Types Declaration
TYPES : BEGIN OF ty_pa0001,
pernr TYPE pa0001-pernr,
bukrs TYPE pa0001-bukrs,
werks TYPE pa0001-werks,
END OF ty_pa0001.
Internal Table Declaration
DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details
i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data
i_content_txt TYPE soli_tab, "Content
i_content_bin TYPE solix_tab, "Content
i_objhead TYPE soli_tab,
Work Area Declaration
w_pa0001 TYPE ty_pa0001, "For pa0001 Details
w_res TYPE itcpp, "SAPscript output
"parameters
w_otf TYPE itcoo, "For OTF
w_pdf TYPE solisti1, "For PDF
w_transfer_bin TYPE sx_boolean, "Content
w_options TYPE itcpo, "SAPscript output
"interface
Variable Declaration
v_len_in TYPE so_obj_len,
v_size TYPE i.
Constants Declaration
CONSTANTS : c_x TYPE c VALUE 'X', "X
c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
c_otf TYPE sx_format VALUE 'OTF', "OTF
c_pdf TYPE sx_format VALUE 'PDF', "PDF
c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
c_bin TYPE char10 VALUE 'BIN', "BIN
c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading
"File Name
c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name
START-OF-SELECTION.
Selecting the records from pa0001
SELECT pernr bukrs werks FROM pa0001
INTO TABLE i_pa0001 UP TO 10 ROWS.
Setting the options
w_options-tdcopies = 1 ."Number of copies
w_options-tdnoprev = c_x."No print preview
w_options-tdgetotf = c_x."Return of OTF table
w_options-tddest = c_locl."Spool: Output device
Opening the form
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = c_form
device = c_printer
language = sy-langu
OPTIONS = w_options
IMPORTING
RESULT = w_res.
LOOP AT i_pa0001 INTO w_pa0001.
Writting into the form
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'MAIN'
window = 'MAIN'.
ENDLOOP.
Closing the form
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = w_res
TABLES
otfdata = i_otf
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
codepage = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Converting OTF data to single line
LOOP AT i_otf INTO w_otf.
CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
INTO w_pdf.
APPEND w_pdf TO i_content_txt.
ENDLOOP.
Converting to PDF Format
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
format_src = c_otf
format_dst = c_pdf
devtype = c_printer
CHANGING
transfer_bin = w_transfer_bin
content_txt = i_content_txt
content_bin = i_content_bin
objhead = i_objhead
len = v_len_in
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
v_size = v_len_in.
Downloading the PDF File
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_size
filename = c_name
filetype = c_bin
TABLES
data_tab = i_content_bin.
If you r using this function module check it once....
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
Fehlerhandling
if sy-subrc <> 0.
endif.
or u can use the standard program RSTXPDFT4 to download the script into PDF format onto a particular location
follow this link for sample program.
http://searchsap.techtarget.com/tip/0,289483,sid21_gci1121833,00.html
<b>Reward points for useful Answers</b>
Regards
Anji -
Why does Acrobat allocate more width for spaces than for alphanumeric characters?
When I convert a text file to PDF using Acrobat X Pro, I select a fixed-width font. However, it appears that Acrobat allocates a greater width for space characters in the text file, than it does for alphanumeric characters in the text file. How do I instruct Acrobat to use exactly the same width for all the characters, both spaces and visible characters?
This question is actually a re-write of my previous post titled, ‘Bulk Convert Text to PDF with Acrobat’. I know what the problem is now but do not how to fix it.
Here's a mock example of the content of a text file. In the resulting PDF, the H no longer lies directly under the G. I chose Courier New 8 pt for the font.
ABCDEFG ABCDEFG ABCDEFG ABCDEFG ABCDEFG ABCDEFG
H H H H H H
Any suggestion will be appreciated. Thank you.If you are comfortable with the settings in the printing, then go back to the PDF Maker settings (create PDF preferences in WORD) and adjust the preferences for similar performance, at least in the job settings and such. The rest deals with how much you want the bookmarks and such.
I am assuming that those PDF Maker preferences set in WORD are retained when you run the conversion from Acrobat that I have the impression you are doing. Other than that, check the conversion settings in Acrobat itself. They are in the preferences. If you the printer preferences are used when converting from Text (you will have to try to see what happens), it would use the default preferences of the printer, not those set in the print menu of an application. The latter only last as long as that application is open and only for that application. For your need, you may need to change them in either the printer (Start>Printers.. in windows) or Distiller, or both. The printer overrides the Distiller settings usually (another setting on this). -
Mailing the sapscript thru pdf file
Hi,
I want to send a sapscript thru pdf file, however, I have a problem with the parameters to set in my open_form when my DEVICE = 'MAIL' and I have to fetch the otf file in the close_form.
Can you help with the parameter I need to set up in the open form? What are the required parameters for this function?
Thanks a lot!
rgds,
MarkHi Mark Rennel Barrios ,
Here below is the Code for that Functionality :
REPORT ZGRESS1PRINT .
Tables: qmel,makt,qmfe.
parameters: input like QMEL-QMNUM.
data var like makt-maktx.
DATA: BEGIN OF OPTIONS OCCURS 0.
INCLUDE STRUCTURE ITCPO.
DATA: END OF OPTIONS.
DATA: VAFILESIZE(10).
DATA: VAFILENAME(100) value 'test.pdf'.
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: TAB_LINES LIKE SY-TABIX.
DATA: IOTF LIKE ITCOO OCCURS 0 WITH HEADER LINE.
DATA: ILINES1 LIKE TLINE OCCURS 0 WITH HEADER LINE.
OPTIONS-TDDEST = 'LP01'.
OPTIONS-TDIMMED = 'X'.
OPTIONS-TDNEWID = 'X'.
OPTIONS-TDNOPREV = 'X'.
OPTIONS-TDLIFETIME = 2.
OPTIONS-TDGETOTF = 'X'.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'ZGRESS1'
OPTIONS = OPTIONS
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
OTHERS = 11
IF SY-SUBRC <> 0.
Write:/ 'Error while open the form'.
ENDIF.
CALL FUNCTION 'START_FORM'
EXPORTING
FORM = 'ZGRESS1'
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC <> 0.
WRITE 'Error in start_form'.
EXIT.
ENDIF.
select * from qmel where qmnum = input.
select single maktx into (makt-maktx) from makt where matnr = qmel-matnr
and spras = 'EN'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ITEM1'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC <> 0.
WRITE 'Error in write_form printing top element of main'.
EXIT.
ENDIF.
ENDSELECT.
select * from qmfe where qmnum = input.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ITEM2'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC <> 0.
WRITE 'Error in write_form printing top element of main'.
EXIT.
ENDIF.
ENDSELECT.
CALL FUNCTION 'END_FORM'
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC <> 0.
WRITE 'Error in end_form'.
EXIT.
ENDIF.
CALL FUNCTION 'CLOSE_FORM'
TABLES
OTFDATA = IOTF
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC <> 0.
WRITE 'Error in close_form'.
EXIT.
ENDIF.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
IMPORTING
BIN_FILESIZE = VAFILESIZE
TABLES
OTF = IOTF
LINES = ILINES1
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4
IF SY-SUBRC <> 0.
ENDIF.
DOC_CHNG-OBJ_NAME = 'SAPSACRIPTMAIL'.
DOC_CHNG-OBJ_DESCR = 'SAP_SACRIPT_MAIL.'.
OBJTXT-LINE = 'This is a TestMail for Greetson'.
APPEND OBJTXT.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
CALL FUNCTION 'QCE1_CONVERT'
TABLES
T_SOURCE_TAB = ILINES1
T_TARGET_TAB = OBJBIN
EXCEPTIONS
CONVERT_NOT_POSSIBLE = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
ENDIF.
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 1.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'PDF'.
OBJPACK-OBJ_NAME = 'test'.
OBJPACK-OBJ_DESCR = VAFILENAME.
OBJPACK-DOC_SIZE = TAB_LINES * 255.
APPEND OBJPACK.
OBJHEAD = 'test.PDF'.
APPEND OBJHEAD.
CLEAR OBJHEAD.
VAFILENAME = 'Greetson'.
Creating the recipient list(ERS).
RECLIST-RECEIVER = '<e-mail address>'.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
IF SY-SUBRC <> 0.
ENDIF.
REFRESH RECLIST.
Hope it helps.
Thanks,
Greetson -
Sapscript 2 PDF conversion :when converted doesnt show printpreview
Dear all
Sapscript 2 PDF conversion :
I hav used OTF under table parameter in Close_form & now it doesnt show print preview(getting values OTF ) . Why ?
How 2 get both print preview and PDF ?
Thnx
moniHello,
This may help you:
itcpo-tdnoprint = ' '. "For Print option
itcpo-tdgetotf = 'X'. "to Get OTF
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
dialog = 'X' " for the Print dialog
form = <formname>
language = 'E'
options = itcpo
IMPORTING
result = itcpp
EXCEPTIONS
canceled = 1
device = 2
form = 3
options = 4
unclosed = 5
mail_options = 6
archive_error = 7
invalid_fax_number = 8
more_params_needed_in_batch = 9
spool_error = 10.
Regds, Murugesh AS -
I need to convert a few QM custom sapscript into PDF.
I need to accomplish this and make the usability easier for the users
I know we can do these 2 things
1. I know we can use the standard sap program RSTXPDFT4 to convert the spool to PDF.
2. Change the Print Program "Open Form" FM to get the OTF and converting the OTF to PDF.
If I take the "changing the print program" route, i need to change all print programs. Which will be more effort.
So i want to build a custom program, which take the inspection lot and file location as input, the program needs to generate the output programatically, get the spool, and run the program RSTXPDFT4.
I need to figure out 1. how to issue the output from a program 2. how to get the spool number.
Any help appreciated.
Thanks,
Gopi.Hi Gopi,
Please go through this program,this is for smartform but you can use this in your script driver program.
*& Report YMSL_ORDER_ACCEPTANCE
REPORT YMSL_ORDER_ACCEPTANCE.
*********Variable Declarations *****************************
DATA: GV_FORM_NAME TYPE RS38L_FNAM, " Used to store the function module generated by Smartform
GV_BIN_FILESIZE TYPE I, " Store the file size
GV_POS TYPE I,
GV_LEN TYPE I,
GV_TAB_LINES TYPE I,
gv_desc_lines type i.
********Constants *******************************************
DATA : GC_TEXT(11) TYPE C VALUE 'Form Output',
GC_TST(3) TYPE C VALUE 'TST',
GC_TESTING(20) TYPE C VALUE 'Order Acceptance'.
*********Work Area Declarations *****************************
DATA: GS_DOCDATA TYPE SODOCCHGI1, " Data of an object which can be changed
GS_CTRLOP TYPE SSFCTRLOP, " Smart Forms: Control structure
GS_OUTOPT TYPE SSFCOMPOP, " SAP Smart Forms: Smart Composer (transfer) options
GS_OTFDATA TYPE SSFCRESCL, " Smart Forms: Return value at end of form printing
GS_RECLIST TYPE SOMLRECI1, " SAPoffice: Structure of the API Recipient List
GS_PDF_TAB TYPE TLINE, " Workarea for SAP Script Text Lines
GS_OBJBIN TYPE SOLISTI1, " SAPoffice: Single List with Column Length 255
GS_OBJPACK TYPE SOPCKLSTI1. " SAPoffice: Description of Imported Object Components
DATA : w_doc_chng typE sodocchgi1.
*********Internal tables Declarations *****************************
DATA : I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
DATA: GT_RECLIST TYPE TABLE OF SOMLRECI1, " SAPoffice: Structure of the API Recipient List
GT_PDF_TAB TYPE TABLE OF TLINE, " SAPscript: Text Lines
GT_OTF TYPE TABLE OF ITCOO, " OTF Structure
GT_OBJBIN TYPE TABLE OF SOLISTI1, " SAPoffice: Single List with Column Length 255
GT_OBJPACK TYPE TABLE OF SOPCKLSTI1. " SAPoffice: Description of Imported Object Components
DATA : BEGIN OF IT_ADR6 OCCURS 0,
SMTP_ADDR TYPE ADR6-SMTP_ADDR,
END OF IT_ADR6.
DATA : W_FILE_NAME TYPE STRING,
W_FILE_PATH TYPE STRING,
W_FULL_PATH TYPE STRING.
CLEAR : GV_FORM_NAME,
GS_CTRLOP,
GS_OUTOPT,
GS_OTFDATA,
GV_BIN_FILESIZE,
GV_POS,
GV_LEN,
GV_TAB_LINES.
SELECTION-SCREEN: BEGIN OF SCREEN 1001 AS WINDOW TITLE scr_ttl .
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TXT_B1 NO INTERVALS.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(15) TX_VBELN.
PARAMETER : P_VBELN TYPE VBAK-VBELN .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
*SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TXT_B2 .
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: R_OUT RADIOBUTTON GROUP R1 DEFAULT 'X' USER-COMMAND RAD11 .
SELECTION-SCREEN COMMENT 5(20) TXT_OUT. " roles by t-code
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER R_PDF RADIOBUTTON GROUP R1 .
SELECTION-SCREEN COMMENT 5(20) TXT_PDF.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER R_MAIL RADIOBUTTON GROUP R1 .
SELECTION-SCREEN COMMENT 5(15) TXT_MAIL.
*SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(7) TXT_MAL1.
PARAMETER : P_MAIL TYPE ADR6-SMTP_ADDR MODIF ID M1.
SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN: END OF SCREEN 1001 .
CALL SELECTION-SCREEN 1001 STARTING AT 20 5 ENDING AT 105 10.
*SET PF-STATUS 'STATUS'.
INITIALIZATION.
TX_VBELN = 'Order'.
TXT_B1 = 'Selection Criteria '.
TXT_B2 = 'Output Criteria '.
scr_ttl = 'Order Acceptance'.
TXT_OUT = 'Print Output'.
TXT_PDF = 'Save To PDF'.
TXT_MAIL = 'Mail the Output'.
TXT_MAL1 = 'E-mail'.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF R_MAIL <> 'X'.
IF SCREEN-GROUP1 = 'M1'.
SCREEN-INVISIBLE = 1.
SCREEN-INPUT = 0. " Disable for input.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MAIL.
PERFORM TABLE_HELP.
START-OF-SELECTION..
IF P_VBELN IS NOT INITIAL.
PERFORM GET_SF.
IF R_PDF = 'X' .
PERFORM CONVERT_OTF.
PERFORM SAVE_DIALOG.
PERFORM DOWNLOAD.
ELSEIF R_MAIL = 'X'.
IF P_MAIL IS NOT INITIAL.
PERFORM CONVERT_OTF.
PERFORM SEND_MAIL.
ELSE.
MESSAGE 'Please Enter Email Address' TYPE 'S'.
CALL TRANSACTION 'YMSL20'.
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
ELSE.
MESSAGE 'Please Enter Order No' TYPE 'S'.
CALL TRANSACTION 'YMSL20'.
LEAVE LIST-PROCESSING.
*ENDIF.
END-OF-SELECTION.
*& Form TABLE_HELP
FORM TABLE_HELP .
IF R_MAIL = 'X'.
SELECT SMTP_ADDR FROM ADR6 INTO TABLE IT_ADR6.
SORT IT_ADR6.
DELETE ADJACENT DUPLICATES FROM IT_ADR6 COMPARING ALL FIELDS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'IT_ADR6-SMTP_ADDR'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'EMAIL'
STEPL = 0
WINDOW_TITLE = 'SELECT MAIL ADDRESS'
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_ADR6
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 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.
ENDIF.
ENDFORM. " TABLE_HELP
*& Form GET_SF
FORM GET_SF .
*u2022 Generate Function Module name
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Z_CHK'
IMPORTING
FM_NAME = GV_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.
*u2022 Assigning values to Form Control Structure and Form Composer
IF R_OUT <> 'X'.
GS_CTRLOP-GETOTF = 'X'.
GS_CTRLOP-NO_DIALOG = 'X'.
GS_OUTOPT-TDNOPREV = 'X'.
ENDIF.
*/1BCDWB/SF00000368
CALL FUNCTION GV_FORM_NAME "'/1BCDWB/SF00000368'
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 = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = GS_OTFDATA
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.
CALL FUNCTION GV_FORM_NAME
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 = 'X'
TEMP_VBELN = P_VBELN
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = GS_OTFDATA
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.
ENDFORM. " GET_SF
*& Form CONVERT_OTF
FORM CONVERT_OTF .
*u2022 Assigning the OTFDATA to OTF Structure table
CLEAR GT_OTF.
GT_OTF[] = GS_OTFDATA-OTFDATA[].
*u2022 Convert the OTF DATA to SAP Script Text lines
CLEAR GT_PDF_TAB.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = GV_BIN_FILESIZE
BIN_FILE =
TABLES
OTF = GT_OTF
LINES = GT_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.
*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.
ENDFORM. " CONVERT_OTF
*& Form SAVE_DIALOG
FORM SAVE_DIALOG .
To display File SAVE dialog window
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE = 'Download to PDF '
DEFAULT_EXTENSION = '(*.PDF)'
DEFAULT_FILE_NAME = 'file.pdf'
FILE_FILTER = 'PDF Format(*.PDF)'
INITIAL_DIRECTORY = 'C:\Documents and Settings\Administrator\Desktop'
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.
ENDFORM. " SAVE_DIALOG
*& Form DOWNLOAD
FORM DOWNLOAD .
Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = GV_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 = GT_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.
ENDFORM. " DOWNLOAD
*& Form SEND_MAIL
FORM SEND_MAIL .
***changes by rajan
*DATA : v_first TYPE USER_ADDR-NAME_FIRST,
V_LAST TYPE USER_ADDR-NAME_LAST.
DATA : detail TYPE STRING.
*SELECT SINGLE NAME_FIRST NAME_LAST FROM
USER_ADDR INTO (V_FIRST,V_LAST)
WHERE BNAME = syst-UNAME.
CONCATENATE v_first V_LAST INTO detail SEPARATED BY space.
data : v_po_no TYPE vbkd-bstkd,
v_po_date TYPE vbkd-bstdk.
data : day TYPE STRING,
month type STRING,
year TYPE STRING.
data : date TYPE STRING.
SELECT SINGLE BSTKD BSTDK
FROM VBKD
INTO (v_po_no,v_po_date)
WHERE VBELN = P_VBELN.
day = v_po_date+6(2).
month = v_po_date+4(2).
year = v_po_date+0(4).
CONCATENATE day '/' month '/' year INTO date.
CONCATENATE 'Please Find attached Order Acceptance against your P.O.No.' v_po_no 'dated' date '.' INTO detail SEPARATED BY space.
**u2022 Assigning the Description of the object sent in the mail
CLEAR GS_DOCDATA.
GS_DOCDATA-OBJ_NAME = GC_TST.
GS_DOCDATA-OBJ_DESCR = GC_TESTING.
*u2022 Assigning the email id to Structure of the API Recipient List table
CLEAR : GT_RECLIST, GS_RECLIST.
GS_RECLIST-RECEIVER = P_MAIL. "
GS_RECLIST-REC_TYPE = 'U'."'G' ."'O'. "'B'. "'U'.
APPEND GS_RECLIST TO GT_RECLIST.
mail body rajan
I_OBJTXT = 'Dear Sir/Madam.'.
APPEND I_OBJTXT.
I_OBJTXT = detail.
APPEND I_OBJTXT.
I_OBJTXT = ''.
APPEND I_OBJTXT.
I_OBJTXT = 'Thanks.'.
APPEND I_OBJTXT.
I_OBJTXT = 'Best Regards,'.
APPEND I_OBJTXT.
I_OBJTXT = 'For Bilcare Ltd.'.
APPEND I_OBJTXT.
DESCRIBE TABLE i_objtxt LINES gv_desc_lines.
*DESCRIBE TABLE i_objtxt LINES v_lines_txt.
CLEAR I_OBJTXT.
READ TABLE I_OBJTXT INDEX gv_desc_lines.
if sy-subrc = 0.
Document information.
GS_DOCDATA-obj_name = 'ord_accept'.
GS_DOCDATA-expiry_dat = sy-datum + 10.
GS_DOCDATA-obj_descr = 'Order Acceptance'.
GS_DOCDATA-sensitivty = 'F'. "Functional object
GS_DOCDATA-doc_size = gv_desc_lines * 255.
CLEAR Gs_OBJPACK-transf_bin.
Start line of object header in transport packet
GS_OBJPACK-TRANSF_BIN = 'X'.
GS_OBJPACK-doc_size = gv_desc_lines * 255.
GS_OBJPACK-HEAD_START = 1.
GS_OBJPACK-HEAD_NUM = 0.
GS_OBJPACK-BODY_START = 1.
GS_OBJPACK-BODY_NUM = gv_desc_lines.
GS_OBJPACK-DOC_TYPE = 'RAW'.
GS_OBJPACK-OBJ_NAME = 'ORDER_ACCEPTANCE'.
GS_OBJPACK-OBJ_DESCR = 'ORDER_ACCEPTANCE.PDF'.
APPEND GS_OBJPACK TO GT_OBJPACK.
GS_OBJPACK-HEAD_START = 1.
GS_OBJPACK-HEAD_NUM = 0.
GS_OBJPACK-BODY_START = 1.
GS_OBJPACK-doc_type = 'RAW'.
*APPEND GS_OBJPACK TO GT_OBJPACK.
ENDIF.
*u2022 Passing the SAP Script text lines to SAPoffice: Single List with Column Length 255 table
CLEAR : GS_OBJBIN, GS_PDF_TAB.
LOOP AT GT_PDF_TAB INTO GS_PDF_TAB.
GV_POS = 255 - GV_LEN.
IF GV_POS > 134. "length of pdf_table
GV_POS = 134.
ENDIF.
GS_OBJBIN+GV_LEN = GS_PDF_TAB(GV_POS).
GV_LEN = GV_LEN + GV_POS.
IF GV_LEN = 255. "length of out (contents_bin)
APPEND GS_OBJBIN TO GT_OBJBIN.
CLEAR: GS_OBJBIN, GV_LEN.
IF GV_POS < 134.
GS_OBJBIN = GS_PDF_TAB+GV_POS.
GV_LEN = 134 - GV_POS.
ENDIF.
ENDIF.
ENDLOOP.
IF GV_LEN > 0.
APPEND GS_OBJBIN TO GT_OBJBIN.
ENDIF.
*u2022 Filling the details in SAPoffice: Description of Imported Object Components table
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 = 'ORDER_ACCEPTANCE'.
GS_OBJPACK-OBJ_DESCR = 'Order Acceptance'.
APPEND GS_OBJPACK TO GT_OBJPACK.
ENDIF.
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 = I_OBJTXT
CONTENTS_BIN = GT_OBJBIN
CONTENTS_TXT = I_OBJTXT
CONTENTS_HEX =
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'.
MESSAGE 'Sent Successfully' TYPE 'I'.
CALL TRANSACTION 'YMSL20'.
LEAVE LIST-PROCESSING.
ENDIF.
SUBMIT RSCONN01
WITH MODE EQ 'INT'
AND RETURN.
ENDFORM. " SEND_MAIL
Thanks
Ankur Sharma -
Is there a way to create separate PDFs for each layer in Indesign?
I have a multi-layered InDesign file, and I would like to generate a PDF for each of the layers. I was able to create a LAYERED PDF file (one PDF page with layers), which is great, but I also need a multi-page PDF...one PDF page per layer.
Is there a way to do this? Do I need a script? Or is there a way to extract the separate layers from the layered PDF?
Any help would be much appreciated. Thank you.Check this script:
http://indesignsecrets.com/page-exporter-utility-peu-5-script-updated-for-cs3.php
Hope that helps.
Marijan (tomaxxi)
http://tomaxxi.com -
The order of topics in the Project Manager is not reflected when creating a PDF for review.
Can't seem to find an answer to this in the forums...
Using RH10.
In the Project Manager pod is a default 'Project Files' folder.
Within that I have a 'Topics' folder in which my topic files reside.
Under the View menu, I have selected 'By Topic Title'. I understand that this displays the topics by their title as opposed to their file name. I understand that this is a display toggle only, and has no relation to the order of the topics - the alternative toggle is 'By File Name'.
Notice in the image below, my topics are displayed by topic title, but aren't in alphabetical order. ...yet.
There's a button at the top of this window for changing the sort order to 'Sort by Name', which has the result below.
Ok, so now the topics are displayed by topic title, and in alphabetical order.
Question 1: If that button toggles the view to display topics in 'alphabetical order', what on earth is the other order called? It's certainly not in order of file name, as I've checked a bunch of the topic filenames, and can't see any pattern/order to the this structure.
Question 2: When I go to create a PDF for review (via Review > Create PDF for Review), the window that appears displays all the topics available to me to select for review. However, they're displayed in this other 'odd' sort order instead of 'alphabetical' order. The Help menu says that this window reflects the order of topics as it finds them in the Project Manager. However, what seems to be actually happening is it's displaying the topics based on the view you have selected under the View menu (i.e. either 'View by Topic Title' or 'View by File Name'), and regardless of which view toggle you have selected, the order of the topics is only ever this 'odd' sort order. In other words, in the 'Create PDF for Review' window, it appears I can never see the topic list in alphabetical order. Furthermore, it appears that the only way I can resolve this is to go back into the Project Manager, switch to 'odd' sort order, and manually drag all the topics into alphabetical order. ...I have hundreds of topics.
Is there some way I can quickly change this 'odd' sort order to 'alphabetical'? There must be some underlying file with this order of topics in it (hopefully).Hi there
I don't have an immediate answer for Question 2, but for Question 1, the topic order is "User Defined" as you are able to click and drag topics to create any arrangement that suits you. This was something added as a result of user feedback. Enough users asked Adobe to allow them to arrange topics this way that they made it a reality. The logic escapes me as I'm a user that normally expects software to list things in either ascending or descending alphabetical order.
Perhaps Peter will pop in with a nice explanation of the PDF for Review sorting and Adobe's logic behind it.
Cheers... Rick -
EPay 8.9 vs 9.0 Payroll for NA - PDFs for Payslips & W2s
We are on HCM 8.9 & want to implement the ePay but with the PDF files for payslips and W2s which is not included in ver 8.9 but is in 9.0. Is there a way to either just upgrade ePay to 9.0 without an entire HCM upgrade or a way to implement the PDFs for payslips included with Global Payroll but not with Payroll for NA. Additionally, we would like to have the W2s PDFs available to the employees. Any suggestions or guidance is most appreciated.
The steps in this Adobe TechNote may help:
http://kb2.adobe.com/cps/332/332838.html
Also, look over -
http://kb2.adobe.com/cps/333/333223.html
This page identifies Adobe Reader/Acrobat version interoperability.
Where the Version interoperability table shows "Allowed" a user is good-to-go.
Other combinations are problematic.
Specifically, your co-worker's install of Acrobat 8 / Adobe Reader 9 *will* result in one &/or the other not always exhibiting "design behavior".
If the individual needs Standard/Pro (Acrobat 8) then their box needs Adobe Reader 8, not 9.
jmo - but, if features of Acrobat 9 (Portfolios, etc) are used the user would benefit from a step up from Acrobat 8 to Acrobat 9.
Be well... -
I have created some forms for our congregation to fill in with answers on adobe forms central. When I go to turn it into a PDF for printing for a hard copy, (not all our members have internet) when i save it to a PDF, it doesn't save all the pages and formats it differently then show on the screen i programmed it onto. How do I fix this issue?
Hi;
In the "Feature Tutorials/Help" linked from the top of the main page of the Forums: Feature Tutorials / Help
There is a Tutorial on "Creating and distributing fillable PDF Forms": Tutorial: Creating and distributing fillable PDF forms
The main thing to look at is the "View" setting and for PDF set it to "Page View", the page breaks you define in Page View will be used in the PDF, there are also "implicit" page breaks added automatically based on the page size.
For the issue with clip art see this FAQ: Image does not show up in PDF
Thanks,
Josh -
Errors in Export to PDF for web use - some images are lost when PDF is enlarged & in browser
I have a multi-page PDF in InDesign CS6 that I want to export to view on the web. I need the file to stay under 2MB, and I need it to be crisp and nice enough to read the type on the page (as small as 9pt type).
The errors that are occurring are the following:
On some browsers, some images will entirely not show up. Some of the missing images have been pasted into the document, some placed. I cannot think of a correlation.
When the PDF is enlarged (Adobe Acrobat X 10.1.10) to more than ~200%, there is one placed image that will mostly disappear. What I mean by "mostly" is that little bits of it are still visible, like I masked it carelessly or something. Since this is only occurring with one image it seems that it would be a problem with the image itself, yes? I'm all ears if I'm making a mistake. It is a placed .ai file with no link errors. Should I not be placing directly from illustrator? It renders wonderfully from 100% all the way up to 188%, and then if you enlarge by margins of 1% little bits of it disappear, almost a chunk at a time.
The way I've been exporting is:
File > Export > Adobe PDF (Print)
Adobe PDF Preset: Smallest File Size
Standard: None
Compatinility: Acrobat 6 (PDF 1.5)
Options: Optimize for Fast Web View
Export Layers: Visible & Printable Layers
Compression
I always change the downsampling from [100/150] to [150/225]. I usually leave the JPG image quality low. I leave both bottom boxes checked (compress text and line art, crop image data to frames)
Output
Color Conversion: convert to destination
Destination: sRGB 1EC61966-2.1
Profile Inclusion Policy: Include Destination Profile
However, after reading a few other forum questions I started trying to export as Acrobat 4 so that it would flatten. When I do that, problem #2 still persists although I didn't test problem #1. I haven't tried using Distiller, and using the "prepare for web publishing" action within Acrobat itself makes the PDF too artifacted.
At the heart of my question is this: I am a young designer at an old company that is not necessarily keeping up with the times. I REALLY want to know what the best, most efficient way to export a pdf for web viewing is. Does this exist in InDesign, outside of InDesign? Does it exist at all? Tell me what I'm doing wrong so that I can get better!
Thank you in advance.Show Large Images is a preference inside of Acrobat which might be disabled.
Acrobat - File > Preferences
Maybe you are looking for
-
Hi guys, I bought a Ipad, Iphone and an Imac all at once, learning it is a bit overwhelming. so in practicing my husband removed what he thought were defunct accounts that apple had automatically on the phone. When he did so all the contacts from m
-
Change image from 300 to 72 dpi with Photoshop elements 13?
Want to buy an image for a Kindle cover which is only available in the size required by Kindle as a 300 dpi image.Can I change It to 72 dpi with my Photoshop elements 13?
-
I am going nuts trying to get a graphic signature which includes the company's logo to work. I have used .jpg, .gif, .tif and in all cases it is received as an attached graphic in a Windows computer. In fact, it always arrives as a .tif attachment re
-
Firefox Sync Unknown Error?
Over the last few weeks of having to reinstall my OS, I've had major problems getting Firefox Sync to do its thing and synchronise a couple of years worth of data. After a few minutes, I am receiving the following error at the bottom of the page: "Sy
-
Chapters work in "Simulate" mode, but not on disk
Hello, I have a project in DVDSP 4.1.2 which was created by someone else, then abandoned at the last minute. Some of the files were missing, so I had to recreate the main movie by re-exporting it from Final Cut Pro to Compressor, then relink it witho