Convert ORA_FFI to WEBUTIL_C_API to print locally
I am trying to figure out how to convert this package to WEBUTIL_C_API to be able to print to a users local printer (EPSON slip printer)... ANY help would be appreciated...
PACKAGE EPSON_SLIP_PRINTER_INTERFACE IS
* This package provides functions to interact with the EPSON
* TM-U295 slip printers.
* The OPEN_PRINTER function must be called to obtain a printer ID.
* This printer ID can then be used when calling other functions
* that require a printer to be specified.
* NOTE that the printer ID is only valid within the same thread
* that called the OPEN_PRINTER function.
* Brendan Rickey 2004-JAN-09
-- AVAILABLE PRINTERS
CHEQUE_PRINTER VARCHAR2(50) := 'Generic / Text Only droite';
INVOICE_PRINTER VARCHAR2(50) := 'Generic / Text Only left';
-- ERROR CODES
-- Some of the provided functions return a NUMBER value that may hold
-- an error code (negative number).
-- These are the possible error codes:
SUCCESS NUMBER := 0; --no error
ERR_TYPE NUMBER := -10; --parameter type error
ERR_OPENED NUMBER := -20; --printer already opened
ERR_NO_PRINTER NUMBER := -30; --the printer driver does not exist
ERR_NO_TARGET NUMBER := -40; --no printer found (could of off, faulty, unsupported)
ERR_NO_MEMORY NUMBER := -50; --insufficient memory
ERR_HANDLE NUMBER := -60; --invalid printer ID
ERR_TIMEOUT NUMBER := -70; --time out error
ERR_ACCESS NUMBER := -80; --cannot read/write to printer (printing in progress)
ERR_PARAM NUMBER := -90; --parameter error
ERR_OFFLINE NUMBER := -110; --printer was opened in offline state. Status must be changed to online.
ERR_NOT_EPSON NUMBER := -120; --printer is not an EPSON printer
* INITIALIZE
* Initializes the interface between Forms and the EPSON library (call before any other function in the package).
* Returns:
* TRUE if the library is registered successfully,
* FALSE otherwise (library not found etc...)
function INITIALIZE return BOOLEAN;
* OPEN_PRINTER
* Obtains a handle on the specified EPSON slip printer (either CHEQUE_PRINTER or INVOICE_PRINTER).
* Returns:
* a printer ID for the specified printer (greater than 0)
* an error code on failure (less than 0):
* ERR_TYPE, ERR_OPENED, ERR_NO_PRINTER, ERR_NO_TARGET, ERR_NO_MEMORY, ERR_PARAM
function OPEN_PRINTER (p_printer_name IN VARCHAR2) return NUMBER;
* CLOSE_PRINTER
* Releases the handle on the specified printer.
* Returns:
* 0 on success
* ERR_HANDLE on failure
function CLOSE_PRINTER (p_printer_id IN NUMBER) return NUMBER;
* IS_PAPER_OUT
* Tests if there is no paper in the printer.
* Returns:
* 1 if there is no paper in the printer, 0 if paper is in the printer
* ERR_HANDLE or ERR_PARAM on failure.
function IS_PAPER_OUT (p_printer_id IN NUMBER) return NUMBER;
* PRINT_TEXT
* Prints the specified text to the specified printer.
* Returns:
* 0 on success
* ERR_HANDLE, ERR_ACCESS, ERR_OFFLINE, ERR_NOT_EPSON, or ERR_PARAM on failure.
function PRINT_TEXT (p_printer_id IN NUMBER, p_text IN VARCHAR2) return NUMBER;
* RELEASE_PAPER
* Performs the Release function on the specified printer.
* Returns:
* 0 on success
* ERR_HANDLE, ERR_ACCESS, ERR_OFFLINE, ERR_NOT_EPSON, or ERR_PARAM on failure.
function RELEASE_PAPER (p_printer_id IN NUMBER) return NUMBER;
/* PRIVATE FUNCTIONS
function BiOpenMonPrinter(arg0 in PLS_INTEGER,
arg1 in out VARCHAR2)
return PLS_INTEGER;
function BiCloseMonPrinter(arg0 in PLS_INTEGER)
return PLS_INTEGER;
function BiGetStatus(arg0 in PLS_INTEGER,
arg1 in out PLS_INTEGER)
return PLS_INTEGER;
function BiDirectIO(arg0 in PLS_INTEGER,
arg1 in PLS_INTEGER,
arg2 in out VARCHAR2,
arg3 in out PLS_INTEGER,
arg4 in out VARCHAR2,
arg5 in PLS_INTEGER,
arg6 in PLS_INTEGER)
return PLS_INTEGER;
function BiDirectIOEx(arg0 in PLS_INTEGER,
arg1 in PLS_INTEGER,
arg2 in out VARCHAR2,
arg3 in out PLS_INTEGER,
arg4 in out VARCHAR2,
arg5 in PLS_INTEGER,
arg6 in PLS_INTEGER,
arg7 in PLS_INTEGER)
return PLS_INTEGER;
END;
PACKAGE BODY EPSON_SLIP_PRINTER_INTERFACE IS
v_msg_b VARCHAR2(20);
v_EPSON_LIBRARY_OK BOOLEAN:= FALSE;
--ORA_FFI function handles and library handle
lh_EpsStmApi ora_ffi.libHandleType; --DLL library handle
fh_BiOpenMonPrinter ora_ffi.funcHandleType; --DLL function handle
fh_BiCloseMonPrinter ora_ffi.funcHandleType; --DLL function handle
fh_BiGetStatus ora_ffi.funcHandleType; --DLL function handle
fh_BiDirectIO ora_ffi.funcHandleType; --DLL function handle
fh_BiDirectIOEx ora_ffi.funcHandleType; --DLL function handle
--constant
ASB_SLIP_BOF PLS_INTEGER := 4*power(16,5); --BOF printer status flag 0x00400000
c_release_code CHAR(2) := CHR(27)||CHR(113); --ESC+q, to release the paper
-------PRIVATE FUNCTIONS--------
* Brendan Rickey 2004-JAN-09
* The following are functions that are required to interface with the
* EPSON StatusAPI DLL (C library) though ORA_FFI.
* The following describes the DLL functions that are made available
* through this ORA_FFI implementation:
Function Purpose
BiOpenMonPrinter Get a handle on a printer.
Parameters
p_Type --int: 1 if p_Name is a port, 2 if a printer name.
,p_Name --varchar2: the port of printer name to open.
Return printer identifier number (>0) on success, < 0 on failure.
BiCloseMonPrinter Close the monitor on the printer.
Parameters
p_Handle --int: The numerical printer handle returned from BiOpenMonPrinter.
Return 0 on success, < 0 on failure.
BiGetStatus Returns the status of the printer.
Parameters
p_Handle --int: The numerical printer handle returned from BiOpenMonPrinter.
,p_Status OUT --long: The status of the printer (use AND bitwise operator to test for statuses).
Return 0 on success, < 0 on failure.
BiDirectIO Sends data to and Reads data from the printer. Use BiDirectIOEx if more that 255 chars are to be written/read.
Parameters
p_Handle --int: The numerical printer handle returned from BiOpenMonPrinter.
,p_WriteLen --short: The length of the command/data being sent to the printer (max 255).
,p_WriteCmd --varchar2: The command/data to send to the printer.
,p_ReadLen --short: The length of the data to be read from the printer (max 255)
(Use 0 if no data is to be read).
,p_ReadBuff OUT --varchar2: The buffer where the the data read from the printer is stored.
,p_Timeout --long: write/read time out in msecs.
,p_NullTerminate --short: 0 => reading of data from printer is performed until time out or length of p_ReadLen is reached.
1 => reading is finished at thepoint when a NULL is received from the printer. ReadLen must have a value.
Return 0 on success, < 0 on failure.
BiDirectIOEx Sends data to and Reads data from the printer (handles larger quantities of write/read data).
Parameters
p_Handle --int: The numerical printer handle returned from BiOpenMonPrinter.
,p_WriteLen --long: The length of the command/data being sent to the printer.
,p_WriteCmd --varchar2: The command/data to send to the printer.
,p_ReadLen --long: The length of the data to be read from the printer (Use 0 if no data is to be read).
,p_ReadBuff OUT --varchar2: The buffer where the the data read from the printer is stored.
,p_Timeout --long: write/read time out in msecs.
,p_NullTerminate --short: 0 => reading of data from printer is performed until time out or length of p_ReadLen is reached.
1 => reading is finished at thepoint when a NULL is received from the printer. ReadLen must have a value.
,p_Option --short: 0 => prevents Automatic Status Back (ASB) during execution of this function (as does BiDirectIO).
1 => does not disable Automatic Status Back (ASB).
Return 0 on success, < 0 on failure.
function icd_BiOpenMonPrinter(funcHandle in ora_ffi.funcHandleType, arg0 in PLS_INTEGER,
arg1 in out VARCHAR2)
return PLS_INTEGER;
pragma interface(c, icd_BiOpenMonPrinter, 11265);
function BiOpenMonPrinter(arg0 in PLS_INTEGER,
arg1 in out VARCHAR2)
return PLS_INTEGER is
begin
return(icd_BiOpenMonPrinter(fh_BiOpenMonPrinter,
arg0,
arg1));
end;
function icd_BiCloseMonPrinter(funcHandle in ora_ffi.funcHandleType, arg0 in PLS_INTEGER)
return PLS_INTEGER;
pragma interface(c, icd_BiCloseMonPrinter, 11265);
function BiCloseMonPrinter(arg0 in PLS_INTEGER)
return PLS_INTEGER is
begin
return(icd_BiCloseMonPrinter(fh_BiCloseMonPrinter,
arg0));
end;
function icd_BiGetStatus(funcHandle in ora_ffi.funcHandleType, arg0 in PLS_INTEGER,
arg1 in out PLS_INTEGER)
return PLS_INTEGER;
pragma interface(c, icd_BiGetStatus, 11265);
function BiGetStatus(arg0 in PLS_INTEGER,
arg1 in out PLS_INTEGER)
return PLS_INTEGER is
begin
return(icd_BiGetStatus(fh_BiGetStatus,
arg0,
arg1));
end;
function icd_BiDirectIO(funcHandle in ora_ffi.funcHandleType, arg0 in PLS_INTEGER,
arg1 in PLS_INTEGER,
arg2 in out VARCHAR2,
arg3 in out PLS_INTEGER,
arg4 in out VARCHAR2,
arg5 in PLS_INTEGER,
arg6 in PLS_INTEGER)
return PLS_INTEGER;
pragma interface(c, icd_BiDirectIO, 11265);
function BiDirectIO(arg0 in PLS_INTEGER,
arg1 in PLS_INTEGER,
arg2 in out VARCHAR2,
arg3 in out PLS_INTEGER,
arg4 in out VARCHAR2,
arg5 in PLS_INTEGER,
arg6 in PLS_INTEGER)
return PLS_INTEGER is
begin
return(icd_BiDirectIO(fh_BiDirectIO,
arg0,
arg1,
arg2,
arg3,
arg4,
arg5,
arg6));
end;
function icd_BiDirectIOEx(funcHandle in ora_ffi.funcHandleType, arg0 in PLS_INTEGER,
arg1 in PLS_INTEGER,
arg2 in out VARCHAR2,
arg3 in out PLS_INTEGER,
arg4 in out VARCHAR2,
arg5 in PLS_INTEGER,
arg6 in PLS_INTEGER,
arg7 in PLS_INTEGER)
return PLS_INTEGER;
pragma interface(c, icd_BiDirectIOEx, 11265);
function BiDirectIOEx(arg0 in PLS_INTEGER,
arg1 in PLS_INTEGER,
arg2 in out VARCHAR2,
arg3 in out PLS_INTEGER,
arg4 in out VARCHAR2,
arg5 in PLS_INTEGER,
arg6 in PLS_INTEGER,
arg7 in PLS_INTEGER)
return PLS_INTEGER is
begin
return(icd_BiDirectIOEx(fh_BiDirectIOEx,
arg0,
arg1,
arg2,
arg3,
arg4,
arg5,
arg6,
arg7));
end;
--------PUBLIC FUNCTIONS--------
function INITIALIZE return BOOLEAN IS
BEGIN
--When this is the first package function called, code in the package's
--body is executed and sets v_EPSON_LIBRARY_OK.
RETURN v_EPSON_LIBRARY_OK;
END;
function OPEN_PRINTER (p_printer_name IN VARCHAR2) return NUMBER IS
v_printer PLS_INTEGER;
v_printer_name VARCHAR2(50) := p_printer_name;
v_name_type PLS_INTEGER := 2; --use printer Name to specify printer
BEGIN
/* Open a monitor for the printer */
v_printer := BiOpenMonPrinter(v_name_type,v_printer_name);
RETURN v_printer;
END;
function CLOSE_PRINTER (p_printer_id IN NUMBER) return NUMBER IS
v_return PLS_INTEGER;
BEGIN
/* CLOSE the printer monitor */
v_return := BiCloseMonPrinter(p_printer_id);
RETURN v_return;
END;
function IS_PAPER_OUT (p_printer_id IN NUMBER) return NUMBER IS
v_return PLS_INTEGER;
v_status PLS_INTEGER := -123456;
BEGIN
/* Test if paper is in the printer by first getting the status (a binary integer) */
v_return := BiGetStatus(p_printer_id,v_status);
IF v_return <> 0 THEN
RETURN v_return;
ELSE
--Test for BOF status flag
IF WIN_API_BITOP.BITWISE_AND(v_status,ASB_SLIP_BOF) = ASB_SLIP_BOF THEN
RETURN 1; --paper out
ELSE
RETURN 0; --paper in
END IF;
END IF;
END;
function PRINT_TEXT (p_printer_id IN NUMBER, p_text IN VARCHAR2) return NUMBER IS
v_return PLS_INTEGER;
v_text VARCHAR2(2000) := p_text;
v_text_len PLS_INTEGER; --number of characters to be printed
v_read_len PLS_INTEGER := 0; --number of characters to be read from the printer
v_read_buff VARCHAR2(255) := NULL; --not used: holds characters read from the printer
v_timeout PLS_INTEGER := 1000; --not used: amount of time to wait for response (msecs)
v_nullTerm PLS_INTEGER := 0; --not used: 0 means read until reached v_read_len or v_timeout
-- 1 means read until NULL received from printer
v_option PLS_INTEGER := 0; --0 means do not answer other requests while printing
--1 means do not stop answering other requests while printing
BEGIN
--Get the number of chars to be printed and then print.
v_text_len := length(p_text);
v_return := BiDirectIOEx(p_printer_id,
v_text_len,
v_text,
v_read_len,
v_read_buff,
v_timeout,
v_nullTerm,
v_option);
--Ignore timeout(-70) errors, otherwise return error
IF v_return = -70 THEN
v_return := 0;
END IF;
RETURN v_return;
END;
function RELEASE_PAPER (p_printer_id IN NUMBER) return NUMBER IS
BEGIN
/* Release the paper by sending the release escape code to the printer */
RETURN PRINT_TEXT(p_printer_id, c_release_code);
END;
-----END OF FUNCTION IMPLEMENTATIONS-----
BEGIN
* Load the EPSON printer driver's StatusAPI library.
* Create an ORA_FFI interface to the library by doing the following for each desired function:
* 1- Create a handle on the function,
* 2- Register the return value,
* 3- Register the arguments/parameters in the correct order.
lh_EpsStmApi := ora_ffi.load_library('', 'EpsStmApi.DLL');
IF Ora_Ffi.Is_Null_Ptr(lh_EpsStmApi) THEN
AFC_MESSAGES('I','MAIN-0020','E',v_msg_b);
v_EPSON_LIBRARY_OK := FALSE;
ELSE
fh_BiOpenMonPrinter := ora_ffi.register_function(lh_EpsStmApi, 'BiOpenMonPrinter', ora_ffi.c_std);
ora_ffi.register_return(fh_BiOpenMonPrinter, ora_ffi.c_int, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiOpenMonPrinter, ora_ffi.c_int, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiOpenMonPrinter, ora_ffi.c_char_ptr, ora_ffi.pls_varchar2);
fh_BiCloseMonPrinter := ora_ffi.register_function(lh_EpsStmApi, 'BiCloseMonPrinter', ora_ffi.c_std);
ora_ffi.register_return(fh_BiCloseMonPrinter, ora_ffi.c_int, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiCloseMonPrinter, ora_ffi.c_int, ora_ffi.pls_pls_integer);
fh_BiGetStatus := ora_ffi.register_function(lh_EpsStmApi, 'BiGetStatus', ora_ffi.c_std);
ora_ffi.register_return(fh_BiGetStatus, ora_ffi.c_int, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiGetStatus, ora_ffi.c_int, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiGetStatus, ora_ffi.c_long_ptr, ora_ffi.pls_pls_integer);
fh_BiDirectIO := ora_ffi.register_function(lh_EpsStmApi, 'BiDirectIO', ora_ffi.c_std);
ora_ffi.register_return(fh_BiDirectIO, ora_ffi.c_int, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiDirectIO, ora_ffi.c_int, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiDirectIO, ora_ffi.c_short, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiDirectIO, ora_ffi.c_char_ptr, ora_ffi.pls_varchar2);
ora_ffi.register_parameter(fh_BiDirectIO, ora_ffi.c_short_ptr, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiDirectIO, ora_ffi.c_char_ptr, ora_ffi.pls_varchar2);
ora_ffi.register_parameter(fh_BiDirectIO, ora_ffi.c_long, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiDirectIO, ora_ffi.c_short, ora_ffi.pls_pls_integer);
fh_BiDirectIOEx := ora_ffi.register_function(lh_EpsStmApi, 'BiDirectIOEx', ora_ffi.c_std);
ora_ffi.register_return(fh_BiDirectIOEx, ora_ffi.c_int, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiDirectIOEx, ora_ffi.c_int, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiDirectIOEx, ora_ffi.c_long, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiDirectIOEx, ora_ffi.c_char_ptr, ora_ffi.pls_varchar2);
ora_ffi.register_parameter(fh_BiDirectIOEx, ora_ffi.c_long_ptr, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiDirectIOEx, ora_ffi.c_char_ptr, ora_ffi.pls_varchar2);
ora_ffi.register_parameter(fh_BiDirectIOEx, ora_ffi.c_long, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiDirectIOEx, ora_ffi.c_short, ora_ffi.pls_pls_integer);
ora_ffi.register_parameter(fh_BiDirectIOEx, ora_ffi.c_short, ora_ffi.pls_pls_integer);
v_EPSON_LIBRARY_OK := TRUE;
END IF;
EXCEPTION
WHEN OTHERS THEN
AFC_MESSAGES('I','MAIN-0021','E',v_msg_b);
v_EPSON_LIBRARY_OK := FALSE;
END;
Hi Duncan,
Thanks for the response. Beyond the problem you pointed out I found that the "open server" command is requiring a window handle parameter, even though it isn't used by the program. I talked with Oracle Support and it turns out that even if the window handle isn't used, it's existence makes it not work with the current version of webutil.
The program I am working with also has a COM interface, so I decided to back up and redo the interface using webutil OLE2. I've got it working now, just a little more polishing to do.
Thanks again for the help.
Mark
Similar Messages
-
I created a photobook in photoshop elements 9 and selected "print locally". Now I want to send it to a commercial printer and can't figure out how to do so. I have checked with both Shutterfly and Costco, and they want each page sent as a separate picture.... How do I do that?
Hi Margery J,
You are correct, to use a commercial printer you will need to export them as individual pages. To do this, go to File --> Export Photobook:
From there, a window will pop up: make sure "JPEG" is selected as the format and set your destination folder.
Then click OK and you should be all set, your images will save to the selected folder. You can then upload the folder to Shutterfly, Costco or any other commercial printer to have it printed as a booklet.
Please note that each commercial printer and service may have different quality or file format requirements.
Here is a link to a helpful Shutterfly page about booklet printing requirements.
http://www.shutterfly.com/digitalscrapbook/books/print_digital_scrapbook.pdf?esch=1
Hope it helps!
Clarice -
Converting Images to CMYK for Print Publication
When in my workflow should I be converting images to CMYK for print publication?
Currently, I shoot RAW photographs with my DSLR in Adobe RGB, import the images into Photoshop for manipulation and then convert the final, sized image to CMYK before placing it in my Indesign document. Before going to print, I convert my files to PDF using the [PDF/X-1a:2001] preset. I use a calibrated system with a profile set for my monitor.
Since many of my pictures have shades of green, I'm often disappointed with the conversion to CMYK because I lose saturation and brightness. Am I doing anything wrong? Is there a better way of preserving the quality of colour in my images when going to a commercial printer?To see in InDesign what color shifts will occur, use View=>Proof Colors.
I would also recommend View=>Overprint Preview.
Yes there are color shifts when converting RGB to CMYK, but those are due to the fact that the gamut of CMYK is significantly less than AdobeRGB or even sRGB. The same color shifts going to CMYK will occur whether you convert the image in Photoshop or in InDesign during PDF export or at the RIP.
Keeping the color in ICC color managed RGB has the advantage that last minute changes can be made as to what CMYK printing conditions are used, i.e. all CMYK is not the same. Furthermore, if you convert RGB to CMYK early in the workflow, you lose the ability to maintain the color gamut for display of the PDF as well as for printing to high fidelity color devices, i.e., offset or digital (especially inkjet) devices that have extra colorants such as light cyan, light magenta, orange, and/or green to dramatically expand the gamut. Once you lose the gamut in your imagery via conversion to CMYK, you can't go back.
- Dov -
Pacman: Pathname can't be converted from UTF-8 to current locale
Hello Forum,
I am stuck with a problem to which I cannot find any solution after spending half the day trying to solve it:
I have a package wich I installed from AUR -> MyCustomRepository working nicely on my main Arch system. Now I would like to add the package to a livecd using the archiso scripts. When I add it to my packages.both list it downloads fine.
However when installation into chroot should start pacman gives me the following error:
(378/378) loading package files [######################] 100%
error: error while reading package /var/cache/pacman/pkg/pd-extended-0.43.4-1-x86_64.pkg.tar.xz: Pathname can't be converted from UTF-8 to current locale.
error: failed to commit transaction (libarchive error)
Errors occurred, no packages were upgraded.
My System only uses en_US.UTF-8 as locale, so I don't really understand why any conversion should be neccesary.
I read about a similar error somewhere with a reply stating it had to do with packaging. No solution was given however. Can this be the case? And if yes, why do I not have any problems installling in my main system? And more importantly, how can I fix it? i don't really know where to look for the right way now.
I already tried to include a different packages from AUR through my repository, which worked as expected.
the package is pd-extended from AUR with a slight modification to make the .desktop file actually start pdextended.
Any help is greatly appreciated.
Thank you,
Dominik
# Maintainer: <fero dot kiraly at gmail.com>
# Contributor: Dominik Schmidt-Philipp <[email protected]>
pkgname=pd-extended
pkgver=0.43.4
pkgrel=1
pkgdesc="PureData Extended 0.43-4 version"
url="http://puredata.info/"
arch=('i686' 'x86_64' )
license=('BSD')
depends=('libdc1394' 'desktop-file-utils' 'libiec61883' 'fftw' \
'jack' 'tk' 'freeglut' 'libquicktime' 'libdv' 'gsl' 'imagemagick' \
'ftgl' 'libgl' 'hicolor-icon-theme' 'lua51')
makedepends=('dssi' 'git' 'libv4l' 'tcllib' 'subversion' 'swig' 'automake' 'curl')
conflicts=('pdp' 'zexy' 'puredata')
provides=( 'pd-extended' 'pd-gem' 'pdp' 'zexy')
optdepends=('puredata-utils' 'pd-vanilla')
replaces=(pd-extended)
backup=()
options=('!makeflags' '!libtool')
install=pd-extended.install
source=('change_gem_configure_file.patch' 's_inter.c.patch' 'tclpd.Makefile.patch' 'makefile.am.patch')
md5sums=('63a36c51706eaed98611aa4b4bb6ed0d' '8b748d09e8bdf04540ba579d0a6b5318' '463de23166cef2dcf6c7f6989e636213' '5938b12a232004de15f5a383f95cedca' )
build() {
unset CFLAGS
unset LDFLAGS
unset INCLUDES
#downloading pd-extended----------------------------------------------------------
msg "Begin SVN checkout for pd-extended 0.43.4"
cd $srcdir
svn checkout https://pure-data.svn.sourceforge.net/svnroot/pure-data/branches/pd-extended/0.43 $pkgname
msg "SVN checkout done or server timeout"
cd ..
#FIXES -----------------------------------------------------------------------------
# fix #1 lua
#patch $srcdir/$pkgname/externals/loaders/pdlua/src/Makefile ./repair_lua_lib_number.patch
#fix #2 -- GEM configure.ac
patch $srcdir/$pkgname/externals/Gem/configure.ac ./change_gem_configure_file.patch
#fix #3 -- repair wish8.6 (for tcl8.6)
patch $srcdir/$pkgname/pd/src/s_inter.c ./s_inter.c.patch
#fix #4 -- repair version of tcl (8.6)
patch $srcdir/$pkgname/externals/loaders/tclpd/Makefile ./tclpd.Makefile.patch
#fix #5 -- repair binary name to pd-extended (from pd)
#patch $srcdir/$pkgname/packages/Makefile ./program_name.patch
patch $srcdir/$pkgname/pd/src/Makefile.am ./makefile.am.patch
# 64 bit archutecure----------------------------------------------------------------
if [ "$CARCH" = "x86_64" ]; then
# fix -fPIC issue in PDP
sed -e "s|CFLAGS =|CFLAGS = -fPIC|" \
-i $srcdir/$pkgname/externals/pdp/opengl/Makefile.config || return 1
# fix -fPIC issue in pddp
sed -e "s|DEFINES =|DEFINES = -fPIC|" \
-i $srcdir/$pkgname/externals/miXed/Makefile.common || return 1
# setting additional variable
FPIC_FLAG="-fPIC"
else FPIC_FLAG=""
fi
#MAKE --------------------------------------------------------------------------
cd "$srcdir/$pkgname/packages/linux_make" || return 1
make BUILDLAYOUT_DIR=$srcdir/$pkgname/packages \
GEM_EXTRA_CXXFLAGS="$FPIC_FLAG" \
prefix=/usr \
install || return 1
package() {
cp -urv $srcdir/$pkgname/packages/linux_make/build/usr $pkgdir/
mv $pkgdir/usr/share/man/man1/pd.1 $pkgdir/usr/share/man/man1/pdextended.1
rm $pkgdir/usr/share/man/man1/pdreceive.1
rm $pkgdir/usr/share/man/man1/pdsend.1
rm $pkgdir/usr/include/m_pd.h
rm $pkgdir/usr/bin/pd-gui.tcl
cd $srcdir/$pkgname/
# PD License
install -Dm644 pd/LICENSE.txt $pkgdir/usr/share/licenses/pd-extended/LICENSE.txt
cd packages/
install -p linux_make/default.pdextended $pkgdir/usr/lib/pd-extended/
# Gnome menu support
install -d $pkgdir/usr/share/icons/hicolor/128x128/apps
install -p -m0644 linux_make/pd-extended.png $pkgdir/usr/share/icons/hicolor/128x128/apps/
install -d $pkgdir/usr/share/icons/hicolor/48x48/apps
install -p -m0644 linux_make/48x48/pd-extended.png $pkgdir/usr/share/icons/hicolor/48x48/apps/pd-extended.png
install -d $pkgdir/usr/share/applications/
install -p linux_make/pd-extended.desktop $pkgdir/usr/share/applications/
sed -i "s/^Exec=.*/Exec=pdextended/" $pkgdir/usr/share/applications/pd-extended.desktop
# mime
install -d $pkgdir/usr/share/mime/packages/
install -p linux_make/pd-extended.xml $pkgdir/usr/share/mime/packages/
install -d $pkgdir/usr/share/icons/hicolor/128x128/mimetypes
install -p linux_make/text-x-puredata.png $pkgdir/usr/share/icons/hicolor/128x128/mimetypes
# files for /etc
cd "$srcdir/$pkgname"
install -d $pkgdir/etc/bash_completion.d/
install -p scripts/bash_completion/pd $pkgdir/etc/bash_completion.d
# emacs mode for .pd files
install -d $pkgdir/usr/share/emacs/site-lisp/
install -p scripts/pd-mode.el $pkgdir/usr/share/emacs/site-lisp/
# Pd-related scripts
install -p scripts/pd-diff $pkgdir/usr/bin/
install -p scripts/config-switcher.sh $pkgdir/usr/bin/
# vim:set ts=2 sw=2 et:I chroot into workdir. uncommented en_US.UTF-8 in /etc/locale.gen, run locale-gen and now get this inside the chroot.
[root@dArch2 releng]# chroot work/x86_64/root-image/
[root@dArch2 /]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
this looks alright to me. Any more suggestions?
It's the first time I use a custom-repo and I set it up only for this purpose. So yes, it's up to date and can be used outside the chroot. Also a different package I put from AUR into my custom-repo installs fine and doesn't give this error.
How else could I test the custom-repo? -
How to convert an NWDI project into a Local project?
Hi Experts,
Please tell me " how to convert an NWDI project into a Local project? "
If you cHi Srini
1. Copy/Paste Webdynpro components in the new project as was suggested before
2. Or create new project, copy _comp folder from old project to the new one. But, do not forget to update .dcdef & .project files manually after this. You have to set the correct project name in .dcdef and set the correct local project path in .project.
BR, Sergei -
Event Id: 372 Source: PrintService Print Locally Error
Hi Friends.
I'm trying to print locally trought terminal services on Windows 2008 Server Foundation R2, The Server is a DC too.
I saw this article: http://support.microsoft.com/kb/968605
I did the procedure but nothing happens, the error appears again. Some solution to workaround this problem?. This is a little network, i don't have other server, but we need terminal services to run a remote application.
Thanks.This solution my problem: http://support.microsoft.com/kb/962930
1. On the Terminal Server locate the Printers folder. This is normally located at: to c:\windows\system32\spool\printers
2. Right-click on the Printers folder, and then click Properties.
3. Click Security, and then add everyone to the security permissions.
4. Click Apply, and then OK. -
Text converted to lines will not print
I have a AICS3 document with some text. The font acts a little funny, but it has been working. It shows up fine in my document, but it will not print. I conert it to lines, it shows up in my document, but it still won't print. I place it in an ID file, export it as a PDF. The text shows up in ID, but will not print. It shows up when I open the PDF in Acrobat Reader, but not in Acrobat. In both cases, the text (that has been long converted to outlines) does not print. Can anyone help? Since the text has been converted to outlines is it not just a group of compound paths? I even changed the fill with no luck. In general, I am very tired of the way we users are treated like criminals when it comes to fonts--regardless if that is the problem here. I mean, what good is a font if you can't print it? Anyway, I digress. Any ideas from anyone? I'd really like to get this thing printed.
Thanks,
MGuilfoile
G5/2500, OS 10.4.11, AICS"Overprint fill" is useful in a situation such as 100K text printing over solid yellow. The setting will prevent the yellow from being knocked out behind the black, causing unnecessary registration problems.
White text is created by lack of ink, so preventing the background objects from being knocked out causes the white objects to disappear. Only if you were printing opaque white ink over a color, such as in screen printing, would that ever be used, and probably not even then.
Hopefully an expert will come along with a more detailed and accurate explanation.
Mike D. -
Convert xml to pdf and print on SAP printers
Hello All,
I've the following requirement:
PO layout (we are not using smartform or sapscript or adobe for printing. The PO template is an infopath file which generates XML and XSL) is in the form of XSL file and the PO data is in the form of XML (generated from ABAP itself). I merge this two files and apply call transformation to create a single XML file which has the layout information as well as the data.
Now the major challenge is to convert this XML file with the layout information and display it as a PDF in SAP GUI. Also, this PDF should be printable on SAP printers and not only local printers.
Asking you to help me as your time permits.
Regards
Aditya
Edited by: Thomas Zloch on Mar 10, 2011 9:25 AM - urgency reduced to normalhii,
For xml file format.Goto this link.Click on print options link.
Click on statically,dynamically links.
http://help.sap.com/saphelp_nw04/helpdata/en/a5/28d3b6d26211d4b646006094192fe3/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/f6/6a65c1edf111d4b656006094192fe3/content.htm
regards,
Sridhar.V -
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 -
To print local time in format of HH:MM in a smartform
Hi Guys,
I need to print the local time ofp rinting in a smartform eliminaitng the seconds. i.e., Need to print only HH:MM.
How Do I do that?Display &SFSY-TIME(5)&
Or
create program lines and display and pass the time to variable without seconds..
Example:
Data : time(5).
time = sfsy-time.
close thread once question is answered.
Regards,
SaiRam -
I am creating a document in Publisher & converting to a pdf. Most of my png elements within the document, are then printing black and white from the pdf (everything else is in color)? Don't know what is going on, doesn't seem to happen on all printers, is there a setting I am missing? Help! Thanks
Could be a setting in the PNGs when they are saved.
Have you tried saving them as GIFs and replacing them in the document(s)? -
CONVERTING SMARTFORM INTO PDF AND PRINTING DIRECTLY
Hai guys,
I got a problem.
First the Smartform I created doesnt show all TABLE LINES(the rows coloumns)...
so I have converted the SMART FORM to ADOBE FORM PROGRAMITICALY ...
now in order to PRINT ..
one has to first SAVE the FORM(adobe form) onto desktop(or whereever) and give it to PRINT...
unfortunately my CLIENT doeasnt like the EXTRA STEP..
so i best i can SAVE the file to a hardcoded location and
OPEN it ..
But then CAN I
a)PRINT DIRECTLY without SAVING??
b)ISSUE PRINT PROGRAMITICALY
c)I learnt that a SMARTFORM can be GENERATED INTO PDF only at RUNNTIME(from SMARTFORMS>UTILITIES etc)..i briefly tried that..can I use that to GET THE PDF to PRINT when one gives PRINT from SPOOL REQUEST(sp01)
hoping to give some quick pointsHi,
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
or
*& Report ZSPOOLTOPDF *
*& Converts spool request into PDF document and emails it to *
*& recipicant. *
*& Execution *
*& This program must be run as a background job in-order for the write *
*& commands to create a Spool request rather than be displayed on *
*& screen *
REPORT zspooltopdf.
PARAMETER: p_email1 LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_sender LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_delspl AS CHECKBOX.
*DATA DECLARATION
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'.
*START-OF-SELECTION.
START-OF-SELECTION.
Write statement to represent report output. Spool request is created
if write statement is executed in background. This could also be an
ALV grid which would be converted to PDF without any extra effort
WRITE 'Hello World'.
new-page.
commit work.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
Alternative way could be to submit another program and store spool
id into memory, will be stored in sy-spono.
*submit ZSPOOLTOPDF2
to sap-spool
spool parameters %_print
archive parameters %_print
without spool dynpro
and return.
Get spool id from program called above
IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
PERFORM convert_spool_to_pdf.
PERFORM process_email.
if p_delspl EQ 'X'.
PERFORM delete_spool.
endif.
IF sy-sysid = c_dev.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool',
'request to be created.'.
ENDIF.
FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
FORM get_job_details *
FORM get_job_details.
Get current job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM.
FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_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.
ENDFORM.
FORM process_email *
FORM process_email.
DESCRIBE TABLE it_mess_att LINES gd_recsize.
CHECK gd_recsize > 0.
PERFORM send_email USING p_email1.
perform send_email using p_email2.
ENDFORM.
FORM send_email *
--> p_email *
FORM send_email USING p_email.
CHECK NOT ( p_email IS INITIAL ).
REFRESH it_mess_bod.
Default subject matter
gd_subject = 'Subject'.
gd_attachment_desc = 'Attachname'.
CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
it_mess_bod = 'Message Body text, line 1'.
APPEND it_mess_bod.
it_mess_bod = 'Message Body text, line 2...'.
APPEND it_mess_bod.
If no sender specified - default blank
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_mess_bod
it_mess_att
using p_email
'Example .xls documnet attachment'
'PDF'
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
changing gd_error
gd_reciever.
ENDFORM.
FORM delete_spool *
FORM delete_spool.
DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
ld_spool_nr = gd_spool_nr.
CHECK p_delspl <> c_no.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = ld_spool_nr.
ENDFORM.
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
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-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
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.
Regards,
Kumar -
Text Missing when using PDF Convert but OK when using print PDF
I am using Acrobat Pro 9 in Wnidows 7 and Microsoft Publisher 2003.
When I use the CONVERT command to create a PDF - it is missing all of the text on the master page.
If I create the PDF with the PRINT command - everything is OK.
PS: The same Publisher File on another computer using Acrobat Pro 8 works fine - CONVERT or PRINT and no missing text
I prefer to use convert because sometimes the PRINT command drops some of the hyperlinks.
[email protected]You're posting in the wrong forum, but you already know that...
In any case, if you're running XP (you didn't supply any info about your environment, which is critical), there's a Microsoft HotFIX patch for PostScript printers such as Acrobat to fix the missing text problem. Do a Google for "Framemaker hotfix missing text" to locate the patch. -
Explorer Context Menu Convert Sends Files to the Printer
Right-clicking PSD files and choosing "convert to PDF" sent the files to the printer!!! I had hoped it would have brought up a dialog to convert the files to PDF...
(I was looking for "combine as PDF" -- I'm not sure what happened to it?)
I'm running Acrobat 11 on Windows 8.1
-DonaldAll that context menu stuff is handled by the registry. The explorer application simply gets its information from there. So Labview can write to a registry key to add itself to handle a file type. This is why you can have multiple applications handle the same type and show up in the context menu.
My point is that after I run LV 8.0, I will see both LV 8.2 and LV8.0 in the context menu (along with a couple of others). However, after I run LV 8.2, the LV8.0 option is removed. I'm guessing that this is related to a program's behavior in checking and setting the registry key to make sure that it is the default handler for the appropriate file types. NI would need to strengthen this code to be sensitive to previous versions of Labview.
A rough example of how to do this is at http://www.codeproject.com/w2k/extendingshell.asp
Brian Rose -
No "convert to pdf " and no " print to pdf " option after install
I installed adobe acrobat reader professional 8 at home ( WIN 7 ) and everything works great there, but after installing it at work ( WIN 7 ) i have no option when i right click a file in the drop down menu that says " convert to adobe pdf ", and also in word i have no option to " Print to PDF " in the printer menu.
Thoses options are on my home PC but not work PC ? the only thing i can think of is a USER RESTRICTION that is in place that does not give my user account the option to use thoses two options ?
Im I wrong ? and if so how can i get thoses options at work like i have at home ?
TY for any help givingcyberskin99 wrote:
I installed adobe acrobat reader professional 8
First, you either have Adobe Acrobat Pro 8 Or Adobe Reader 8. Acrobat Reader Professional 8 does not exist.
If you have Acrobat, we'll try and work this out. If you have Reader, you don't get either of those items since it's made for viewing/printing PDF's.
My suggestion is to open the application you installed then go to the Help dropdown and see whether it says Acrobat or Reader. Also, be sure you don't have both products installed since that could cause similar issues as this.
Maybe you are looking for
-
Using Pages 5.5 How do I enable (view) file extensions? Thanks!
-
have a 2nd generation ipod touch and the screen is severely cracked have mangaged to access the ipod but cannot accept the terms and conditions as the screen is unresponsive where the accept button is. Can i accept the terms and conditions on itunes
-
Error while compiling hello world cpp file in ubuntu lucid
Hi all, I am trying to compile the helloworld.cpp file in ubuntu lucid using the following command: $ CC -compat=g -o helloworld helloworld.cpp "/usr/include/c++/4.4/x86_64-linux-gnu/bits/c++locale.h", line 86: Error: Formal argument 1 of type __va_l
-
Hi, Is there any way to import a radar / spider chart to apex? I've seen that at anychart.com they have radar charts but i don't know how to import them to my application. Thak you, Alex.
-
I can not open my downloaded apps
i just updated my phone last night. this morning my son played a new game that was also dowloaded last night. now i can not open any of my downloaded apps on the phone. i have shut off my phone three times trying to reset it. can anyone help?