Export selected items on each page in InDesign to JPEG
Hi All,
I have InDesign CS5.5. I have a document with more than 50 pages and each page has unique image and the description for image.
I need to export each page as JPEG. but i don't want to export full page. i need only the items on each page. So i go to each page and select all the items and export. while exporting i use the same name of the image used in each page.
I tried writing a script but it exports only the active page. i do not know how to navigate to the next page and export.
is some one can help.
below is my script.
var myDoc = app.activeDocument;
var myNumPages = myDoc.pages.length; //get the number of pages
var myFilePath = myDoc.filePath; //get the file path
var myRectangle = app.activeWindow.activePage.allGraphics; //get the graphics of the active page
var myPageName = app.activeWindow.activePage.name; //get the page name.
if(myRectangle.length >1)
alert("the page has more than one image. Delete the other image to export");
exit();
var myImageName = myRectangle[0].itemLink.name; //get the name of the image
app.select(NothingEnum.NOTHING);
for(var i=0; i<myNumPages; i++)
app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.high;
app.jpegExportPreferences.exportResolution = 300;
app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.exportRange;
app.jpegExportPreferences.pageString = myPageName;
mySelectedItems();
function mySelectedItems()
var myObj = new Array;
myObj = app.activeWindow.activePage.pageItems;
try
app.activeWindow.activePage.groups.add(myObj);
catch(e)
app.select(app.activeWindow.activePage.allPageItems);
app.selection[0].exportFile(ExportFormat.JPG, File(myFilePath+"/"+myImageName+".JPEG"), false);
export all image of each page try like this
var myDoc = app.activeDocument;
var myFolder = myDoc.filePath;
var myImage = myDoc.allGraphics;
for (var i=0; myImage.length>i; i++){
app.select(myImage[i]);
var MyImageNmae = myImage[i].itemLink.name;
app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.high;
app.jpegExportPreferences.exportResolution = 300;
app.selection[0].exportFile(ExportFormat.JPG, File(myFolder+"/"+MyImageNmae+".JPEG"), false);
alert(myImage[i].itemLink.name)
Similar Messages
-
Hello Experts,
I am issuing the output of the shipment through VT02N. Both Print program and the form are customized(Z).
The form contains two pages each with different layouts.
<b>First page to print the item
Second page is to print an Acknowledgement</b>
My requirement is If the Shipment has the two items of two <b>different delivery address</b> then I have print the item in each page like
Page 1 - Item 1
Page 2 - Ackonwledgement
Page 3 - Item 2
Page 4 - Ackonwledgement and so on.
SImilarly if the shippment has 5 items and with same Delivery address then I have print all the 5 items in the same page.
I have tried with New-Page option but it is not solving my requirement.
Hope the requirement is clear.
Could anyone please suggest a solution for this Issue.
Thanks in Advance.
VasanthHello Goutham,
This is my code:
REPORT Z48V_RV56TD00.
SET EXTENDED CHECK OFF.
*---------------------------------------------------------------Tables
TABLES: ADCP, "Zuordnung Person/Adresse
ADR6, "SMTP-Nummern
ADR7, "Remote-Mail-Adressen
ADRP, "Personen
LIKP, "Lieferung: Kopfdaten
LIPS, "Lieferung: Positionsdaten
MAKT, "
T001, "Buchungskreise
T005, "Länder
T006A, "Maßeinheit
THEAD, "SAPscript: Text-Header
TVKO,
TTXER, "Textverarbeitung: Text-Id-Gruppen
TTXIT, "Texte zu Text-Id's
SADR, "Adressverwaltung: Firmendaten
STXH, "SAPscript Text-Datei Header
USR21, "Zuord. Benutzer zu Adressschlussel
VBDDL, "Druckview für Versandtermine
VBPLA, "allgemeine Transportdaten
Z48V_INCOTEXT "spezielle Textbausteine zu Incoterms
"z00_sd_vstel_dru
INCLUDE VTTKDATA. "Shipment Header
INCLUDE VTTSDATA. "Shipment Segment
INCLUDE VTTPDATA. "Shipment Items
INCLUDE VBPADATA. "Partner
INCLUDE VTFADATA. "Flow
INCLUDE SADRDATA. "Address
INCLUDE VTLFDATA. "Delivery Selection
INCLUDE RVADTABL. "Messages
INCLUDE VSEDATA. "shipping units
INCLUDE RV56ACOM. "I/O-Structure
SET EXTENDED CHECK ON.
*------------------------------------------------------------Constants
CONSTANTS: NO(1) VALUE SPACE,
YES(1) VALUE 'X'.
*----------------------------------------------------------Hilfsfelder
DATA: XSCREEN(1) TYPE C,
RETCODE LIKE SY-SUBRC VALUE 0,
THERE_WAS_OUTPUT(1) TYPE C VALUE SPACE,
NEW_PAGE_WAS_ORDERED(1) TYPE C VALUE SPACE.
DATA: BEGIN OF ITAB OCCURS 0,
VPOBJKEY LIKE VBPLK-VPOBJKEY,
* 001 vsm1kor 09.08.07 - sn OPL 1815
KUNWE LIKE VTTS-KUNNZ,
* 001 vsm1kor 09.08.07 - sn OPL 1815
BRGEW LIKE VBPLK-BRGEW,
LAENG LIKE VBPLK-LAENG,
BREIT LIKE VBPLK-BREIT,
HOEHE LIKE VBPLK-HOEHE,
MEABM LIKE VBPLK-MEABM,
VOLEH LIKE VBPLK-VOLEH,
GEWEI LIKE VBPLK-GEWEI,
GEWEI_MAX LIKE VBPLK-GEWEI_MAX,
VEBEZ LIKE VBPLK-VEBEZ,
VSTEL LIKE VBPLK-VSTEL,
VENUM LIKE VBPLK-VENUM,
VHILM LIKE VBPLK-VHILM,
END OF ITAB.
DATA: W-ITAB LIKE ITAB.
* 001 vsm1kor 09.08.07 - sn OPL 1815
DATA: GV_KUNWE LIKE VTTS-KUNNZ.
DATA: BEGIN OF G_T_KUNWE OCCURS 0,
KUNWE LIKE VTTS-KUNNZ,
TDNAME(10),
END OF G_T_KUNWE.
* 001 vsm1kor 09.08.07 - en OPL 1815
DATA: TB_COLLI LIKE SLK-ANZPK.
*DATA: tb_brgew LIKE vbplk-brgew.
DATA: TB_ABMES(33).
DATA: TB_LAENG(10).
DATA: TB_BREIT(10).
DATA: TB_HOEHE(10).
DATA: TB_SAVE-GEWEI LIKE VBPLK-GEWEI.
DATA: TB_VSTEL1 LIKE TVST-VSTEL.
DATA: TB_VSTEL2 LIKE TVST-VSTEL.
DATA: TB_VSTEL3 LIKE TVST-VSTEL.
DATA: TB_ADRC1 LIKE ADRC.
DATA: TB_ADRC2 LIKE ADRC.
DATA: TB_ADRC3 LIKE ADRC.
DATA: TB_TDNAME(10).
DATA: TB_KZVST.
DATA: TB_NETWR LIKE SLK-NETWR.
DATA: TB_VOLUM TYPE P DECIMALS 3.
DATA: BEGIN OF IT_VSTEL OCCURS 0,
VSTEL LIKE XVTTP-VSTEL,
END OF IT_VSTEL.
DATA: TB_PSVON LIKE VBPLK-VENUM.
DATA: TB_PSBIS LIKE VBPLK-VENUM.
DATA: TB_VENUM(10).
DATA: TB_KZSPD.
DATA: TB_WETXT.
DATA: TB_TABIX LIKE SY-TABIX.
DATA: BEGIN OF W,
LSNUM LIKE LIKP-VBELN,
LSANZPK LIKE SLK-ANZPK,
VPOBJKEYALT LIKE VBPLK-VPOBJKEY,
SUM1 LIKE VBPLK-BRGEW,
SUM2 LIKE VBPLK-BRGEW,
SUM3 LIKE VBPLK-BRGEW,
ELEMENT(30),
END OF W.
DATA: W_SPED LIKE ADDR1_VAL.
DATA: G_TITLE_MEDI LIKE TSAD3T-TITLE_MEDI.
* FORM ENTRY *
* Called from the Output Controll program *
* --> RETURN_CODE Status *
* --> US_SCREEN *
FORM ENTRY USING RETURN_CODE LIKE SY-SUBRC "#EC CALLED
US_SCREEN TYPE C. "#EC CALLED
RETURN_CODE = 1.
PERFORM DATA_INIT USING US_SCREEN.
PERFORM GET_DATA.
CHECK RETCODE EQ 0.
PERFORM OPEN_FORM USING US_SCREEN.
CHECK RETCODE EQ 0.
LOOP AT G_T_KUNWE.
* IF SY-TABIX EQ 1.
PERFORM PRINT_DOCUMENT.
CHECK RETCODE EQ 0.
* ELSE.
* PERFORM START_FORM.
* CHECK RETCODE EQ 0.
* PERFORM PRINT_DOCUMENT.
* CHECK RETCODE EQ 0.
* PERFORM END_FORM.
* CHECK RETCODE EQ 0.
* ENDIF.
ENDLOOP.
PERFORM CLOSE_FORM.
CHECK RETCODE EQ 0.
RETURN_CODE = 0.
ENDFORM.
* FORM data_init *
FORM DATA_INIT USING VALUE(US_SCREEN) TYPE C.
XSCREEN = US_SCREEN.
CLEAR:
RETCODE,
THERE_WAS_OUTPUT,
NEW_PAGE_WAS_ORDERED.
ENDFORM.
* FORM GET_DATA *
FORM GET_DATA.
DATA LANGUAGE LIKE NAST-SPRAS.
DATA SHIPMENT_NUMBER LIKE VTTK-TKNUM.
LANGUAGE = NAST-SPRAS.
SHIPMENT_NUMBER = NAST-OBJKY.
CALL FUNCTION 'RV_SHIPMENT_PRINT_VIEW'
EXPORTING
SHIPMENT_NUMBER = SHIPMENT_NUMBER
OPTION_TVTK = 'X' "Shipmenttype J/N
OPTION_TTDS = 'X' "Disposition J/N
LANGUAGE = LANGUAGE
OPTION_ITEMS = 'X' "Transport Items J/N
OPTION_SEGMENTS = 'X' "Transport Segments J/N
OPTION_PARTNERS = 'X' "Partners J/N
OPTION_SALES_ORDERS = 'X' "Sales orders J/N
OPTION_EXPORT_DATA = 'X' "Export data J/N
OPTION_PACKAGES = 'X' "Packages J/N
OPTION_FLOW = ' ' "Flow J/N
OPTION_NO_REFRESH = ' ' "Refresh Tables J/N
IMPORTING
F_VTTKVB = VTTKVB "Shipment Header
F_TVTK = TVTK "Shipmenttype
F_TVTKT = TVTKT "Description Shipmenttype
F_TTDS = TTDS "Disposition
F_TTDST = TTDST "Description Disposition
F_VBPLA = VBPLA "Packages
TABLES
F_VTTP = XVTTP "Shipment Items
F_TRLK = SLK "Delivery
F_TRLP = SLP "Delivery Item
F_VTTS = XVTTS "Shipment Segments
F_VTSP = XVTSP "Segments/Items
F_VBPA = XVBPA "Partner
F_VBADR = XVBADR "Address
F_VTFA = XVTFA "Flow
F_VBPLK = XVBPLK "Shipment Unit Header
F_VBPLP = XVBPLP "Shipment Unit
F_VBPLS = XVBPLS "Shipment Unit Sum
EXCEPTIONS
NOT_FOUND = 1.
IF SY-SUBRC NE 0.
SYST-MSGID = 'VW'.
SYST-MSGNO = '010'.
SYST-MSGTY = 'E'.
SYST-MSGV1 = DBVTTK-TKNUM.
SYST-MSGV2 = SY-SUBRC.
RETCODE = 1.
PERFORM PROTOCOL_UPDATE.
ENDIF.
CHECK RETCODE EQ 0.
* SORT SEGMENTS BY CORRECT ORDER (I.E. TSRFO)
SORT XVTTS BY TSRFO.
* CONVERT UNITS IN DELIVERIES AND DELIVERY-ITEMS
* TO BE CONFORM TO VTTK-UNITS:
LOOP AT SLK.
* 001 vsm1kor 09.08.07 - sn OPL 1815
G_T_KUNWE-KUNWE = SLK-KUNWE.
G_T_KUNWE-TDNAME = SLK-TDNAME.
APPEND G_T_KUNWE.
* 001 vsm1kor 09.08.07 - en OPL 1815
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = SLK-BTGEW
UNIT_IN = SLK-GEWEI
UNIT_OUT = VTTKVB-DTMEG
IMPORTING
OUTPUT = SLK-BTGEW.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = SLK-NTGEW
UNIT_IN = SLK-GEWEI
UNIT_OUT = VTTKVB-DTMEG
IMPORTING
OUTPUT = SLK-NTGEW.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = SLK-VOLUM
UNIT_IN = SLK-VOLEH
UNIT_OUT = VTTKVB-DTMEV
IMPORTING
OUTPUT = SLK-VOLUM.
SLK-GEWEI = VTTKVB-DTMEG.
SLK-VOLEH = VTTKVB-DTMEV.
MODIFY SLK.
ADD SLK-NETWR TO TB_NETWR.
ENDLOOP.
* 001 vsm1kor 09.08.07 - sn OPL 1815
IF NOT G_T_KUNWE[] IS INITIAL.
SORT G_T_KUNWE.
DELETE ADJACENT DUPLICATES FROM G_T_KUNWE COMPARING KUNWE.
ENDIF.
* 001 vsm1kor 09.08.07 - en OPL 1815
LOOP AT SLP.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = SLP-BRGEW
UNIT_IN = SLP-GEWEI
UNIT_OUT = VTTKVB-DTMEG
IMPORTING
OUTPUT = SLP-BRGEW.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = SLP-NTGEW
UNIT_IN = SLP-GEWEI
UNIT_OUT = VTTKVB-DTMEG
IMPORTING
OUTPUT = SLP-NTGEW.
SLP-GEWEI = VTTKVB-DTMEG.
MODIFY SLP.
ENDLOOP.
PERFORM GET_ERFASSER.
LOOP AT XVBPLK.
"SELECT SINGLE * FROM z00_sd_vstel_dru WHERE vstel = xvbplk-vstel.
"IF sy-subrc = 0 AND NOT z00_sd_vstel_dru-vstel_d IS INITIAL.
" it_vstel-vstel = z00_sd_vstel_dru-vstel_d.
"ELSE.
IT_VSTEL-VSTEL = XVBPLK-VSTEL.
"ENDIF.
XVBPLK-VSTEL = IT_VSTEL-VSTEL.
MODIFY XVBPLK.
COLLECT IT_VSTEL.
ENDLOOP.
SORT IT_VSTEL BY VSTEL.
TB_TDNAME = VTTKVB-TKNUM.
PERFORM ERMITTELN_SPED_ADRESSE.
SELECT SINGLE * FROM TVKO INTO TVKO
WHERE VKORG = SLK-VKORG.
CLEAR: T001W.
SELECT SINGLE * FROM T001W WHERE WERKS = SLK-WERKS.
CLEAR: T001.
SELECT SINGLE * FROM T001 WHERE BUKRS = TTDS-BUKRS.
* Ermitteln Text Ausfuhrkontrollmeldung
CLEAR: T005, TB_KZVST.
SELECT SINGLE * FROM T005 WHERE LAND1 = SLK-LAND1.
IF SY-SUBRC = 0 AND T005-XEGLD = ''.
TB_KZVST = 'X'.
ENDIF.
ENDFORM.
* FORM PRINT_DOCUMENT *
FORM PRINT_DOCUMENT.
* Ermitteln und ausgeben der Beladstelle
PERFORM AUSGEBEN_BELADESTELLE.
* Ausgeben der Empfaenger und Kundenadresse
PERFORM AUSGEBEN_EMPF_KUNDE.
* Ausgeben Rechnungsempfänger
PERFORM AUSGEBEN_RE.
* Ausgeben der Verpackungsdaten
PERFORM AUSGEBEN_VERPACKUNG.
* Ausgeben der Versandbedigungen
PERFORM AUSGEBEN_VERSANDBEDINGUNG.
* Ausgeben des Versendervermerks
PERFORM AUSGEBEN_VERSENDERVERMERK.
* Ausgeben der Ausfuhrkontrollmeldung
W-ELEMENT = 'AUSFUHRKONTROLLMELDUNG'.
PERFORM WRITE_ELEMENT.
* Ausgeben der Anlagen
W-ELEMENT = 'ANLAGEN'.
PERFORM WRITE_ELEMENT.
* Ausgeben des Uebernahmetextes
IF TTDS-BUKRS EQ '1060'.
W-ELEMENT = 'UEBERNAHMETEXT'.
PERFORM WRITE_ELEMENT.
ENDIF.
* Ausgeben Luftfrachterklärung I1.2
IF VTTKVB-VSART = '05' "Luftfracht
OR VTTKVB-VSART = '17'. "Luftfrachtsammelverkehr
W-ELEMENT = 'LUFTFRACHTERKL'.
PERFORM WRITE_ELEMENT.
ENDIF.
* Ausgeben Kopftext
W-ELEMENT = 'TEXT'.
PERFORM WRITE_ELEMENT.
ENDFORM.
* FORM OPEN_FORM *
* --> VALUE(US_SCREEN) Output on screen *
* ' ' = printer *
* 'X' = screen *
FORM OPEN_FORM USING VALUE(US_SCREEN) TYPE C.
DATA US_COUNTRY LIKE T005-LAND1.
PERFORM GET_SENDER_COUNTRY USING US_COUNTRY.
CHECK RETCODE EQ 0.
INCLUDE RVADOPFO.
ENDFORM.
* FORM Get_Sender_Country
* Determines the country of the transport-disposition-unit *
FORM GET_SENDER_COUNTRY USING SENDER_COUNTRY LIKE T005-LAND1.
* data:
* l_addr1_sel like addr1_sel.
DATA: L_VBADR LIKE VBADR.
DATA: L_VBPA LIKE VBPA.
LOOP AT XVBPA WHERE VBELN = NAST-OBJKY AND
PARVW = NAST-PARVW.
SENDER_COUNTRY = XVBPA-LAND1.
EXIT.
ENDLOOP.
IF SY-SUBRC IS INITIAL AND SENDER_COUNTRY IS INITIAL.
L_VBPA = XVBPA.
CALL FUNCTION 'VIEW_VBADR'
EXPORTING
INPUT = L_VBPA
PARTNERNUMMER = NAST-PARNR
IMPORTING
ADRESSE = L_VBADR.
SENDER_COUNTRY = L_VBADR-LAND1.
ENDIF.
ENDFORM.
* FORM CLOSE_FORM *
FORM CLOSE_FORM.
CALL FUNCTION 'CLOSE_FORM'
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC NE 0.
RETCODE = SY-SUBRC.
PERFORM PROTOCOL_UPDATE.
ENDIF.
SET COUNTRY SPACE.
ENDFORM.
* FORM PROTOCOL_UPDATE *
* The messages are collected for the processing protocol. *
FORM PROTOCOL_UPDATE.
IF XSCREEN = SPACE.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
MSG_ARBGB = SYST-MSGID
MSG_NR = SYST-MSGNO
MSG_TY = SYST-MSGTY
MSG_V1 = SYST-MSGV1
MSG_V2 = SYST-MSGV2
MSG_V3 = SYST-MSGV3
MSG_V4 = SYST-MSGV4.
ELSE.
MESSAGE ID SYST-MSGID TYPE 'I' NUMBER SYST-MSGNO
WITH SYST-MSGV1 SYST-MSGV2 SYST-MSGV3 SYST-MSGV4.
ENDIF.
ENDFORM.
* FORM get_erfasser *
FORM GET_ERFASSER.
* Lesen der Adressnummer zum Benutzer
SELECT SINGLE * FROM USR21 WHERE BNAME = VTTKVB-ERNAM.
IF SY-SUBRC <> 0.
SELECT * FROM ADR7 WHERE UNAME = VTTKVB-ERNAM
AND DATE_FROM <= SY-DATUM
ORDER BY CONSNUMBER DESCENDING.
EXIT.
ENDSELECT.
CHECK SY-SUBRC = 0.
USR21-BNAME = ADR7-UNAME.
USR21-PERSNUMBER = ADR7-PERSNUMBER.
USR21-ADDRNUMBER = ADR7-ADDRNUMBER.
ENDIF.
* Lesen allgemeine Adressedaten Benutzer
SELECT * FROM ADRP WHERE PERSNUMBER = USR21-PERSNUMBER
AND DATE_FROM <= SY-DATUM
ORDER BY DATE_FROM DESCENDING.
EXIT.
ENDSELECT.
CHECK SY-SUBRC = 0.
* Lesen weiter Adressdaten Benutzer
SELECT * FROM ADCP WHERE PERSNUMBER = USR21-PERSNUMBER
AND DATE_FROM <= SY-DATUM
AND COMP_PERS = 'C'
ORDER BY DATE_FROM DESCENDING.
EXIT.
ENDSELECT.
CHECK SY-SUBRC = 0.
* Lesen Email-Adresse
SELECT * FROM ADR6 WHERE ADDRNUMBER = USR21-ADDRNUMBER
AND PERSNUMBER = USR21-PERSNUMBER
AND DATE_FROM <= SY-DATUM
ORDER BY DATE_FROM DESCENDING.
EXIT.
ENDSELECT.
ENDFORM. " GET_ERFASSER
*& Form AUSGEBEN_BELADESTELLE
FORM AUSGEBEN_BELADESTELLE.
FIELD-SYMBOLS: <F>.
DATA: TB_FIELD(20).
CLEAR: TB_VSTEL1, TB_VSTEL2, TB_VSTEL3,
TB_ADRC1, TB_ADRC2, TB_ADRC3.
LOOP AT IT_VSTEL.
IF SY-TABIX > 3.
EXIT.
ENDIF.
TB_FIELD = 'TB_VSTEL'.
TB_FIELD+8(1) = SY-TABIX.
ASSIGN (TB_FIELD) TO <F>.
<F> = IT_VSTEL-VSTEL.
SELECT SINGLE * FROM TVST WHERE VSTEL = IT_VSTEL-VSTEL.
CHECK SY-SUBRC = 0.
TB_FIELD = 'TB_ADRC'.
TB_FIELD+7(1) = SY-TABIX.
ASSIGN (TB_FIELD) TO <F>.
SELECT * FROM ADRC INTO <F>
WHERE ADDRNUMBER = TVST-ADRNR
AND DATE_FROM <= SY-DATUM
AND DATE_TO >= SY-DATUM
ORDER BY DATE_FROM DESCENDING.
EXIT.
ENDSELECT.
ENDLOOP.
*>>> INS BO88WA2 Ansteuerung Ausgabeschacht
W-ELEMENT = 'SCHACHT_STEUERN'.
PERFORM WRITE_ELEMENT.
*<<< INS BO88WA2
SELECT SINGLE * FROM STXH
WHERE TDNAME = VTTKVB-TKNUM
AND TDOBJECT = 'VTTK'
AND TDID = 'CM13'.
IF SY-SUBRC = 0.
W-ELEMENT = 'BELADESTELLE1'.
ELSE.
W-ELEMENT = 'BELADESTELLE2'.
ENDIF.
PERFORM WRITE_ELEMENT.
ENDFORM. " AUSGEBEN_BELADESTELLE
*& Form ERMITTELN_SPED_ADRESSE
FORM ERMITTELN_SPED_ADRESSE.
CLEAR: LFA1, TB_KZSPD.
*> SELECT SINGLE * FROM lfa1 WHERE lifnr = vttkvb-tdlnr.
* Pruefen Spediteur-Adresse in Text
SELECT SINGLE * FROM STXH WHERE TDOBJECT = 'VTTK'
AND TDNAME = TB_TDNAME
AND TDID = '0003'
AND TDSPRAS = NAST-SPRAS.
IF SY-SUBRC = 0.
TB_KZSPD = 'X'.
EXIT.
ENDIF.
DATA:
ADDR_SEL LIKE ADDR1_SEL,
W_SADR LIKE SADR
SELECT SINGLE ADRNR FROM VTPA INTO ADDR_SEL-ADDRNUMBER
WHERE VBELN = VTTKVB-TKNUM
AND POSNR = SPACE
AND PARVW = 'SP'.
CHECK SY-SUBRC = 0.
CALL FUNCTION 'ADDR_GET'
EXPORTING
ADDRESS_SELECTION = ADDR_SEL
* ADDRESS_GROUP =
* READ_SADR_ONLY = ' '
* READ_TEXTS = ' '
IMPORTING
ADDRESS_VALUE = W_SPED
* ADDRESS_ADDITIONAL_INFO =
* RETURNCODE =
* ADDRESS_TEXT =
SADR = W_SADR
* TABLES
* ADDRESS_GROUPS =
* ERROR_TABLE =
* VERSIONS =
EXCEPTIONS
PARAMETER_ERROR = 1
ADDRESS_NOT_EXIST = 2
VERSION_NOT_EXIST = 3
INTERNAL_ERROR = 4
OTHERS = 5.
BREAK BO88WA2.
CLEAR G_TITLE_MEDI.
IF NOT W_SPED-TITLE IS INITIAL.
SELECT SINGLE TITLE_MEDI
INTO G_TITLE_MEDI
FROM TSAD3T
WHERE LANGU EQ NAST-SPRAS
AND TITLE EQ W_SPED-TITLE.
ENDIF.
ENDFORM. " ERMITTELN_SPED_ADRESSE
*& Form UMRECHNEN
FORM UMRECHNEN USING P_IWERT
P_OWERT
P_IMEIN LIKE T006-MSEHI
P_OMEIN LIKE T006-MSEHI.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = P_IWERT
UNIT_IN = P_IMEIN
UNIT_OUT = P_OMEIN
IMPORTING
OUTPUT = P_OWERT
EXCEPTIONS
CONVERSION_NOT_FOUND = 1
DIVISION_BY_ZERO = 2
INPUT_INVALID = 3
OUTPUT_INVALID = 4
OVERFLOW = 5
TYPE_INVALID = 6
UNITS_MISSING = 7
UNIT_IN_NOT_FOUND = 8
UNIT_OUT_NOT_FOUND = 9
OTHERS = 10.
ENDFORM. " UMRECHNEN
*& Form AUSGEBEN_EMPF_KUNDE
FORM AUSGEBEN_EMPF_KUNDE.
CLEAR: SLK.
* 001 vsm1kor 09.08.07 - sm " OPL 1815
* READ TABLE SLK INDEX 1.
READ TABLE SLK WITH KEY KUNWE = G_T_KUNWE-KUNWE.
* 001 vsm1kor 09.08.07 - em " OPL 1815
CLEAR: KNA1, TB_WETXT.
SELECT SINGLE * FROM KNA1 WHERE KUNNR = SLK-KUNWE.
SELECT SINGLE * FROM STXH WHERE TDOBJECT = 'VTTK'
AND TDNAME = VTTKVB-TKNUM
AND TDID = 'Z002'
AND TDSPRAS = NAST-SPRAS.
IF SY-SUBRC = 0.
TB_WETXT = 'X'.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ADRESSE_EMPF'.
"IF slk-adrnr_ag <> slk-adrnr_we.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ADRESSE_KUNDE'.
"ENDIF.
ENDFORM. " AUSGEBEN_EMPF_KUNDE
*& Form AUSGEBEN_VERPACKUNG
FORM AUSGEBEN_VERPACKUNG.
DATA:
WA_ITAB_LAST TYPE ITAB.
PERFORM GET_BFART_TEXT. "BT82FE
W-ELEMENT = 'ITEM_HEADER'.
PERFORM WRITE_ELEMENT.
BREAK BO88WA2.
LOOP AT XVBPLK. "Übetr. relevantes wegen Sortierfolge "BT82FE
IF XVBPLK-UEVEL IS INITIAL.
MOVE-CORRESPONDING XVBPLK TO ITAB.
* 001 vsm1kor 09.08.07 - sn OPL 1815
READ TABLE XVTTP WITH KEY VBELN = XVBPLK-VPOBJKEY.
IF SY-SUBRC EQ 0.
ITAB-KUNWE = XVTTP-KUNWE.
ENDIF.
* 001 vsm1kor 09.08.07 - en OPL 1815
APPEND ITAB.
ENDIF.
ENDLOOP.
SORT ITAB BY VPOBJKEY KUNWE BRGEW LAENG BREIT HOEHE MEABM.
* 001 vsm1kor 09.08.07 - en OPL 1815
DELETE ITAB WHERE KUNWE NE G_T_KUNWE-KUNWE.
* 001 vsm1kor 09.08.07 - en OPL 1815
* SORT itab by vhilm laeng breit hoehe meabm brgew .
CLEAR W.
CLEAR: TB_COLLI.
LOOP AT ITAB.
W-ITAB = ITAB.
AT NEW VPOBJKEY. "Anzahl Packungen holen "BT82FE
PERFORM GET_ANZPACK.
ENDAT. "BT82FE
**--- AT NEW BO88WA2
* if wa_itab_last-vhilm ne itab-vhilm or
* wa_itab_last-laeng ne itab-laeng or
* wa_itab_last-breit ne itab-breit or
* wa_itab_last-hoehe ne itab-hoehe or
* wa_itab_last-brgew ne itab-brgew.
* perform get_anzpack.
* endif.
PERFORM PRUEFEN_PACKELEMENT.
CHECK SY-SUBRC = 0.
PERFORM GET_MATTEXT_UND_UMRECHNEN.
ADD ITAB-BRGEW TO W-SUM1.
ADD ITAB-BRGEW TO W-SUM2.
ADD ITAB-BRGEW TO W-SUM3.
* AT END OF brgew.
AT END OF MEABM.
TB_SAVE-GEWEI = ITAB-GEWEI.
W-ELEMENT = 'ITEM_LINE'.
PERFORM WRITE_ELEMENT.
CLEAR: W-SUM1, W-SUM2.
ENDAT.
AT END OF VPOBJKEY.
W-ELEMENT = 'LS_SUM'.
PERFORM WRITE_ELEMENT.
CLEAR:W-SUM1, W-SUM2.
ENDAT.
**--- Nächstes Record lesen
* ADD 1 TO l_index.
* READ TABLE l_t_verpdat INTO l_r_verpdat_next INDEX l_index.
* IF sy-subrc NE 0 OR
AT LAST.
W-ELEMENT = 'ITEM_SUM'.
PERFORM WRITE_ELEMENT.
ENDAT.
ENDLOOP.
REFRESH ITAB.
ENDFORM. " AUSGEBEN_VERPACKUNG
*& Form AUSGEBEN_VERSANDBEDINGUNG
FORM AUSGEBEN_VERSANDBEDINGUNG.
"TABLES: z00_sd_slvs.
* Ermitteln Versandbedingung
CLEAR: T173T.
IF VTTKVB-VSART IS INITIAL.
IF VTTKVB-VSART IS INITIAL AND NOT VTTKVB-ROUTE IS INITIAL.
SELECT SINGLE * FROM TVRO WHERE ROUTE = VTTKVB-ROUTE.
CHECK SY-SUBRC = 0.
SELECT SINGLE * FROM T173T WHERE SPRAS = NAST-SPRAS
AND VSART = TVRO-VSART.
ELSE.
SELECT SINGLE * FROM T173T WHERE SPRAS = NAST-SPRAS
AND VSART = VTTKVB-VSART.
ENDIF.
ELSE.
SELECT SINGLE * FROM T173T WHERE SPRAS = NAST-SPRAS
AND VSART = VTTKVB-VSART.
ENDIF.
* Ermitteln Versicherungstext abhaengig von Incoterm
CLEAR: Z48V_INCOTEXT.
SELECT SINGLE * FROM Z48V_INCOTEXT WHERE INCO1 = SLK-INCO1.
* Ermitteln Versicherungswert
* CLEAR: z00_sd_slvs.
* SELECT * FROM z00_sd_slvs WHERE vswrt > tb_netwr
* ORDER BY vswrt ASCENDING.
* EXIT.
* ENDSELECT.
* IF sy-subrc = 0.
* tb_netwr = z00_sd_slvs-vswrt.
* ENDIF.
W-ELEMENT = 'VERSAND'.
PERFORM WRITE_ELEMENT.
ENDFORM. " AUSGEBEN_VERSANDBEDINGUNG
*& Form AUSGEBEN_VERSENDERVERMERK
FORM AUSGEBEN_VERSENDERVERMERK.
IF SLK-LAND1_WE <> 'DE'.
W-ELEMENT = 'VERSENDERVERMERK'.
PERFORM WRITE_ELEMENT.
ENDIF.
ENDFORM. " AUSGEBEN_VERSENDERVERMERK
*& Form AUSGEBEN_RE
FORM AUSGEBEN_RE.
SELECT SINGLE * FROM VBPA WHERE VBELN = SLK-VBELN
AND POSNR = '000000'
AND PARVW = 'RE'.
IF SY-SUBRC = 0.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ADRESSE_RE'.
ENDIF.
ENDFORM. " AUSGEBEN_RE
FORM GET_MATTEXT_UND_UMRECHNEN.
SELECT SINGLE * FROM MAKT WHERE MATNR = W-ITAB-VHILM
AND SPRAS = SY-LANGU.
PERFORM UMRECHNEN USING W-ITAB-BRGEW W-ITAB-BRGEW
W-ITAB-GEWEI_MAX 'KG'.
PERFORM UMRECHNEN USING W-ITAB-LAENG W-ITAB-LAENG
W-ITAB-MEABM 'CM'.
WRITE W-ITAB-LAENG TO TB_LAENG LEFT-JUSTIFIED DECIMALS 0.
PERFORM UMRECHNEN USING W-ITAB-BREIT W-ITAB-BREIT
W-ITAB-MEABM 'CM'.
WRITE W-ITAB-BREIT TO TB_BREIT LEFT-JUSTIFIED DECIMALS 0.
PERFORM UMRECHNEN USING W-ITAB-HOEHE W-ITAB-HOEHE
W-ITAB-MEABM 'CM'.
WRITE W-ITAB-HOEHE TO TB_HOEHE LEFT-JUSTIFIED DECIMALS 0.
SELECT SINGLE * FROM T006A WHERE SPRAS = NAST-SPRAS
AND MSEHI = W-ITAB-GEWEI_MAX.
IF SY-SUBRC <> 0.
T006A-MSEH6 = W-ITAB-GEWEI_MAX.
ENDIF.
CONCATENATE TB_LAENG TB_BREIT TB_HOEHE
INTO TB_ABMES SEPARATED BY 'x'.
IF W-ITAB-VEBEZ CA ' '.
IF SY-FDPOS <> 0.
W-ITAB-VEBEZ = W-ITAB-VEBEZ(SY-FDPOS).
ENDIF.
ENDIF.
READ TABLE IT_VSTEL WITH KEY VSTEL = W-ITAB-VSTEL.
ENDFORM.
FORM GET_ANZPACK.
READ TABLE SLK WITH KEY VBELN = W-ITAB-VPOBJKEY. "BT82FE
CHECK SY-SUBRC = 0. "BT82FE
ADD SLK-ANZPK TO TB_COLLI. "BT82FE
W-LSANZPK = SLK-ANZPK. "BT82FE
W-LSNUM = W-ITAB-VPOBJKEY+4(8). "BT82FE
ENDFORM.
*& Form PRUEFEN_PACKELEMENT
FORM PRUEFEN_PACKELEMENT.
TABLES: VBFA.
SELECT * FROM VBFA WHERE VBELV = W-ITAB-VPOBJKEY
AND VBELN = W-ITAB-VENUM
AND VBTYP_N = 'X'.
EXIT.
ENDSELECT.
ENDFORM. " PRUEFEN_PACKELEMENT
FORM WRITE_ELEMENT.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = W-ELEMENT
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
OTHERS = 8.
ENDFORM.
FORM GET_BFART_TEXT. "BT82FE
CALL FUNCTION 'SD_SHIPMENT_HEADER_DESCRIPTION'
EXPORTING
I_XVTTK = VTTKVB
* i_adrnr = vttk-adrnr
CHANGING
C_TXT_SHIPMENT_TYPE = TVTKT-BEZEI
C_TXT_PROCESSING_TYPE = RV56A-TXT_ABFER
C_TXT_PROCESS_CONTROL = RV56A-TXT_ABWST
C_TXT_SERVICE_LEVEL = RV56A-TXT_BFART.
* C_TXT_SHIPPING_TYPE = RV56A-TXT_VSART
* C_TXT_SHIP_TYP_PREL = RV56A-TXT_VSAVL
* C_TXT_SHIP_TYP_SUBS = RV56A-TXT_VSANL
* C_TXT_LEG_INDICATOR = RV56A-TXT_LAUFK
* C_TXT_SHIPPING_COND = RV56A-TXT_VSBED
* C_TXT_ROUTE = VTTKD-TXROU
* C_TXT_CARRIER = VTTKD-TXDIL
* C_TXT_OVERALL_STATUS = RV56A-TXT_STTRG
* C_ICON_OVERALL_STATUS = RV56A-TRG_AMPEL
* C_TXT_FREIGHT_COST_RELEVANCE = VTTK_TXT-FRKRL_TXT
* C_TXT_FREIGHT_CALC_STATUS = VTTK_TXT-FBSTA_TXT
* C_TXT_FREIGHT_SETT_STATUS = VTTK_TXT-ARSTA_TXT
* C_TXT_OVRL_FREIGHT_CALC_STATUS = VTTK_TXT-FBGST_TXT
* C_TXT_OVRL_FREIGHT_SETT_STATUS = VTTK_TXT-ARGST_TXT
* C_TXT_SPECIAL_PROCESSING = VTTK_TXT-SDABW_TXT
* C_TXT_PRICING_PROCEDURE = VTTK_TXT-KKALSM_TXT
* C_TXT_STATUS_PLANNED = RV56A-TXT_STDIS
* C_TXT_STATUS_REGISTRATED = RV56A-TXT_STREG
* C_TXT_STATUS_LOAD_START = RV56A-TXT_STLBG
* C_TXT_STATUS_LOAD_END = RV56A-TXT_STLAD
* C_TXT_STATUS_PROCESSING = RV56A-TXT_STABF
* C_TXT_STATUS_SHIPM_START = RV56A-TXT_STTBG
* C_TXT_STATUS_SHIPM_END = RV56A-TXT_STTEN
* C_ROUTID = VTTK_TXT-ROUTID
* C_TXT_LEG_DET_TYPE = RV56A-TXT_STERM
* C_TXT_ROUTE_STAGES = RV56A-TXT_ROTSTA
* C_TXT_ADD_INFO_1 = VTADD01T-BEZEI
* C_TXT_ADD_INFO_2 = VTADD02T-BEZEI
* C_TXT_ADD_INFO_3 = VTADD03T-BEZEI
* C_TXT_ADD_INFO_4 = VTADD04T-BEZEI.
ENDFORM.
*& Form START_FORM
* text
* --> p1 text
* <-- p2 text
FORM START_FORM.
CALL FUNCTION 'START_FORM'
* EXPORTING
* ARCHIVE_INDEX =
* FORM = ' '
* LANGUAGE = ' '
* STARTPAGE = ' '
* PROGRAM = ' '
* MAIL_APPL_OBJECT =
* IMPORTING
* LANGUAGE =
* EXCEPTIONS
* FORM = 1
* FORMAT = 2
* UNENDED = 3
* UNOPENED = 4
* UNUSED = 5
* SPOOL_ERROR = 6
* OTHERS = 7
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. " START_FORM
*& Form END_FORM
* text
* --> p1 text
* <-- p2 text
FORM END_FORM.
CALL FUNCTION 'END_FORM'
* IMPORTING
* RESULT =
* EXCEPTIONS
* UNOPENED = 1
* BAD_PAGEFORMAT_FOR_PRINT = 2
* SPOOL_ERROR = 3
* OTHERS = 4
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " END_FORM
Regards,
Vasanth
Message was edited by:
Vasanth M -
Fbl5n: The printer provides me only one customer items for each page...
Hi all,
launching t.code FBL5N, and printing the repost list, the printer provides me only one customer items for each page...
I'd like obtaining more customer items for each page...
What to do?
ThanksHi Umberto..
Thats how the standard report works..
To meet your requirement, you would probably need to look at another standard report.
In case you need further clarification, please feel free to write to me..
Good Luck!
Lucid-Mind... -
Export all items of the pages in jpg [HELP]
hi,
how could export to jpg all items in a document indesign?
and also need measures each item.
if someone could help me I would appreciate
sorry for my English
thanksstart here:
exports page items to created subfolder.
jpg-naming: sourcepage + itemcount
#target InDesign
//set properties for export to your needs
with(app.jpegExportPreferences){
antiAlias = true;
embedColorProfile = false;
exportResolution = 300;
jpegColorSpace = JpegColorSpaceEnum.RGB; //JpegColorSpaceEnum.CMYK, JpegColorSpaceEnum.GRAY r/w One of RGB, CMYK or Gray
jpegQuality = JPEGOptionsQuality.HIGH; //JPEGOptionsQuality.LOW, JPEGOptionsQuality.MEDIUM, JPEGOptionsQuality.HIGH, JPEGOptionsQuality.MAXIMUM r/w The compression quality.
jpegRenderingStyle = JPEGOptionsFormat.BASELINE_ENCODING; // JPEGOptionsFormat.PROGRESSIVE_ENCODING r/w The rendering style.
simulateOverprint = true;
//doc has to be saved once
var theDoc = app.activeDocument;
var docName = theDoc.name;
var docShortName = docName.replace(/.indd/, '')
var docPath = '' + theDoc.fullName;
var docContainerPath = docPath.replace(docName, '')
var destPath = docContainerPath + '/' + docShortName + '_jpgExport/'
if(Folder(destPath).create() != true){alert('Could not create targetfolder.'); exit();}
var pageItems = theDoc.pageItems.everyItem().getElements();
l = pageItems.length;
counter = 0;
for(var i = 0; i < l; i++){
counter = counter + 1;
var singlePageItem = pageItems[i];
currParentPage = singlePageItem.parentPage;
if(currParentPage == null){parentPageNumber = 'pasteboard'}else{parentPageNumber = singlePageItem.parentPage.name; }
newFile =new File(destPath + 'page_' + parentPageNumber + '_' + 'item_' + counter + '.jpg');
if(singlePageItem.exportFile(ExportFormat.JPG, newFile) === false){alert(newFile + ' could not write jpg-File.')} -
Flash menu that highlights the selected item when changing page?
Hi all,
I'm trying to create a menu in flash that will highlight the
current
selected menu item when selecting a specific page.
Example menu:
- home
- products
- product 1
- product 2
- product 3
- contacts
- email
- form
Imagine you have a link in a page that opens the contact >
email page.
Is there a way to get the flash menu to highlight the
"contacts > email"
item when displaying this page?
Something similar to this
http://tinyurl.com/5c9993
Is there an application that can do this easily?
Thanks in advance for any idea.
Tonyhere is a link to a rar file i just updated for ya.
it is a flash movie and 2 web pages. showing how u can send
variables to flash with java script.
http://www.wholesalegranitedist.com/home/tutorials/jsquery.rar
if you can't get this file let me know i will just post it
here.
you will have to change the menu depending on which variable
u send. to flash. it can change on which page you visit;). ask more
questions if you need to. or private message me. -
Export selected item as PNG with Alpha
Hello.
I'm building game graphics in Illustrator. I have thousands of individual sprites to export, up until now I've been copying and pasting in Photoshop and exporting through there, but that is tedious and slow. Inkscape has an option to export the selected object only as a PNG with alpha, pixel dimensions are equal to the current selection size. Perfect. But that means using Inkscape and quite frankly it's horrible to use.
I'm sure this must be possible, but for the life of me I can't find a working method. I found Windows scripts for CS3, but nothing for CS5 on Mac.
Can anyone help?Should not be too hard to adapt the script for Mac, assuming it is JavaScript, not VBScript. If you can point to the source, someone might be able to fix it for you (also post in the scripting sub-forum). Other than that you can of course always make use of the slice tool and fit the slices to the objects, then export the slices.
Mylenium -
Hi :
I have a sql report in apex where the report is in page 15 but also there are multiple reports in other pages from page 10 to page 15 but the item is located in page10 as i select the item in page10 all the reports must redirects to it based on the item selected
item name in page 10 is p10_projects
plsql query is like this
declare
i number:=1;
q varchar2(32676);
BEGIN
q := '
SELECT pro.project_name
FROM projects pro ';
IF :P10_PROJECTS = 'ALL' THEN
q := q||' AND pro.id = :P10_PROJECTSS ';
END IF;
IF :P10_PROJECTSS <> 0 THEN
q := q||' AND pro.id = :P10_PROJECTS ';
END IF;
Return q
End;
now whts my requirement is like i also have a another item in page 15 called :p15_projects here in the report there must be a option like even if i select the item in page 15 the report must redirect to that base on this selection also
please suggest me how to include this condition in the above query
thanks
sudhirYou know this makes little sense, right?
Ad-hoc reporting should be done at worst via Discoverer or a data warehouse solution, where the irrelevant fields can be hidden, foreign keys can bring code descriptions and everything can have nice names. More properly, it should be submitted to IT and they should determine how to produce the output the business requires. Letting users run queries directly against the database tables is almost always a bad idea. How does the user know if they want XPLV_BTCH_ID or not? They want to know details of sales made in a given period or how many widgets are in stock.That's what an IT department is for. -
Export each page in a pagerange
Dear all,
How do I export each page in a pagerange using js - eg. I enter a pagerange "2-4,5" and InDesign exports 4 files with one page pr. file?
From the examples included with InDesign I know how to export all the pages in a document as 1 page pr. export, or export a pagerange to one file (4 pages in one PDF file). But I can't seem to figure out how to couple a defined pagerange with looping through the document pages..
Kind regards,
Rasmus Olsenvar myDocument = app.activeDocument;
var myDocumentName = myDocument.name;
var myFolder = Folder.selectDialog ("Choose a Folder");
var unranged_array = unrange ("1-3,4")
function unrange (s)
return s.replace (/(\d+)-(\d+)/g, expand)
function expand ()
var expanded = [];
var start = Number (arguments[1]);
var stop = Number (arguments[2]);
for (var i = start; i <= stop; i++)
expanded.push (i);
return expanded
//alert(unranged_array);
mySplit = unranged_array.split(',');
for(var myCounter = 0; myCounter < mySplit.length; myCounter++) {
myPageName = myDocument.pages.item(myCounter).name;
//alert(myPageName)
with(app.pdfExportPreferences) {
pageRange = myPageName;
viewPDF = false;
myFilePath = myFolder + "/" + myDocumentName + "_" + myPageName + ".pdf";
myFile = new File(myFilePath);
myDocument.exportFile(ExportFormat.pdfType, myFile, false);
And I even learned how to use the pre tag. Wow, this makes me wet :-)
Thank you gentlemen, you are the best.
Rasmus -
Name Exported PDFs with text from a frame on each page
Does anyone have an idea how to do the following
I plan on creating a document of say 100 pages. On each page will be a photo of a product and some text frames. In one of the frames will be the product's SKU code - which we will enter manually.
What I want is that we can then export each page as a separate PDF and the filename of each PDF will be taken from the SKU code present in the text frame with .pdf appended.
Has anyone done something like this?
ThanksAsk in the Scripting forum... InDesign Scripting
-
[JS] Export jpg from each page with specified number from database
Hello,
I imported a database into InDesign (CS 5 with OS X 10.7.2), so that every product and product number is on a different page in InDesign. Now I need to export each page to a jpg-file. The name of the jpg should be "productnumber.jpg".
I found the script „PDFExportCropper.jsxbin“, which does what I want but creates pdf-files instead of jpgs.Thereafter, I can convert the pdfs to jpgs automatically with Photoshop.
But: The script takes hours and hours to create the pdf-files: Right now, more than 8 hours for only 100 pdf-files. The database has 65.000 products!
Any idea to improve the workflow? Any other script available which I did not find but does what I need?
As a designer, I have no experiences at all in scripting.
Thanks for answering!
Best regards
Rainer
from GermanyI think I fixed it.
In line 20, I have now the following code:
var page = myImage[i].parentPage.name;
Is this the right way, to get the actual page?
Also I would like to know, how can I export the images cropped to their "box"? How do I have to change my script?
Thanks -
Can I extract the page number of the selection item
Hi,
I want to extract the page number of the selected item in my document
Is it possible?
my script will be executed out from InDesign by another application
please help meYes, that's right! I read it so wrong!
In CS5 there is new property:
var mySel = app.selection[0];
var mySelPage = mySel.parentPage;
alert(mySelPage);
Hope that helps.
tomaxxi
http://indisnip.wordpress.com/
http://inditip.wordpress.com/ -
InDesign CS4 Library- can't get library items on to pages
I'm fairly new to InDesign CS4.
A book I'm reading has a tutorial telling me to drag library items from the library to a page.
This is a library that the book author created that came with the book.
However, I can't get material from the library to any of the pages.
Anytime I try dragging any of the images or other items from the library to my page in InDesign CS4, I get a small "No" symbol (a circle with a slash through it).
So I clicked on the image in the library that I wanted to add to the page, and using both the content menu (and later, the library panel's menu) to select "Place Item," nothing happened.
How do I get content in a library on to a page?
Dragging and using "Place Item" are not working for me.Hello, Lee Sarah, and thanks for answering.
If I understand you correctly, this is what I did:
I "right" clicked on the Library file icon on my hard drive, called "Healthy Pets CS4."
This brought up a context menu.
From there, I went to "Properties."
Under "Properties" > "Attributes," "Read only" is not checked off, nor is "hidden" checked off.
In the "Healthy Pets CS4 Properties" dialog box, I then clicked on the the "Security" tab, which brought up all sorts of stuff about permissions, read /write, etc.
I guess I should mention at this point that I'm on a computer running Windows Vista, since this might be pertinent to my issue (?)
Although it's my computer, it has me on here as two different people (I'm on as Administrator and under my first name, which let's just say is "Graphics Cuddly Bear.")
On the "Security" tab page of the dialog box is a heading called "Group or user names," and from there, depending on which name you pick from the user names, different options get high lighted in the ""Permissions for Authenticated Users" box below it.
So, under "Permissions for Authenticated Users" (when the users "Autheticated Users" and "Admins" are selected) the following are checked off with a check mark,
(as if to say, "These are the things you have permissions to do with this file"):
Modify
Read and Execute
Read
Write
The only things I do not have permissions for when I check off "Administrator" on that list is "Special Permissions."
When AU (Autheticated Users) is checked it says I do not have "Full Control" or "Special Permissions."
However, when I clicked on my name (GCB - "Graphics Cuddly Bear") under the heading of "Group of user names," these two things are the only ones checked off:
Read and Execute
Read
So I went in to another area of this box and gave my account ("GCB") the "Write" ability.
When I went back to the box, a check mark next to "Write" then appeared. So it appears to be telling me that under GCB, I can now write to that file.
So when I opened and closed out of InDesign and re-opened it, it still will not allow me to drag the files/text/images from the library.
I still get the little "No" symbol.
It also still will not let me use the "place" command, either.
I've gone ahead and worked thorugh this chapter without being able to use the author's library items, but it makes working on her tutorials very difficult.
And it's rather pointless, since the entire chapter is about how to use the software's library.
I got a response from the book's publisher (Delmar / Cengage) to ask them for help, if they would provide me with working copies of the files, or some other work around, and they were NOT the least bit helpful.
A representative from Delmar/ Cengage e-mailed me to say that because I purchased the book at Amazon's site (rather than from them directly) that they would not help me, which I thought was cruddy and not classy.
I don't see that it entirely matters where I bought the book from; they're the ones who made it. -
I switched form IE to FF. In IE, I could select text (or photos) and print just the portion of web pages and emails that I wanted, thus saving paper and ink. I have not been able to do that with FF. I have to print all of each page, so text, ads, and whatever other extraneous material prints. What a waste! Is there any way to select and print just what I need using FireFox? Currently I have to run both IE and FF to handle my printing and documentation needs. Thank you!
Still happens with Firefox 12. I wish they'd just fix it, the way it used to be in Firefox 10, without the complicated workaround suggested above.
-
Showing selected parameters values on each page in SSRS
Hi All,
I have a SSRS report with multi-selection parameter..Basically it's a summary report of sales and based on country parameter I have to show data.
let say Country is the parameter and below are the values of the Country parameter list...
Parameters list:
All
Australia
England
Canada
Italy
Parameter: All
1) If I select 'All' in the parameter list then
In 1st page I should see data related to Australia and display parameter value as Australia in the left side top corner of the report. In 2nd page I should see data related to England and display parameter value as England in the left side top
corner of the report. In 3rd page I should see data related to Canada and display parameter value as Canada in the left side top corner of the report. In 4th page I should see data related to Italy and display parameter value as Italy in
the left side top corner of the report. In 5th page I should see data related to All and display parameter value as All in the left side top corner of the report.
2) If I select Australia and England in the parameter list then
In 1st page I should see data related to Australia and display parameter value
as Australia in the left side top corner of the report. In 2nd page I should see data related to England and display parameter value as England in the left side top corner of the report.
3) If I select Italy in the parameter list then
In 1st page I should see data related to Italy and display parameter value
as Italy in the left side top corner of the report.
It should look like this..I need help in showing parameters (selected parameter) individually on each page.
Page-1
Parameter: Australia ( how to show Australia on 1st page)
Product
Amount
Country
Prd1
100
Australia
Prd2
200
Australia
Prd3
300
Australia
Prd1
340
Australia
Page-2
Parameter: England ( how to show England on 2nd page)
Product
Amount
Country
Prd4
400
England
Prd1
125
England
Page-3
Parameter: Italy ( how to show Italy on 3rd page)
Product
Amount
Country
Prd2
250
Italy
Prd3
250
Italy
Create Table:
Create Table Sample(
Product varchar(10) Not Null,
Amount Money null,
Country null
Insert Statement:
Insert into sample (Product,Amount,Country) Values ('Prd1',100,'Australia')
Insert into sample (Product,Amount,Country) Values ('Prd2','200,'Australia')
Insert into sample (Product,Amount,Country) Values ('Prd3','300,'Australia')
Insert into sample (Product,Amount,Country) Values ('Prd4','400,'England')
Insert into sample (Product,Amount,Country) Values ('Prd5','480,'Canada')
Insert into sample (Product,Amount,Country) Values ('Prd1','340,'Australia')
Insert into sample (Product,Amount,Country) Values ('Prd3','290,'Canada')
Insert into sample (Product,Amount,Country) Values ('Prd1','125,'England')
Insert into sample (Product,Amount,Country) Values ('Prd2','250,'Italy')
Insert into sample (Product,Amount,Country) Values ('Prd3','250,'Italy')
Thanks in Advance,
RH
sqlHi sql9,
According to your description, you have a report with a parameter for selecting countries. Now you need to display records for one country and show the country name on each page. Right?
For this requirement, we need to add a parent group (Group on Country) so that we can set page break for each country. Also, we want to display the country name on each page. This country name is group name, not the parameter because the parameter contains
all countries that we have selected. In this scenario, we just need to set the group name as page name, then display the Page Name (Build-in Field) in report header. You case has been tested in our local environment. Here are steps and screenshots for your
reference:
1. Create a table in report. Set detail rows group on Country. Set page break between each group instance.
2. Create a parameter for filtering data. Set Filter on tablix.
3. Go to Row Groups, select group Country. In Tablix Member Properties grid, go to Group->PageName. Put “=Fields!Country.Value” in expression.
4. Create a textbox in report header. Put Page Name (in Build-in Fields) into the textbox.
5. Save and preview. It looks like below:
Reference:
Pagination in Reporting Services (Report Builder and SSRS)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou
-
Exporting or Printing each page of a Crystal Report to a separate pdf file.
Is there a way to export or print each page of a Crystal report to a separate pdf file? If possible, I would look to use the family nunmber field in my report as the file name. This is not required, but would be helpful. Thanks
Hello,
Standalone CR Designer doesn't have the ability but CR Server or BOE does. Or if you have a .NET or Java you could write an app that would spit out one page at a time.
Don
Maybe you are looking for
-
can somebody please tell me how to fix this. when i try to install appleworks this pops up so please help me i need to get this on my mac
-
Multiple Image upload with save to database
Hi everyone, I wonder whether anyone can help me, I have been trying to use the multiple image upload with save to database wizard. When I create the page and upload it and then view it in Safari the only thing that is on the page is an upload button
-
Lightroom and SyncToy question
Hi, I use LR 2.2 and Synctoy 2.0 for syncing my Photo folder to external backup drive. Those that use Synctoy should know I use Echo mode = all new files are copied to backup drive, all renames in Photo folder are repeated on backup drive and all del
-
D300 raw files in A2 - Colors are terrible?
I've been using Nikon's Capture NX software to edit my D300 raw files since Aperture 1.5 didn't support D300 raw files. Tonight, I downloaded the trial version of Aperture 2.0 and imported some of my D300 raw files into A2. Side by side comparison is
-
Adding Masks Slows down render times massively
Adding any sort of vignettes/mask when using DL in Premiere CC creates massive render times in premiere. On a two minute promo it takes 15 minues to render what took 4 minutes without Masks. Anyone know how to improve this? In the middle of a product