Re: Feasibility of creating signed PDF files
On Wed, 2002-07-17 at 17:55, Miguel A Paraz wrote: Thanks for the reply! My project is simpler - I only have to generate a signature for the stream, not encrypt it. Same principle anyway. I haven't started coding, but there is java.security.Signature.update(byte[]) which is used to build up the signature. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
DO NOT REPLY [Bug 10941] New: - Memory leaks when using dynamic images
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10941. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10941 Memory leaks when using dynamic images Summary: Memory leaks when using dynamic images Product: Fop Version: all Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Major Priority: Other Component: pdf renderer AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, I have discovered some memory leaks when creating dynamic reports with dynamic (gif) image files. The problem is that image files seem to be cached and not released anymore, even when removing the fop driver object or calling the driver.reset() method. Since we are making dynamic reports and all charts in it are stored with unique filenames (to prevent concurrency problems between users), every created report keeps about 40 kb of memory in memory. After a few days, this results in tomcat to crash because the system gets out of memory (with heap size of 256 MB). When I always use the same GIF filenames and start a one user test repeatingly making reports for one user, one after the other, there is no memory leak. This means that the memory leak is caused by caching the image files and never releasing them. When the same filenames are reused over and over again, the cached image files are overwritten for every new report. After investigating the FOP source code (0.20.4) I discovered at least one problem in the FopImageFactory.java class: There is a private static Hashtable m_urlMap that caches all image URLs but never releases these URLs. Since it is a static map, the URLs are not even released after removing the fop objects from memory. When I solved this problem on my PC (by clearing the m_urlMap after calling the Driver.Reset method) there is still memory leak of about 30 kb left. Does anyone know about this problem and is there a possible work around (except from reusing the filenames)? Thanks, Dominique De Ridder - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/test/resources/fop/svg text.svg
keiron 2002/07/18 03:10:26 Modified:test/resources/fop/svg text.svg Log: added a few more text tests Revision ChangesPath 1.4 +12 -0 xml-fop/test/resources/fop/svg/text.svg Index: text.svg === RCS file: /home/cvs/xml-fop/test/resources/fop/svg/text.svg,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- text.svg 21 Jun 2002 15:17:36 - 1.3 +++ text.svg 18 Jul 2002 10:10:26 - 1.4 @@ -113,6 +113,18 @@ text x=15 y=310 font-family=FOPFont font-size=12FOP in FOPfont/text /g + text x=130 y=80 writing-mode=tb font-size=12vertical/text + text x=140 y=80 writing-mode=tb glyph-orientation-vertical=0deg font-size=12vertical/text + text x=150 y=80 glyph-orientation-horizontal=90deg font-size=12orientated text/text + + text x=150 y=95 font-stretch=narrower font-size=12stretched font/text + + text x=150 y=110 letter-spacing=5 font-size=12spaced letters/text + + text x=150 y=125 word-spacing=3pt font-size=12spaced words/text + + + !-- empty element -- text/ /g - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/pdf PDFDocument.java PDFFunction.java
keiron 2002/07/18 03:59:58 Modified:src/org/apache/fop/pdf PDFDocument.java PDFFunction.java Log: reuse functions to reduce file size Revision ChangesPath 1.46 +47 -5 xml-fop/src/org/apache/fop/pdf/PDFDocument.java Index: PDFDocument.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFDocument.java,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- PDFDocument.java 4 Jul 2002 14:08:19 - 1.45 +++ PDFDocument.java 18 Jul 2002 10:59:57 - 1.46 @@ -138,6 +138,7 @@ protected HashMap filterMap = new HashMap(); protected ArrayList gstates = new ArrayList(); +protected ArrayList functions = new ArrayList(); /** * creates an empty PDF document p @@ -302,7 +303,15 @@ theFunctionDataStream, theFilter); -this.objects.add(function); +PDFFunction oldfunc = findFunction(function); +if(oldfunc == null) { +functions.add(function); +this.objects.add(function); +} else { +this.objectcount--; +function = oldfunc; +} + return (function); } @@ -339,11 +348,28 @@ theFunctionType, theDomain, theRange, theCZero, theCOne, theInterpolationExponentN); +PDFFunction oldfunc = findFunction(function); +if(oldfunc == null) { +functions.add(function); +this.objects.add(function); +} else { +this.objectcount--; +function = oldfunc; +} -this.objects.add(function); return (function); } +private PDFFunction findFunction(PDFFunction compare) { +for(Iterator iter = functions.iterator(); iter.hasNext(); ) { +Object func = iter.next(); +if(compare.equals(func)) { +return (PDFFunction)func; +} +} +return null; +} + /** * Make a Type 3 Stitching function * @@ -386,7 +412,15 @@ theRange, theFunctions, theBounds, theEncode); -this.objects.add(function); +PDFFunction oldfunc = findFunction(function); +if(oldfunc == null) { +functions.add(function); +this.objects.add(function); +} else { +this.objectcount--; +function = oldfunc; +} + return (function); } @@ -407,7 +441,15 @@ theRange, theFunctionDataStream); -this.objects.add(function); +PDFFunction oldfunc = findFunction(function); +if(oldfunc == null) { +functions.add(function); +this.objects.add(function); +} else { +this.objectcount--; +function = oldfunc; +} + return (function); } 1.9 +101 -1xml-fop/src/org/apache/fop/pdf/PDFFunction.java Index: PDFFunction.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFFunction.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- PDFFunction.java 2 Nov 2001 11:06:07 - 1.8 +++ PDFFunction.java 18 Jul 2002 10:59:58 - 1.9 @@ -667,4 +667,104 @@ } +public boolean equals(Object obj) { +if(obj == null) { +return false; +} +if(!(obj instanceof PDFFunction)) { +return false; +} +PDFFunction func = (PDFFunction)obj; +if(functionType != func.functionType) { +return false; +} +if(bitsPerSample != func.bitsPerSample) { +return false; +} +if(order != func.order) { +return false; +} +if(interpolationExponentN != func.interpolationExponentN) { +return false; +} +if(domain != null) { +if(!domain.equals(func.domain)) { +return false; +} +} else if(func.domain != null) { +return false; +} +if(range != null) { +if(!range.equals(func.range)) { +return false; +} +} else if(func.range != null) { +return
font state and associates
Hi All, Has anyone looked at the font state stuff. It appears we could make some changes to improve the way fonts are handled. - handle font information easily - handle font lists, resolving on a char basis - reduce number of FontState objects if information is the same (or similar?) - allow for serialization as part of area tree Do we need the FontInfo and FontMetric inside the FontState? Can we have a list of all font states so that it can be retrieved when needed for a particular layout of area? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: font state and associates
Hi Keiron Not enough to be of any help right now. But reading this the Flyweight pattern from the Design Patterns book comes to my mind immediately. The list of all font states is the consequence of this pattern which could be very helpful for the renderers. The PS renderer still writes a list of all registered (instead of used) fonts at the beginning so they are available when necessary. You can't just register objects into the stream when encountered like in PDF. Of course, the list grows over time during layout while the renderer should already start writing out pages. But that's another problem... Sorry, if this a bit meager but on the other side In two weeks I'll be starting my well-earned 7 weeks long holidays after really intensive 10 months. I'll be away during two weeks in August but I'll have 5 weeks from which I'd like to spend at least a full week to help with the redesign without having customers in my neck (read: I want to have some fun). Let me know if there's a particular area I could help out. I was thinking about the following areas: Avalon, Configuration, API, renderers. But I'd be glad to help in other areas if I can. While I'm at it, I'd like to apologize for my lack of participation during the last weeks (especially with the API stuff). Too many things buzzing around my head... Has anyone looked at the font state stuff. It appears we could make some changes to improve the way fonts are handled. - handle font information easily - handle font lists, resolving on a char basis - reduce number of FontState objects if information is the same (or similar?) - allow for serialization as part of area tree Do we need the FontInfo and FontMetric inside the FontState? Can we have a list of all font states so that it can be retrieved when needed for a particular layout of area? Cheers, Jeremias Märki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: font state and associates
Keiron Liddle wrote: - handle font lists, resolving on a char basis Do we really need it? It'll slow down rendering. btw, neither xep nor antenna don't support it. - reduce number of FontState objects if information is the same (or similar?) That's good idea, now we create new FontState for each text node. What about FontState pool? - allow for serialization as part of area tree Do we need the FontInfo and FontMetric inside the FontState? Not sure about FontMetric but FontInfo object is actually 1 for the whole rendering process and each FontState doesn't have to remember it. -- Oleg Tkachenko Multiconn International, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: font state and associates
On Thu, 2002-07-18 at 16:05, Oleg Tkachenko wrote: Keiron Liddle wrote: - handle font lists, resolving on a char basis Do we really need it? It'll slow down rendering. btw, neither xep nor antenna don't support it. Normally it does a lookup on every char anyway. I would have to check but most of the time it should be the same lookup as it does now. It is only of a list is specified and it doesn't find the char the first go. - reduce number of FontState objects if information is the same (or similar?) That's good idea, now we create new FontState for each text node. What about FontState pool? - allow for serialization as part of area tree Do we need the FontInfo and FontMetric inside the FontState? Not sure about FontMetric but FontInfo object is actually 1 for the whole rendering process and each FontState doesn't have to remember it. The font metric has a number of sets that remain constant for the process. -- Oleg Tkachenko Multiconn International, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
image rendering
Dear all, I use the external graphic tag for adding an image to my document... but it doesn't show nicely it is a jpeg straight from a vector image (eps) and in the correct size as it should be shown is there a way to make the image sharper when it is in the pdf of embedd it sharper? Cause @ this time it realy looks bad... if you wan't i'll send you guyz the pdf and the logo... greetings Jochen Maes ICT Development KBC Securities (kbcsecurities.com) Havenlaan 12 Avenue du Port SIF 8683 B-1080 Brussels Belgium Tel: +32 2 429 96 81 GSM: +32 496 57 90 99 E-mail : [EMAIL PROTECTED] This message and any attachments hereto are for the named person's use only. It may contain confidential, proprietary or legally privileged information. You may not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. If you have received this e-mail message without being the intended recipient, please notify KBC Securities promptly and delete this e-mail. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of KBC Securities. KBC Securities reserves the right to monitor all e-mail communications through its networks and any messages addressed to, received or sent by KBC Securities or its employees are deemed to be professional in nature. The sender or recipient of any messages to or of KBC Securities agrees that those may be read by other employees of KBC Securities than the stated recipient or sender in order to ensure the continuity of work-related activities and allow supervision thereof. KBC Securities does not accept liability for the correct and complete transmission of the information, nor for any delay or interruption of the transmission, nor for damages arising from the use of, or reliance on, the information. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: page-break-inside=avoid
J Thanks for the reply. I was able solve my problem with the info you provided. Todd [EMAIL PROTECTED] 07/17/02 06:10PM Todd Migliore wrote: My document contains one repeating block of data. The data varies in length with each iteration. I need to force a page break if an iteration of the block of data can not entirely fit on the current page page. From what I understand page-break-inside="avoid" is the way to go about this, unfortunately it seems this feature is not yet implemented(version-0.20.3). Does anyone know of solution to this problem? Thanks in advance. T Look here for hints: http://marc.theaimsgroup.com/?l=fop-userm=102102545323696w=2J.Pietschmann-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, email: [EMAIL PROTECTED]
DO NOT REPLY [Bug 6844] - No line breaks inserted in list-item-label
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6844. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6844 No line breaks inserted in list-item-label [EMAIL PROTECTED] changed: What|Removed |Added OS/Version|Linux |All Priority|Other |Medium Version|0.20.3 |0.20.4 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/apps StreamRenderer.java
pietsch 2002/07/18 15:47:41 Modified:src/org/apache/fop/apps Tag: fop-0_20_2-maintain StreamRenderer.java Log: Fixed a class cast error with retrieve-marker Submitted by: Trond Aasan [EMAIL PROTECTED] Revision ChangesPath No revision No revision 1.6.2.5 +5 -7 xml-fop/src/org/apache/fop/apps/Attic/StreamRenderer.java Index: StreamRenderer.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Attic/StreamRenderer.java,v retrieving revision 1.6.2.4 retrieving revision 1.6.2.5 diff -u -r1.6.2.4 -r1.6.2.5 --- StreamRenderer.java 26 Jun 2002 20:37:49 - 1.6.2.4 +++ StreamRenderer.java 18 Jul 2002 22:47:41 - 1.6.2.5 @@ -327,7 +327,8 @@ else pageIndex = renderQueue.indexOf(current); if ((pageIndex + 1) renderQueue.size()) { -nextPage = (Page)renderQueue.elementAt(pageIndex + 1); +nextPage = ((RenderQueueEntry)renderQueue +.elementAt(pageIndex + 1)).getPage(); if (isWithinPageSequence !nextPage.getPageSequence().equals(current.getPageSequence())) { nextPage = null; @@ -344,15 +345,12 @@ pageIndex = renderQueue.size(); else pageIndex = renderQueue.indexOf(current); -// System.out.println(Page index = + pageIndex); if ((pageIndex - 1) = 0) { -previousPage = (Page)renderQueue.elementAt(pageIndex - 1); +previousPage = ((RenderQueueEntry)renderQueue +.elementAt(pageIndex - 1)).getPage(); PageSequence currentPS = current.getPageSequence(); -// System.out.println(Current PS = ' + currentPS + '); PageSequence previousPS = previousPage.getPageSequence(); -// System.out.println(Previous PS = ' + previousPS + '); if (isWithinPageSequence !previousPS.equals(currentPS)) { -// System.out.println(Outside page sequence); previousPage = null; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ClassCastException in StreamRenderer$RenderQueueEntry
Trond Aasan wrote: fop 0.20.4 java.lang.ClassCastException: org.apache.fop.apps.StreamRenderer$RenderQueueEntry at org.apache.fop.apps.StreamRenderer.getPreviousPage(StreamRenderer.java:349) StreamRenderer.java:349: previousPage = (Page)renderQueue.elementAt(pageIndex - 1); This should be something like: previousPage = ((RenderQueueEntry)renderQueue.elementAt(pageIndex - 1)).getPage(); Committed to CVS maintenance branch. Thank you for the patch. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/flow RetrieveMarker.java
pietsch 2002/07/18 17:30:14 Modified:src/org/apache/fop/apps Tag: fop-0_20_2-maintain StreamRenderer.java src/org/apache/fop/fo/flow Tag: fop-0_20_2-maintain RetrieveMarker.java Log: Fixed marker retrival to a large degree. It works now for arbitrary retrival boundaries as long as the referenced page is still in the renderer queue (could be enforced by forward referencing page number citation) Markers which are immediate children of a flow still don't work. Revision ChangesPath No revision No revision 1.6.2.6 +46 -33xml-fop/src/org/apache/fop/apps/Attic/StreamRenderer.java Index: StreamRenderer.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Attic/StreamRenderer.java,v retrieving revision 1.6.2.5 retrieving revision 1.6.2.6 diff -u -r1.6.2.5 -r1.6.2.6 --- StreamRenderer.java 18 Jul 2002 22:47:41 - 1.6.2.5 +++ StreamRenderer.java 19 Jul 2002 00:30:13 - 1.6.2.6 @@ -318,42 +318,55 @@ } } - public Page getNextPage(Page current, boolean isWithinPageSequence, -boolean isFirstCall) { -Page nextPage = null; -int pageIndex = 0; -if (isFirstCall) -pageIndex = renderQueue.size(); -else -pageIndex = renderQueue.indexOf(current); -if ((pageIndex + 1) renderQueue.size()) { -nextPage = ((RenderQueueEntry)renderQueue -.elementAt(pageIndex + 1)).getPage(); -if (isWithinPageSequence - !nextPage.getPageSequence().equals(current.getPageSequence())) { -nextPage = null; -} -} -return nextPage; -} + // unused and broken +// public Page getNextPage(Page current, boolean isWithinPageSequence, +// boolean isFirstCall) { +// Page nextPage = null; +// int pageIndex = 0; +// if (isFirstCall) +// pageIndex = renderQueue.size(); +// else +// pageIndex = renderQueue.indexOf(current); +// if ((pageIndex + 1) renderQueue.size()) { +// nextPage = ((RenderQueueEntry)renderQueue +// .elementAt(pageIndex + 1)).getPage(); +// if (isWithinPageSequence +// !nextPage.getPageSequence().equals(current.getPageSequence())) { +// nextPage = null; +// } +// } +// return nextPage; +// } public Page getPreviousPage(Page current, boolean isWithinPageSequence, boolean isFirstCall) { -Page previousPage = null; -int pageIndex = 0; -if (isFirstCall) -pageIndex = renderQueue.size(); -else -pageIndex = renderQueue.indexOf(current); -if ((pageIndex - 1) = 0) { -previousPage = ((RenderQueueEntry)renderQueue -.elementAt(pageIndex - 1)).getPage(); -PageSequence currentPS = current.getPageSequence(); -PageSequence previousPS = previousPage.getPageSequence(); -if (isWithinPageSequence !previousPS.equals(currentPS)) { -previousPage = null; +if (isFirstCall) { +int pageIndex = renderQueue.size(); +if (pageIndex 0) { +Page previousPage = ((RenderQueueEntry)renderQueue + .elementAt(pageIndex - 1)).getPage(); +PageSequence currentPS = current.getPageSequence(); +PageSequence previousPS = previousPage.getPageSequence(); +if (!isWithinPageSequence || previousPS.equals(currentPS)) { + return previousPage; +} +} +} else { +for (int pageIndex=renderQueue.size()-1;pageIndex0;pageIndex--) { +Page page = ((RenderQueueEntry)renderQueue + .elementAt(pageIndex)).getPage(); +if (current.equals(page)) { +Page previousPage = ((RenderQueueEntry)renderQueue + .elementAt(pageIndex - 1)).getPage(); +PageSequence currentPS = current.getPageSequence(); +PageSequence previousPS = previousPage.getPageSequence(); +if (!isWithinPageSequence || previousPS.equals(currentPS)) { +return previousPage; +} +return null; +} } } -
the license of Chinese hyphenation pattern file
hello: who can help me to make the license of Chinese hyphenation pattern file, such as the following hyphenation patterns are part of the Fop distribution da Danish de German (traditional) de_DR German (new spelling) en American English en_GB British English en_US American English es Spanish fi Finnish fr French it Italian nl Dutch (new official Dutch spelling) face-6.gif Description: GIF image - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]