Jump to content

SUBIECTE NOI
« 1 / 5 »
RSS
Presbiopia - la 43 ani ?

Termen transcriere autovehicul

Cazare Timisoara pe 4-5 zile

Primele zile ale internetului per...
 Ditra 25

Casti USB-C ptr A-54

Aplicatie medicala / asistent med...

De ce vor atația politicieni...
 ERR_ADDRESS_UNREACHABLE

Legea 18/1968 Se mai aplica?

Digi conectare 2 routere prin fir

Succesiune notar versus instanta ...
 Montaj aer conditionat in balcon ...

Cont curent mulți valuta far...

Sugestii plan casa

Experiente cu firme care cumpara ...
 

Programare .XML

- - - - -
  • Please log in to reply
2 replies to this topic

#1
assiris

assiris

    Junior Member

  • Grup: Members
  • Posts: 101
  • Înscris: 23.01.2006
Am un program generat de o imprimanta in format .XML. La descrierea functionarii intr-un anumit mod, pentru a prelua hartie din doua sertare diferite, trebuie sa scriu
ca preluarea se va face pentru paginile 1,3,5,7,9... din sertarul 3 si paginile 2,4,6,8,10... din sertarul 4. Daca as avea un numar mic de pagini ar fi simplu, le scriu manual dar eu am ceva de ordinul a 4000
de pagini. Se poate dintercala undeva - si cum - o rutina de buclare ceva ge genul DO... WHILE sau IF... cum se poate in alte programe?
Dau mai jos codul generat de driverul imprimantei pentru edificare:

<JDF ID="SW2KNORMID00000095" Status="Setup" Type="Product" Version="1.1" xmlns="http://www.CIP4.org/JDFSchema_1_1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.CIP4.org/JDFSchema_1_1 [url="http://www.cip4.org/Schema/JDFSchema_1_1/JDF.xsd&quot;"]http://www.cip4.org/Schema/JDFSchema_1_1/JDF.xsd"[/url] xmlns:SW2K="http://www.sw2000.com/JDF"><ResourcePool><RunList ID="SW2KNORMID00000096" SW2K:Type="Defaults"></RunList><RunList ID="SW2KNORMID00000097" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray4" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet=""></RunList><RunList ID="SW2KNORMID00000098" SW2K:Type="Printed Page" Pages="2" SW2K:Sides="One-Sided" SW2K:Tray="Tray3" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet=""></RunList><RunList ID="SW2KNORMID00000099" SW2K:Type="Printed Page" Pages="3" SW2K:Sides="One-Sided" SW2K:Tray="Tray4" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet=""></RunList><RunList ID="SW2KNORMID00000100" SW2K:Type="Printed Page" Pages="4" SW2K:Sides="One-Sided" SW2K:Tray="Tray3" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet=""></RunList><RunList ID="SW2KNORMID00000101" SW2K:Type="Printed Page" Pages="5" SW2K:Sides="One-Sided" SW2K:Tray="Tray4" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet=""></RunList><RunList ID="SW2KNORMID00000102" SW2K:Type="Printed Page" Pages="6 ~ 4000" SW2K:Sides="One-Sided" SW2K:Tray="Tray3" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet=""></RunList><SW2K:JobWideSettings SW2K:NumberOfTabs="3" SW2K:TabMediaSize="0" SW2K:TabSpaceAbove="34" SW2K:TabSpaceBelow="34" SW2K:TabGap="10" SW2K:TabTextPosition="0" SW2K:PunchSettings="1"></SW2K:JobWideSettings></ResourcePool><AuditPool><Created TimeStamp="2011-09-15T12:46:43"></Created></AuditPool>	</JDF>
Multumesc anticipat.

#2
DarkAngelBv

DarkAngelBv

    === Proud owner of === ++++ Audi & Opel ++++

  • Grup: Senior Members
  • Posts: 12,747
  • Înscris: 24.03.2006
bun, deci tu vrei sa ia cand dintr-un tray cand din celalalt? adica paginile impare sa ia din tray 4, paginile pare din tray 3?
Daca da, te pot ajuta cu un mic scriptulet JS care sa-ti genereze XML-ul.

Edited by DarkAngelBv, 18 September 2011 - 10:16.


#3
DarkAngelBv

DarkAngelBv

    === Proud owner of === ++++ Audi & Opel ++++

  • Grup: Senior Members
  • Posts: 12,747
  • Înscris: 24.03.2006
Ceva de genul:
<!DOCTYPE html>
<html>
<head>
 
  <script src="http://code.jquery.com/jquery-latest.js"></script>

</head>
<body>
	
	Numar pagini:<br>
	<input type="text" id="pg"><br>
	Index pornire:<br>
	<input type="text" id="start"><br>

	<input type="button" onclick="genereaza()">
	<script>
	function genereaza(){

		p = $('#pg').val();
		s = $('#start').val();

		if(s < 10) {
			start = '0' + s; 
			s++;
			start1 = '0' + s; 
		}
		else {
			start = s; 
			s++;
			start1 = s; 
		}
		var output = '';
		output 	= output + '<JDF ID="SW2KNORMID000000'+ start +'" Status="Setup" Type="Product" Version="1.1" xmlns="http://www.CIP4.org/JDFSchema_1_1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.CIP4.org/JDFSchema_1_1 http://www.cip4.org/Schema/JDFSchema_1_1/JDF.xsd" xmlns:SW2K="http://www.sw2000.com/JDF">' + "\n"
				+ '	<ResourcePool>' + "\n"
				+ '		<RunList ID="SW2KNORMID000000' + start1 + '" SW2K:Type="Defaults">' + "\n"
		+'		</RunList>' + "\n";
	
		for(i=1;i<=p;i++){
			t = s + i;
			if(t < 10) {
			start = '0' + t; 
			}
			else {
				start = t; 
			}
			if((i % 2) == 0) 
				tray = '3'; 
			else 
				tray = '4';
				
			output 	= output + '		<RunList ID="SW2KNORMID000000'+ start +'" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray'+ tray +'" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">' + "\n"
		+ '		</RunList>' + "\n";
		}

		output = output + '		<SW2K:JobWideSettings SW2K:NumberOfTabs="3" SW2K:TabMediaSize="0" SW2K:TabSpaceAbove="34" SW2K:TabSpaceBelow="34" SW2K:TabGap="10" SW2K:TabTextPosition="0" SW2K:PunchSettings="1"> ' + "\n"
		+'		</SW2K:JobWideSettings> ' + "\n"
	+'	</ResourcePool> ' + "\n"
	+'	<AuditPool> ' + "\n"
	+'		<Created TimeStamp="2011-09-15T12:46:43"> ' + "\n"
	+'		</Created> ' + "\n"
	+'	</AuditPool> ' + "\n"
+'	</JDF>';

$('#output').html(output);
	}
	</script>
	<br><br>
	<textarea id="output" style="height:500px; width:700px"></textarea>
</body>
</html>

Ca output pentru start:20, numar pagini: 15 primesti ceva de genul:
<JDF ID="SW2KNORMID00000020" Status="Setup" Type="Product" Version="1.1" xmlns="http://www.CIP4.org/JDFSchema_1_1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.CIP4.org/JDFSchema_1_1 http://www.cip4.org/Schema/JDFSchema_1_1/JDF.xsd" xmlns:SW2K="http://www.sw2000.com/JDF">
	<ResourcePool>
		<RunList ID="SW2KNORMID00000021" SW2K:Type="Defaults">
		</RunList>
		<RunList ID="SW2KNORMID00000022" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray4" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<RunList ID="SW2KNORMID00000023" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray3" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<RunList ID="SW2KNORMID00000024" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray4" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<RunList ID="SW2KNORMID00000025" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray3" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<RunList ID="SW2KNORMID00000026" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray4" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<RunList ID="SW2KNORMID00000027" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray3" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<RunList ID="SW2KNORMID00000028" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray4" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<RunList ID="SW2KNORMID00000029" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray3" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<RunList ID="SW2KNORMID00000030" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray4" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<RunList ID="SW2KNORMID00000031" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray3" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<RunList ID="SW2KNORMID00000032" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray4" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<RunList ID="SW2KNORMID00000033" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray3" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<RunList ID="SW2KNORMID00000034" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray4" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<RunList ID="SW2KNORMID00000035" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray3" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<RunList ID="SW2KNORMID00000036" SW2K:Type="Printed Page" Pages="1" SW2K:Sides="One-Sided" SW2K:Tray="Tray4" SW2K:Stapling="Same As Body" SW2K:FStapling="Off" SW2K:Punch="Same As Body" SW2K:InterLiner="12" SW2K:NumberofSheet="">
		</RunList>
		<SW2K:JobWideSettings SW2K:NumberOfTabs="3" SW2K:TabMediaSize="0" SW2K:TabSpaceAbove="34" SW2K:TabSpaceBelow="34" SW2K:TabGap="10" SW2K:TabTextPosition="0" SW2K:PunchSettings="1"> 
		</SW2K:JobWideSettings> 
	</ResourcePool> 
	<AuditPool> 
		<Created TimeStamp="2011-09-15T12:46:43"> 
		</Created> 
	</AuditPool> 
</JDF>


Anunturi

Chirurgia cranio-cerebrală minim invazivă Chirurgia cranio-cerebrală minim invazivă

Tehnicile minim invazive impun utilizarea unei tehnologii ultramoderne.

Endoscoapele operatorii de diverse tipuri, microscopul operator dedicat, neuronavigația, neuroelectrofiziologia, tehnicile avansate de anestezie, chirurgia cu pacientul treaz reprezintă armamentarium fără de care neurochirurgia prin "gaura cheii" nu ar fi posibilă. Folosind tehnicile de mai sus, tratăm un spectru larg de patologii cranio-cerebrale.

www.neurohope.ro

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Forumul Softpedia foloseste "cookies" pentru a imbunatati experienta utilizatorilor Accept
Pentru detalii si optiuni legate de cookies si datele personale, consultati Politica de utilizare cookies si Politica de confidentialitate