Problem when transform a smartform to pdf
Hi all:
When I run the program to dispaly pdf transformed from smartform,
the IE explorer is busy dead, have you ever met the same problem?
thank you very much
Interesting!
the article would appear to be wrong!
You don't need to call this FM at all - indeed - as it is only called with exporting parameters it is not going to change your form at all!
in the code:
lt_otfdata[] = lv_ssf_output-otfdata[].
call function 'SSFCOMP_PDF_PREVIEW'
exporting
i_otf = lt_otfdata
exceptions
convert_otf_to_pdf_error = 1
cntl_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.
data: l_dummy type standard table of tline,
pdf_data type xstring,
pdf_size type i.
remove the section:
call function 'SSFCOMP_PDF_PREVIEW'
exporting
i_otf = lt_otfdata
exceptions
convert_otf_to_pdf_error = 1
cntl_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.
hopefully you can now generate your PDF.
Let us know if you have any further problems.
Chris
Similar Messages
-
Formatting problem when transform to PDF
Hi all,
I've found a problem with program RSTXPDFT4 and functions CONVERT_ABAPSPOOL ... and CONVERT_OTFSPOOL...
I want to convert to PDF the spool generated by a report using "classic" list programming (write and so on).
Output format is x_65_132, which is ok while I'm in SAPGUI, but when transforming it with report RSTXPDFT4, I get a PDF file in a x_65_80 (I think) format, so I'm having half of my list cut.
I've searched for notes and forums, and I found nothing about this.
Any Ideas? Is this a limitation of these FM's? Is there any other way of converting a list spool into PDF?
Thanks in advance,
RafaHi all,
yesterday I went home and I tried the same in the MIniWas I have installed in my laptop, and the result was exactly the same!!
The test I made was: run a program in online mode, generate a spool request, and then use standard program RSTXPDFT4 to convert this request into a PDF file.
The report is defined as 65 x 132 (which should be landscape), but the PDF file appears in portrait (65 x 80 I presume).
I think the problem is in the funcions CONVERTxxx_SPOOLJOBxxx.
Did anybody have this problem? Should I think that it's not possible to convert list output spools to PDF???
Here is the code I used at home in the report.
REPORT z_test_list NO STANDARD PAGE HEADING
LINE-SIZE 132
LINE-COUNT 65
MESSAGE-ID zzrn_msj.
* tablas **********************************************************************
TABLES: usr01.
* variables globales **********************************************************************
DATA: aux_usr TYPE bapibname-bapibname,
wa_address TYPE bapiaddr3 ,
it_profiles TYPE TABLE OF bapiprof,
wa_profiles TYPE bapiprof,
it_groups TYPE TABLE OF bapiagr,
wa_groups TYPE bapiagr,
it_return TYPE TABLE OF bapiret2,
wa_return TYPE bapiret2,
resto TYPE i.
* pantalla de selección **********************************************************************
SELECT-OPTIONS: so_usr FOR usr01-bname.
TOP-OF-PAGE.
FORMAT COLOR COL_HEADING.
WRITE: /01 'LISTADO DE CARACTERISTICAS DE USUARIOS DEL SISTEMA ', SY-SYSID.
ULINE.
FORMAT COLOR COL_TOTAL.
WRITE: /01 'Fecha del listado:', sy-datum, ' -- ', sy-uzeit.
ULINE.
SKIP 1.
START-OF-SELECTION.
SELECT bname
INTO aux_usr
FROM usr01
WHERE bname IN so_usr.
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
username = aux_usr
* CACHE_RESULTS = 'X'
IMPORTING
* LOGONDATA =
* DEFAULTS =
address = wa_address
* COMPANY =
* SNC =
* REF_USER =
* ALIAS =
* UCLASS =
* LASTMODIFIED =
* ISLOCKED =
TABLES
* PARAMETER =
profiles = it_profiles
activitygroups = it_groups
return = it_return
* ADDTEL =
* ADDFAX =
* ADDTTX =
* ADDTLX =
* ADDSMTP =
* ADDRML =
* ADDX400 =
* ADDRFC =
* ADDPRT =
* ADDSSF =
* ADDURI =
* ADDPAG =
* ADDCOMREM =
* PARAMETER1 =
* GROUPS =
* UCLASSSYS =
* EXTIDHEAD =
* EXTIDPART =
* SYSTEMS =
LOOP AT it_return INTO wa_return WHERE type EQ 'E'.
resto = sy-tabix MOD 2.
IF resto = 0.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
ELSE.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
ENDIF.
WRITE: /01 'ERROR' COLOR COL_NEGATIVE, wa_return-message.
ENDLOOP.
CHECK sy-subrc NE 0.
WRITE: /01 'DATOS DEL USUARIO' COLOR COL_GROUP INTENSIFIED ON.
ULINE.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
WRITE: /01 sy-vline, space, aux_usr(10), space, sy-vline, space, wa_address-fullname(50), space, sy-vline, space, wa_address-e_mail(50), space, sy-vline.
ULINE.
FORMAT COLOR COL_NORMAL RESET.
SKIP 1.
WRITE: /01 'PERFILES ASIGNADOS' COLOR COL_GROUP INTENSIFIED ON.
WRITE: /01(87) sy-uline.
LOOP AT it_profiles INTO wa_profiles.
resto = sy-tabix MOD 2.
IF resto = 0.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
ELSE.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
ENDIF.
WRITE: /01 sy-vline, space, wa_profiles-bapiprof, space, sy-vline, space, wa_profiles-bapiptext, space, sy-vline.
ENDLOOP.
WRITE: /01(87) sy-uline.
FORMAT COLOR COL_NORMAL RESET.
SKIP 1.
WRITE: /01 'ROLES ASIGNADOS' COLOR COL_GROUP INTENSIFIED ON.
WRITE: /01(125) sy-uline.
LOOP AT it_groups INTO wa_groups.
resto = sy-tabix MOD 2.
IF resto = 0.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
ELSE.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
ENDIF.
WRITE: /01 sy-vline, space, wa_groups-agr_name, space, sy-vline, space, wa_groups-agr_text, space, sy-vline.
ENDLOOP.
WRITE: /01(125) sy-uline.
NEW-PAGE.
ENDSELECT. -
Problem to convert a Smartform a PDF
Hello everybody,
I revised the forum and found several solutions to this. But I have the following problem: when execute the functions that transforms Smartforms to PDF in R3 this generates BinField good. But when I run the model from WebDynpro and attempted access to the field BinFile (returns for model) I get this error:
java.lang.ArrayIndexOutOfBoundsException: -1
It's as if the data is not in the field, as if the function dont get it. But when I run into R3 works fine.
I'm doing next to initialize the model structure:
Zbapi_Wty_Print_Claim_Input BapiWtyPrintClaim =
new Zbapi_Wty_Print_Claim_Input();
wdContext.nodeZbapi_Wty_Print_Claim_Input().bind(BapiWtyPrintClaim);
Someone knows how to solve this?Hello everybody,
I revised the forum and found several solutions to this. But I have the following problem: when execute the functions that transforms Smartforms to PDF in R3 this generates BinField good. But when I run the model from WebDynpro and attempted access to the field BinFile (returns for model) I get this error:
java.lang.ArrayIndexOutOfBoundsException: -1
It's as if the data is not in the field, as if the function dont get it. But when I run into R3 works fine.
I'm doing next to initialize the model structure:
Zbapi_Wty_Print_Claim_Input BapiWtyPrintClaim =
new Zbapi_Wty_Print_Claim_Input();
wdContext.nodeZbapi_Wty_Print_Claim_Input().bind(BapiWtyPrintClaim);
Someone knows how to solve this? -
Problems when i copy text from Pdf and paste on Word
In Pdf documente the text is in perfect conditions, but, when i copy the text and paste in WORD document the character change into random crazy character like: "()*"*&!(!*"(!"(!)"( )*"()!*("!&("@*")(!*@"!*@(
how i fix this??I have the same problem when copying the PDF into a Word file. I tried Save as RTF doc. and it is still just symbols.
It could be a font problem, because it has some weird Gill Sans and Futura fonts. I am sending a picture as an example.
The option of exporting as Tiff and then applying OCR is interesting but still is kind of slow when i have a 100 pages document. If the fonts is the problem is there any way i could select the whole text and apply it a known font like Arial?
Thanks for any info!
Cheers,
Sebastian -
Link problem when converting MS Word to PDF with Acrobat Professional
Hello all,
I have the following problem:
When I have a MS Word document with links to other files inside and I convert it to PDF the links are converted from relative paths to absolute paths.
The problem is created by Acrobat as the links in the MS Word file are relative (I have checked this by moving the different docs to another directory and confirmed that the links still work after the move).
How can I make the paths in the PDF relative again? I know there is a plugin from Evermap (and I can confirm this works) but I do not want to use this plugin (=read: spend another $190 dollars) as the license for the Acrobat Professional is expensive enough . Is there a way I can convert the paths within Adobe Acrobat easily? Or better: can I adjust the settings in Acrobat to a new standard when all converted documents contain relative paths?
Backgroundinfo:
- Adobe Acrobat 8 Professional
- Windows XP (SP2)
- MS Word 2002
Thanks in advance!
BartDear Steve,
I have tried what u suggested: I put all the documents (word + linked documents) into the same folder on the local-drive (C). Then I recreated the links in the word document to be sure they were matching. After that I converted the word document to an PDF and confirmed the links were still working in the PDF document.
Then the biggest challenge: copying the pdf and linked documents to another drive&directory. As you can guess: Unfortunately the links did not work anymore.
Any other suggestions?
If I use the Evermap-tool (30 day-trial) I can look at the links and this is how it is 'coded' in the pdf.
first link: ../../../../test/link_a.pdf
second link: ../../../../test/link_b.pdf
and yes this will work if you put the documents in the directory test in the root of the local-drive but not in a different subdirectory.
Anyone ideas?
Grtz,
Bart -
Problem during output of smartform in PDF
Hi All,
I am using Function module for output of smartform in PDF Format.But it is giving following informatio -OTF end command // missing in OTF data.
and then no data in pdf format.
Could you please help me whar shoul I do for that?
MY code is like that :
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.Search the error in the first call to smartforms. ([Function documentation Checking and Testing a Smart Form|http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/83fb5bdf8f11d3969700a0c930660b/frameset.htm])
Regards,
Raymond -
White border problem when zooming with SWF in PDF
Hi Everyone,
I have posted my original querry in the Indesign forum:
http://forums.adobe.com/message/5176893#5176893
I'm having problems with zooming whedn trying to create a PDF with SWF inserted.. at certain levels of zoom I get a white border on the left and right of the document which squashes the content into the middle and makes it a little pixelated. I also get a thin white border on the right when zooming out. Does anyone have any ideas where I might be going wrong?
Thanks,
EmNot wishing to be rude, but that workflow is not supposed to be used that way.
InDesign's ability to export SWFs is intended for showing the file in a Web page, and Acrobat's ability to embed SWFs is only intended for small annotations placed within the pages of a conventional PDF file. By placing the entire Layout as a SWF you are in effect playing the entire thing as a movie in Flash Player - all the advantages of the PDF format are completely lost, there is no vector-rendering of any content or text, and users will find it very hard to understand what's going on (the navigation buttons in Acrobat or Reader will not work, text is not searchable or accessible, multiple pages cannot be printed, etc.).
It's not entirely trivial to do this 'correctly', as at the moment we don't have full support in the PDF standard for all the interactive features that InDesign can apply to page objects - that's why they are grouped into PDF and non-PDF in the various selection menus in InDesign. Rather than saving as a SWF you should be using Export to Interactive PDF, and ensuring that the various interactive items and media are all selected on the export dialog.
Basic stuff such as links and video will export just fine that way, and the PDF will preserve everything else in the Layout as native text or graphics so it'll look fine, navigate properly and be searchable. Animations and buttons will not work as expected, so you may have to revise their behavior if PDF is your intended output destination. -
Problem With Converting PO Smartform into PDF
Hi All,
I am trying to email the Smartform PO. I developed the program after reading several discuusions and blogs in forum. The PO is successfully created in PDF format and stored in the local directory. When i tried to view the pdf the PO is creatd twice in the PDF. I mean the original pdf is of 3 pages with PO and terms and conditons. But in the pdf which was created it has 6 pages. I am unable to understand why it has 2 copies of same PO.
When i tried to email the pdf as attachement the email is delivered successfully. But when i tried to view the pdf its given an error that "the file is corrupted (For example the attachemnt is not coded properly)or the fle type is not supported. Even in the attachment also i have the two files one is of pdf another is also of the .pdf but the image is showing as Unknown file format.
Any suggestions to resolve these issues.
ThanksMy code is as follows:
FORM print_form .
*Calling FM to retrieve the function module associated with the Smartform
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZMMS_MEDRUCK_LS'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = v_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.
control_parameters-langu = sy-langu.
control_parameters-no_dialog = 'X'.
control_parameters-getotf = 'X'.
Excuting the FM associated with the SmartForm by input required internal tables
CALL FUNCTION v_form_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = control_parameters
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = output_options
USER_SETTINGS = 'X'
IS_NAST = it_nast
IS_PEKKO = it_pekko
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = output_data
JOB_OUTPUT_OPTIONS =
TABLES
IT_EKPO = it_ekpo
IT_EKET = it_eket
IS_EKKO = it_ekko
IT_DRAW = it_draw
IT_BUYER = it_buyer
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.
tab_otf_final[] = output_data-otfdata[].
**removing the initial and final markers from the OTF data*********
DELETE output_data-otfdata WHERE tdprintcom = '//'.
searching for the end-of-page in OTF table************
DATA : my_tabix TYPE sy-tabix.
READ TABLE tab_otf_final WITH KEY tdprintcom = 'EP'.
my_tabix = sy-tabix + 1.
appending the modified OTF table to the final OTF table****
INSERT LINES OF output_data-otfdata INTO tab_otf_final INDEX my_tabix.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
bin_filesize = bin_filesize
TABLES
OTF = tab_otf_final
LINES = lt_lines
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = bin_filesize
FILENAME = 'D:TEST.PDF'
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 = ' '
WRITE_EOL = ABAP_TRUE
IMPORTING
FILELENGTH = file_size
TABLES
DATA_TAB = lt_lines
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.
loop at LT_LINES INTO wa_lines.
translate wa_LINES using '~'.
concatenate WA_BUFFER wa_LINES into WA_BUFFER.
endloop.
translate WA_BUFFER using '~'.
do.
I_RECORD = WA_BUFFER.
append I_RECORD.
shift WA_BUFFER left by 255 places.
if WA_BUFFER is initial.
exit.
endif.
enddo.
Attachment
refresh:
I_RECLIST,
I_OBJTXT,
I_OBJBIN,
I_OBJPACK.
clear WA_OBJHEAD.
I_OBJBIN[] = I_RECORD[].
APPEND I_RECORD.
Create Message Body Title and Description****************
I_OBJTXT = 'test with pdf-Attachment!'.
append I_OBJTXT.
describe table I_OBJTXT lines V_LINES_TXT.
read table I_OBJTXT index V_LINES_TXT.
WA_DOC_CHNG-OBJ_NAME = 'smartform'.
WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
WA_DOC_CHNG-SENSITIVTY = 'F'.
WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
Main Text*****************************
clear I_OBJPACK-TRANSF_BIN.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
I_OBJPACK-BODY_NUM = V_LINES_TXT.
I_OBJPACK-DOC_TYPE = 'PDF'.
append I_OBJPACK.
Attachment (pdf-Attachment)*************
I_OBJPACK-TRANSF_BIN = 'X'.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 1.
I_OBJPACK-BODY_START = 1.
I_OBJPACK-BODY_NUM = V_LINES_BIN.
I_OBJPACK-DOC_TYPE = 'PDF'.
I_OBJPACK-OBJ_NAME = 'smartform'.
concatenate I_OBJPACK-OBJ_NAME I_OBJPACK-DOC_TYPE into I_OBJPACK-OBJ_DESCR separated by '.'.
I_OBJPACK-OBJ_DESCR = 'test'.
I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
append I_OBJPACK.
Länge des Attachment ermitteln
clear I_RECLIST.
I_RECLIST-RECEIVER = '[email protected]'.
I_RECLIST-REC_TYPE = 'U'.
I_RECLIST-EXPRESS = 'X'.
data: TAB_LINES like SY-TABIX.
describe table I_OBJBIN lines TAB_LINES.
append I_RECLIST.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
tables
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = WA_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.
write:/ 'Error When Sending the File', SY-SUBRC.
else.
write:/ 'Mail sent'.
endif.
ENDFORM. " print_form -
Problem when transform command is invoked in a dialog
Hi friends
I´m having a problem with the script UI. I tried various things to correct but I´m not able to get sucess.
The code in the script is correct. The problem is: when I run the script and click the "execute" button...Photoshop would need to execute the "Transform" function it is called and would allow me to freely transform the selected layer.
BUT...it does not allow me to drag the axis of bounding boxes to transform. This is because Photoshop is understanding my dialog box UI is still active, ---even calling dlg.close()--- (and I cannot transform since a dialog box is active).
See it:
function transform(){
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
desc.putReference( charIDToTypeID('null'), ref );
desc.putEnumerated( charIDToTypeID('FTcs'), charIDToTypeID('QCSt'), charIDToTypeID('Qcsa') );
var desc2 = new ActionDescriptor();
desc2.putUnitDouble( charIDToTypeID('Hrzn'), charIDToTypeID('#Rlt'), 0.000000 );
desc2.putUnitDouble( charIDToTypeID('Vrtc'), charIDToTypeID('#Rlt'), 0.000000 );
desc.putObject( charIDToTypeID('Ofst'), charIDToTypeID('Ofst'), desc2 );
desc.putUnitDouble( charIDToTypeID('Hght'), charIDToTypeID('#Prc'), 100.001);
try{ executeAction( charIDToTypeID('Trnf'), desc, DialogModes.ALL ); }catch(e){};
var dlg = new Window ("dialog", "Processamento de imagens v10", [0,0,0,0])
dlg.size = [120,120]
dlg.center ()
var run = dlg.add ("button", [0,0,0,0], "Executar")
run.size = [80,30]
run.location = [30,40]
run.onClick = function (){
dlg.close()
var doc = app.activeDocument
var layer = doc.activeLayer
layer.isBackgroundLayer = false
transform()
dlg.show()
What Am I missing?
Photoshop does not accept Window of type ("palette") so I do not know how to handle it
Thank you for the help
Best Regards
Gustavo.You can not have more than one modal dialogs running at once. The scriptUI dialog is modal and so is your transform function. All you can do for this example is move the transform line to after the dlg.show(); line.
Photoshop does have a 'palette' window but because it is non-modal it is really only useful for progressbars or other 'please wait' messages. For the example you posted if it were a palette the script would not stop at dlg.show() and wait for the user to do something. It would try to run the next line and, not finding one, end. At best you would only see the window flash before the script finished. -
Problem When Multiple Users Export To PDF Simultaneously
I am hoping someone out there can help. We have had no luck at all with Crystal Reports / SAP support for this issue.
We have a client/server aplication and have written a C# program to load a crystal report on the server, export it to PDF and then we send the PDF to the client. We are using Crystal Reports 2008 and have applied SP4.
The scenario is as follows:
Two users log into our application from different PC's.
User 1 prints a report with no issue.
User 2 prints a report 5 seconds later with no issue.
If User 1 prints a report and while that report is being exported to PDF, User 2 prints a report, the first will be successful and the second will fail. If User 2 reprints the report after receiving a failure, the report prints successfully the second time (using the same temp report folders as the previous attempt). We have done a lot of tracing and have narrowed the problem down to the point in out C# program when the cryRpt.Export() routine is called. It seems to be what is failing and doesn't seem to be able to run 2 exports simultaneously.
All exporting to PDF occurs on the application server and the processes run as "Administrator" so permissions should certainly not be a problem. Each user is printing a different physical .rpt file and the data for each report is in a different physical directory.
Has anyone come across this before or have any suggestions?We thought the same thing as you suggest and have already made that change without sucess. Below is what the code looks like for our export routine. Perhaps you can spot something we have not. As mentioned before the export appears to be faulting at the statement "cryRpt.ExportToDisk(ExportFormatType.PortableDocFormat, pdfname);" in the below code.
The code is as follows:
public void exportReport(string xmldir, string crname, string pdfname, string termid, bool debug)
try
if (debug)
dt = DateTime.Now;
tw.WriteLine(dt.ToString() + "-Start exportReport: " + crname);
ReportDocument cryRpt;
cryRpt = new ReportDocument();
cryRpt.Load(crname, OpenReportMethod.OpenReportByTempCopy);
if (debug)
tw.WriteLine("Done loading report: " + crname);
int tmpct = 0;
int tmpint = crname.IndexOf("
", tmpct);
while (tmpint != -1)
tmpct = tmpint;
tmpint = crname.IndexOf("
", tmpct + 1);
string ODBCReportFileName = crname.Substring(tmpct + 1, crname.Length - tmpct - 5);
if (debug)
tw.WriteLine("ODBC Report Filename: " + ODBCReportFileName);
Database crDatabase;
Tables crTables;
Table crTable;
TableLogOnInfo crTableLogOnInfo;
ConnectionInfo crConnectionInfo = new ConnectionInfo();
//Setup the connection information structure to log on to the data source for the report.
// If using ODBC, this should be the DSN. If using OLEDB, etc, this should be the physical server name
crConnectionInfo.ServerName = "SH" + ODBCReportFileName;
if (debug)
tw.WriteLine("Resetting connection to: " + crConnectionInfo.ServerName);
crConnectionInfo.DatabaseName = "";
//Get the table information from the report
crDatabase = cryRpt.Database;
crTables = crDatabase.Tables;
//Loop through all tables in the report and apply the
//connection information for each table.
if (debug)
tw.WriteLine("Applying new connection to all tables...");
for (int i = 0; i < crTables.Count; i++)
crTable = crTables<i>;
crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo =
crConnectionInfo;
crTable.ApplyLogOnInfo(crTableLogOnInfo);
if (debug)
tw.WriteLine("Applying new connection to tables " + crTable.Name);
cryRpt.Refresh();
if (debug)
tw.WriteLine("Applying new connection to all tables... DONE");
if (debug)
tw.WriteLine("Target report: " + pdfname);
cryRpt.ExportToDisk(ExportFormatType.PortableDocFormat, pdfname);
if (debug)
tw.WriteLine("Export Complete");
cryRpt.Dispose();
cryRpt.Close();
if (debug)
dt = DateTime.Now;
tw.WriteLine(dt.ToString() + "-Done export to PDF.");
catch (Exception e)
TextWriter tw1 = new StreamWriter(logpath + "
exporterror.log", true);
tw1.WriteLine("Exception when export report: " + e.Message);
tw1.WriteLine(e.StackTrace);
tw1.Close(); -
Problem On Editing a Smartform in PDF with Chinese
Hello,
we are using SRM and in a specific transaction we are generating a SAP message wich is editing a form for the PO.
When we want to edit it on SRM in chinese we have problem with a lot of ### ans everything wich doesn't mean anything.
To generate the form we are using function 'CONVERT_OTF'.
No idea of what to do.
Thanks for helpHi Eileen,
Since you want to create a chinese PDF form, which font types are you using in the styles? If you are not using CNSONG, please try this font.
If this still does not work, then you will be needing to install true type fonts supported by adobe through SE73 and use those fonts in the smartstyles.
Hope this helps you -
Problem when zooming in on a PDF in iBooks
In iBooks, when pinching to zoom in on (enlarge) a section of certain PDFs, entire square or rectangular sections of the document go completely black or white, rendering that portion unreadable until I zoom back out. Sometimes, leaving iBooks and then returning fixes the problem, only to resurface on another page of the document. Sometimes nothing fixes it and I just have to quit iBooks and hope it doesn't resurface on next launch. See the screencaps below.
iPad Air 128GB iOS 7.0.4I have this same problem and it's been drving me nuts for months.
Any solutions appreciated, guys. -
Button problems when including a video. (interactive PDF)
I am having issues when exporting my interactive PDF from In-design. On a specific page with a video included, the buttons with actions to next and previous page do not seem transition to the next page like they do throughout the rest of the PDF. It barely responds at all, if I click it over and over it sometimes goes to the next page but its not a smooth transition. I am using the latest adobe acrobat pro to view the PDF. If anyone has an answer to this problem it was be a massive help.
Cheers
KyleThere´s something you can do, but you will need Acrobat for that.
That dotted line is a preference element called Focus Rectangle, you can hide it manually in Preferences > Forms > Show Focus Rectangle (Uncheck) or you can add one line of javascript to document level or for instance page 1 (if you change it in your preferences, only you will see the effect naturally), so javascript method is probably better in your case.
If you want to add that javasctript to page 1, simply open thumbnails panel, select page 1 thumb and choose Page Properties from panel menu. Go to Actions tab and choose Run Javascript and click Add. Then paste....
app.focusRect = false;
....to Javascript editor and click OK (few times, until you are back in page view). No your user will run that javascript command everytime he/she opens the page 1 and hides that dotted Focus Rectangle.... -
Crystal report align problem when printing or converting to PDF
hi
Im using Crystal report in asp.net 2.0.. I draw line to design my invoice report on viewing that in aspx page it looks perfect and fine..
If i need to export my report to PDF. In Crystal Report Viewer the Alignment are perfect.. But when i export into PDF the Alignment changed entirely..
what to do..
thanksLet's start with :
1) version of CR
2) And CR Service packs or fixes applied?
3) Version of .NET
4) Do you see the issue in both the CR Designer and at runtime?
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports] -
Problem when exporting the report to PDF viwer a 45,000-page report
I am using Visual Studio 2013 with the report vivew.
I have a report that works correctly, however when generating a 45000 pages he is giving memory error when exporting to PDF, any tips?Check this SAP Note: 1089388 Incorrect value in exported PDF when Concat function is used
[https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E¬e_numm=1089388]
Maybe you are looking for
-
How to be Sure my iMac sees my Preferred Wireless Network Each Bootup
I am still setting up my new iMac and deciding what to keep and what not to keep from my previous primary computer (G4 iMac running Tiger). The old G4 is still hardwired to my D-Link wireless router (DIR 615) and my new 21.5 inch is connecting wirele
-
Windpad 110W Win 8.1 upgrade can no longer boot under AHCI
I recently upgraded my 110W to Win 8.1, but then discovered that it would not boot after the first reboot. As found in some forums, changing to IDE mode in BIOS allows it to boot, but performance is somewhat slower. I have tried chaning the storahc
-
To Hide Page in the portal based on the requirement
Hi All , AM newbie to portal environment and have been doing a research for quite some time on portlets and inter communication between portlets(IPC). Am stuck with a scenario in which i have two pages created in a portal and each page has a portlet.
-
RMAN Recovery failing , Need Suggestion
RMAN Recovery is failing 3 times with these errors , need suggestion RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================
-
SecurityException when creating a root preference node on Vista
When creating a root preference node (Preferences.systemRoot()) on Vista, I always get a SecurityException. This happens even when running from an administrator account. Has anyone seen this behavior and/or found a workaround? Basically, I want to st