Bonjour, je suis confronté à un problème d'out of memory en utilisant de grand xml pour la génération de pdf avec fop.
Quun a déjà - t -il eu ce problème et comment le patcher ou trouver un workarround ?
Merci d'avance
septentryon
Bonjour, je suis confronté à un problème d'out of memory en utilisant de grand xml pour la génération de pdf avec fop.
Quun a déjà - t -il eu ce problème et comment le patcher ou trouver un workarround ?
Merci d'avance
septentryon
Bonjour,
Tu peux augmenter la mémoire utilisée par la JVM avec l'option -Xmx :
java ... -Xmx512m ...
bon courage
Bof,
Je peux pas uniquement me fier a la vm. Je sais que fop à parfois des problèmes de memoire avec les pages séquences mais mon xsl est on ne peut plus simple.
D'ailleurs si quun connait bien xslfo, pourrait- il regarder mon code ci dessous et me dire comment diminuer les risque d'out of memory ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285 <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo"> <xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes" /> <xsl:template match="pages"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="main" page-width="297mm" page-height="210mm" margin="12mm"> <!--<fo:simple-page-master master-name="main" page-height="210mm" page-width="297mm" margin="12mm">--> <fo:region-body margin-top="0mm" margin-bottom="10mm" /> <fo:region-before extent="20mm" precedence="true" /> <fo:region-after extent="10mm" display-align="after" precedence="true" /> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="main" font-size="20pt" font-family="Times"> <fo:static-content flow-name="xsl-region-before" font-size="20pt"></fo:static-content> <fo:static-content flow-name="xsl-region-after" font-size="8pt"> <fo:block text-align="start" text-align-last="justify"> <fo:inline text-align="left" font-style="italic"> <xsl:value-of select="companyName"/> </fo:inline> <fo:inline text-align="right" font-size="10pt"> <fo:leader leader-pattern="space" leader-pattern-width="5pt"/> <fo:page-number /> </fo:inline> </fo:block> <fo:block> <fo:table table-layout="fixed"> <fo:table-column column-width="4cm" /> <fo:table-column column-width="19.5cm" /> <fo:table-column column-width="4cm" /> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block text-align="left" font-style="italic"> <xsl:value-of select="date"/> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block text-align="center"> <xsl:value-of select="titleBottom"/> </fo:block> </fo:table-cell> <fo:table-cell> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block space-after="5mm"> <fo:table table-layout="fixed"> <fo:table-column column-width="21.7cm" /> <fo:table-column column-width="5cm" /> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block text-align="left"> <fo:block text-align="left" font-size="8pt" margin-left="0mm" margin-right="92mm"> <xsl:value-of select="titleLeft"/> </fo:block> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block text-align="right"> <fo:block text-align="right" font-size="8pt" margin-left="5mm" margin-right="0mm"> <xsl:value-of select="titleRight"/> </fo:block> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> <fo:block text-align="center" font-size="15pt"> <xsl:value-of select="title"/> </fo:block> <fo:block space-after="15mm" text-align="center" font-size="8pt"> <xsl:value-of select="subTitle"/> </fo:block> <fo:block font-size="10pt"> <xsl:apply-templates select="SMR11Column" /> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template match="SMR11Column"> <fo:table table-layout="fixed"> <fo:table-column column-width="27cm" /> <fo:table-body> <fo:table-row > <fo:table-cell> <fo:block margin-left="0mm" background-color="rgb(236,233,216)" margin-right="0mm" border-style="ridge" border-color="black" border-width="0.2mm" padding="0mm" space-after="2mm"> <xsl:apply-templates select="entrySMR11ColumnTitle|entrySMR11Column" /> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:template> <xsl:template match="entrySMR11ColumnTitle"> <fo:block color="white" background-color="rgb(114,132,146)" margin-left="0mm" margin-right="0mm" font-weight="bold" font-size="8pt" space-after="0mm" border-style="ridge" border-color="black" border-width="0.2mm" padding="0.5mm"> <fo:table table-layout="fixed" margin-left="0mm" margin-right="0mm"> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="3cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-body> <fo:table-row> <fo:table-cell > <fo:block text-align="center" > <xsl:value-of select="entry1" /> </fo:block> </fo:table-cell> <fo:table-cell > <fo:block text-align="center" > <xsl:value-of select="entry2" /> </fo:block> </fo:table-cell> <fo:table-cell > <fo:block text-align="center" > <xsl:value-of select="entry3" /> </fo:block> </fo:table-cell> <fo:table-cell > <fo:block text-align="center" > <xsl:value-of select="entry4" /> </fo:block> </fo:table-cell> <fo:table-cell > <fo:block text-align="center" > <xsl:value-of select="entry5" /> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block text-align="center" > <xsl:value-of select="entry6" /> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block text-align="center" > <xsl:value-of select="entry7" /> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block text-align="center" > <xsl:value-of select="entry8" /> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block text-align="center" > <xsl:value-of select="entry9" /> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block text-align="center" > <xsl:value-of select="entry10" /> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block text-align="center" > <xsl:value-of select="entry11" /> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </fo:block> </xsl:template> <!-- ================================= --> <!-- child element: entrySMR11Column --> <!-- ================================= --> <xsl:template match="entrySMR11Column"> <fo:table table-layout="fixed" margin-left="0mm" margin-right="0mm" font-size="6pt"> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="3cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-column column-width="2.4cm" /> <fo:table-body> <fo:table-row> <fo:table-cell padding="0.5pt" border="0.5pt solid black"> <fo:block text-align="left"> <xsl:value-of select="entry1" /> </fo:block> </fo:table-cell> <fo:table-cell padding="0.5pt" border="0.5pt solid black"> <fo:block text-align="left"> <xsl:value-of select="entry2" /> </fo:block> </fo:table-cell> <fo:table-cell padding="0.5pt" border="0.5pt solid black"> <fo:block text-align="left"> <xsl:value-of select="entry3" /> </fo:block> </fo:table-cell> <fo:table-cell padding="0.5pt" border="0.5pt solid black"> <fo:block text-align="right"> <xsl:value-of select="entry4" /> </fo:block> </fo:table-cell> <fo:table-cell padding="0.5pt" border="0.5pt solid black"> <fo:block text-align="right"> <xsl:value-of select="entry5" /> </fo:block> </fo:table-cell> <fo:table-cell padding="0.5pt" border="0.5pt solid black"> <fo:block text-align="right"> <xsl:value-of select="entry6" /> </fo:block> </fo:table-cell> <fo:table-cell padding="0.5pt" border="0.5pt solid black"> <fo:block text-align="right"> <xsl:value-of select="entry7" /> </fo:block> </fo:table-cell> <fo:table-cell padding="0.5pt" border="0.5pt solid black"> <fo:block text-align="right"> <xsl:value-of select="entry8" /> </fo:block> </fo:table-cell> <fo:table-cell padding="0.5pt" border="0.5pt solid black"> <fo:block text-align="right"> <xsl:value-of select="entry9" /> </fo:block> </fo:table-cell> <fo:table-cell padding="0.5pt" border="0.5pt solid black"> <fo:block text-align="right"> <xsl:value-of select="entry10" /> </fo:block> </fo:table-cell> <fo:table-cell padding="0.5pt" border="0.5pt solid black"> <fo:block text-align="right"> <xsl:value-of select="entry11" /> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:template>
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager