Re: Need advice in implementing signed PDF files
On Mon, 2002-07-22 at 19:12, Miguel A Paraz wrote: I don't know. What do you think it should do? Sorry, let me rephrase that. My question is, what is the proper way for a PDFFilter subclass to read values from the configuration file? The signing system would need access to the name of the private key, for instance. Are we talking maintanence branch, if so the configuration is static and you simply put a key+value pair in the config and read the value using the key. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
page break
Devs, Is it possible to tell FOP to clip the text, when the block will not fit in the respctive region? I don't want the block to spanacross lines.. [RamanaJV]
Re: FOP doc
On Mon, 2002-07-22 at 22:26, Victor Mote wrote: FOP developers: As I am trying to get my arms around FOP, I am finding some things that I probably ought to propose as changes to the documentation, but I am confused about the mechanism for doing so. Hope you have long arms. 1. It appears that the main documentation deliverable is the HTML pages that are on the web site and included in the distribution. Is that correct? Has any thought been given toward using FOP to generate PDF manuals, perhaps broken down between user and developer issues? If you don't know there is an effort going on called Forrest that is an overhaul of the website documentation process etc. It will eventually be creating pdf files etc. If you want to help out there then go to: http://xml.apache.org/forrest/ I'm sure they would be glad for the help. 2. Are doc change proposals intended to work the same way that source changes do -- ie. submit a patch to a committer? Or, is the doc function centralized? If the former, then continue with the remaining questions. If the answer is the latter, then to whom should documentation change requests be made? Just submit a patch to the dev list and it will be dealt with. 3. Running build.sh usage indicates that build.sh docs should build the html documentation. There is no target for docs, but there is one for htmldoc. This appears to be a bug, for which I will submit a patch after I am more confident that I understand what should be happening. 4. Running build.sh htmldoc fails: /u/vic/xml-fop/build.xml:658: Could not find file /u/vic/xml-fop/docs/xml-docs/fop.xml to copy. My CVS download of the fop-0_20_2-maintain branch does not have this file anywhere (updated 7-22-02, approx 8:00 GMT). This is what makes me think that the doc function is perhaps centralized (??). The documentation is in the cvs trunk. I'm sorry if these are newbie questions. The good news is that after you all give me the answers, I will attempt to document them for the next guy. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP doc
As I am trying to get my arms around FOP, I am finding some things that I probably ought to propose as changes to the documentation, but I am confused about the mechanism for doing so. 1. It appears that the main documentation deliverable is the HTML pages that are on the web site and included in the distribution. Is that correct? Has any thought been given toward using FOP to generate PDF manuals, perhaps broken down between user and developer issues? The ant target pdfdoc should generate a PDF from the documenation. I don't know if it works right now. I'll check it out next week. 2. Are doc change proposals intended to work the same way that source changes do -- ie. submit a patch to a committer? Or, is the doc function centralized? If the former, then continue with the remaining questions. If the answer is the latter, then to whom should documentation change requests be made? Same as source. Send a patch, we review it and apply it to CVS if everything's ok. 3. Running build.sh usage indicates that build.sh docs should build the html documentation. There is no target for docs, but there is one for htmldoc. This appears to be a bug, for which I will submit a patch after I am more confident that I understand what should be happening. That's a matter of conventions, but not really a bug. Maybe we should simply have a target docs that calls htmldoc and pdfdoc. I'll check that out, too. 4. Running build.sh htmldoc fails: /u/vic/xml-fop/build.xml:658: Could not find file /u/vic/xml-fop/docs/xml-docs/fop.xml to copy. My CVS download of the fop-0_20_2-maintain branch does not have this file anywhere (updated 7-22-02, approx 8:00 GMT). This is what makes me think that the doc function is perhaps centralized (??). The docs were recently removed from the maintenance branch. All documentation is now only in the main branch so there's less work on docs maintenance. So probably we may just need to remove the doc generation stuff from build.xml. If you want to build the docs yourself, check out the main branch of FOP which includes the docs. I'm sorry if these are newbie questions. The good news is that after you all give me the answers, I will attempt to document them for the next guy. Thanks. That's cool. The problems all seem to result from a not fully finished process of reorganizing our documentation. I'll have some time during the next weeks to see into this. But if you provide helpful patches, even better. Cheers, Jeremias Märki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Duplex printing
Title: RE: Performance Analysis Dear All, I'm tryingto print the pages in duplex mode. I have written the following function. But this is not working. Is it a problem with JDK or with FOP. When I call this method, a printer dialog is shown with the option duplex selected, but the pages are not printed in duplex mode. I'm able to duplex print from microsoft applications. private void printToPrinter(){// Build a set of attributesPrintRequestAttributeSet aset = new HashPrintRequestAttributeSet(); aset.add(Sides.DUPLEX); PrinterJob pj = PrinterJob.getPrinterJob();if (pj.printDialog(aset)){ // renderer is AWT renderer pj.setPageable(renderer);try{pj.print(aset);}catch (PrinterException pe){pe.printStackTrace();}}}Please correct me, Ramana.
Re: PDF output driver
On Tue, 2002-07-23 at 00:10, Kevin O'Neill wrote: I'm new to fop, so please give me a little leeway :). I've been looking at FOPs PDF library to help me with some direct PDF generation tasks that are not presently suited to XSL:FO (I need absolute positioning, layering and the ability to use XObject Forms). FOP has about the nicest and low level PDF library I've come across, a true undiscovered gem. Enough of the glowing praise :). I've noticed from the CVS logs that the separation of the PDF code is a recent thing; are there current plans to extend it's usefulness beyond that of mealy being an output renderer for FOP? There aren't any specific plans in that direction but you can always make some if you want :) Would you consider adding contributed classes (like the aforementioned XObjectForm) that there is no real XSL:FO imperative for? I was considering using XObject forms to render embedded svg so that it can be reused in the pdf document without redrawing the svg (for static regions etc.). So there may well be an XSL:FO use for it anyway (along with other ideas like reusing for table headers, static regions that are the same on each page). So we would definitely consider it! Separating the generation of the PDF support into an additional build target for people like me who what to use the PDF functionality without the additional XSL:FO components? I don't see why not. In general it is a good idea to keep independant parts of the code separate. This will promote that more. We now have a pdf-transcoder target that builds just a jar that can be used as a transcoder for batik. We could split things up further and have: pdf jar, svg stuff jar, hyph jar, the rest jar. Keiron. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: page break
On Tue, 2002-07-23 at 08:47, RamanaJV wrote: Devs, Is it possible to tell FOP to clip the text, when the block will not fit in the respctive region? I don't want the block to span across lines.. Currently no. This is something that will be implemented in the new design. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: page break
Then, Is it possible to know, without actually rendering, how many lines a block is expected to span. I really need this now in my application to get away from the pagination problem that are occuring. Also, is it possible to know, how many lines of text can be written on to a page with specific dimensions? Ramana. -Original Message- From: Keiron Liddle [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 12:37 PM To: FOP Subject: Re: page break On Tue, 2002-07-23 at 08:47, RamanaJV wrote: Devs, Is it possible to tell FOP to clip the text, when the block will not fit in the respctive region? I don't want the block to span across lines.. Currently no. This is something that will be implemented in the new design. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: page break
On Tue, 2002-07-23 at 09:08, RamanaJV wrote: Then, Is it possible to know, without actually rendering, how many lines a block is expected to span. I really need this now in my application to get away from the pagination problem that are occuring. Also, is it possible to know, how many lines of text can be written on to a page with specific dimensions? Only the layout process can determine how many lines a block will span. You can calculate how many lines will fit on a page by working out the line height or setting the line height (note the if the line height is set it uses a slightly different number, its a bug) and the spacing between blocks. You are probably better of rendering to xml then reading that. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/image/analyser TIFFReader.java
keiron 2002/07/23 03:59:10 Modified:src/org/apache/fop/image AbstractFopImage.java src/org/apache/fop/image/analyser TIFFReader.java Log: prevent npe Revision ChangesPath 1.10 +6 -4 xml-fop/src/org/apache/fop/image/AbstractFopImage.java Index: AbstractFopImage.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/AbstractFopImage.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- AbstractFopImage.java 27 Jun 2002 11:45:54 - 1.9 +++ AbstractFopImage.java 23 Jul 2002 10:59:09 - 1.10 @@ -93,9 +93,11 @@ public AbstractFopImage(URL href, FopImage.ImageInfo info) { this.m_href = href; this.imageInfo = info; -this.m_width = this.imageInfo.width; -this.m_height = this.imageInfo.height; -loaded = loaded | DIMENSIONS; +if(this.imageInfo.width != -1) { +m_width = imageInfo.width; +m_height = imageInfo.height; +loaded = loaded | DIMENSIONS; +} } public String getMimeType() { 1.6 +5 -2 xml-fop/src/org/apache/fop/image/analyser/TIFFReader.java Index: TIFFReader.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/analyser/TIFFReader.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- TIFFReader.java 25 Feb 2002 09:31:03 - 1.5 +++ TIFFReader.java 23 Jul 2002 10:59:09 - 1.6 @@ -77,7 +77,10 @@ * byte4 ); * this.height = ( int ) ( l ); */ - return null; + FopImage.ImageInfo info = new FopImage.ImageInfo(); + info.width = -1; + info.height = -1; + return info; } protected byte[] getDefaultHeader(BufferedInputStream imageStream) throws IOException { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: the license of Chinese hyphenation pattern file
stoneson [EMAIL PROTECTED] wrote: the problem is : when I use to write a part of Chinese in the block or table-cell, the Chinese text could not broken in the end of line. so I use the hyhens to fixed it, the problem solved, but there is not hyhens file of Chinese for FOP, I wonder is there any good way to make the text broken if I would not use hyhens.?? What some people do is to put a space character ( ) after every Chinese character. It spaces out the text a little, but at least FOP knows where it can break the lines, and it looks better than hyphens (which can be mistaken for the number 1). At some point the FOP developers need to implement the Unicode Line Breaking Algorithm (described in http://www.unicode.org/unicode/reports/tr14/) so that FOP can break lines of Chinese/Japanese/etc. without needing extra spaces. -Peter- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Preserving Linefeed character
Hi, I have an XML document which contains a linefeed character in one of the lines. However, when I process this into PDF using FOP, the outputted line has a space where the linefeed should be. My XML: Data val=Line1#x0A;Line2/ My XSL: fo:block text-align=left font-weight=normal linefeed-treatment=preservexsl:value-of select=Data/@val//fo:block What I want to appear in the PDF: Line1 Line2 What is actually appearing: Line1Line2 The FO documentation indicates that linefeed-treatment=preserve should keep the linefeed, but it is not. I suspect that the problem may be that FOP does not support the linefeed-treatment property. Is this the case? If so, can anyone suggest how I can get around this problem? Thanks, Haitham. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
FOP extension elements
Hello all, The following is stated on the FOP website: These extension are available by default. They are automatically loaded and you only need to provide the correct namespace for your embedded xml markup. OK, so fop:outline and fop:label are loaded by default without needing to do the other stuff described in Adding Your Own. What is the mechanism that allows this? In other words, if I have an extension element(s) of my own, what do I have to do in order for them work the same as outline and label and not have to load my own jars. I am assuming, of course, that the documentation listed is still accurate. If it is not, can anyone provide the most recent information for include extension elements? thanks for helping, Matthew L. Avizinis mailto:[EMAIL PROTECTED] Gleim Publications, Inc. 4201 NW 95th Blvd. Gainesville, FL 32606 (352)-375-0772 www.gleim.com http://www.gleim.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: pls help with getting latest maint version
[EMAIL PROTECTED] wrote: Hi all, pls forgive me, and i know this must be the millionth time you're being asked for it, but can someone pls send me the FTP command for getting the latest maint version? Or even better, can someone pls send me the latest maintenance version jar..thx You can't get the maintenance version by FTP, you have to check it out from CVS. THis has been recently discussed, search the list archives at http://marc.theaimsgroup.com/?l=fop-devr=1w=2# http://marc.theaimsgroup.com/?l=fop-userr=1w=2# or look into http://marc.theaimsgroup.com/?l=fop-devm=102708776206768w=2 J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/svg SVGObj.java
pietsch 2002/07/23 18:06:26 Modified:src/org/apache/fop/extensions Tag: fop-0_20_2-maintain Label.java Outline.java src/org/apache/fop/fo Tag: fop-0_20_2-maintain ColorProfile.java Declarations.java FObj.java FObjMixed.java Title.java ToBeImplementedElement.java Unknown.java UnknownXMLObj.java XMLElement.java XMLObj.java src/org/apache/fop/fo/flow Tag: fop-0_20_2-maintain BasicLink.java BidiOverride.java Block.java BlockContainer.java Character.java ExternalGraphic.java Float.java Flow.java Footnote.java FootnoteBody.java InitialPropertySet.java Inline.java InlineContainer.java InstreamForeignObject.java Leader.java ListBlock.java ListItem.java ListItemBody.java ListItemLabel.java Marker.java MultiCase.java MultiProperties.java MultiPropertySet.java MultiSwitch.java MultiToggle.java PageNumber.java PageNumberCitation.java RetrieveMarker.java StaticContent.java Table.java TableAndCaption.java TableBody.java TableCaption.java TableCell.java TableColumn.java TableFooter.java TableHeader.java TableRow.java Wrapper.java src/org/apache/fop/fo/pagination Tag: fop-0_20_2-maintain ConditionalPageMasterReference.java LayoutMasterSet.java PageSequence.java PageSequenceMaster.java Region.java RegionAfter.java RegionBefore.java RegionBody.java RegionEnd.java RegionStart.java RepeatablePageMasterAlternatives.java RepeatablePageMasterReference.java Root.java SimplePageMaster.java SinglePageMasterReference.java src/org/apache/fop/svg Tag: fop-0_20_2-maintain SVGObj.java Log: Removed 'name' field and diverse getElementName() methods, replaced by getName() returning a string constant. A few minor cosmetic changes. Revision ChangesPath No revision No revision 1.2.2.2 +4 -1 xml-fop/src/org/apache/fop/extensions/Label.java Index: Label.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/extensions/Label.java,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -u -r1.2.2.1 -r1.2.2.2 --- Label.java16 Jul 2002 20:04:43 - 1.2.2.1 +++ Label.java24 Jul 2002 01:06:21 - 1.2.2.2 @@ -39,5 +39,8 @@ return textBuffer.toString(); } +public String getName() { +return fop:label; +} } 1.4.2.1 +4 -1 xml-fop/src/org/apache/fop/extensions/Outline.java Index: Outline.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/extensions/Outline.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -r1.4 -r1.4.2.1 --- Outline.java 21 Aug 2001 08:26:11 - 1.4 +++ Outline.java 24 Jul 2002 01:06:21 - 1.4.2.1 @@ -103,6 +103,9 @@ return _internalDestination; } +public String getName() { +return fop:outline; +} } No revision No revision 1.4.2.1 +6 -10 xml-fop/src/org/apache/fop/fo/ColorProfile.java Index: ColorProfile.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/ColorProfile.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -r1.4 -r1.4.2.1 --- ColorProfile.java 20 Aug 2001 11:19:22 - 1.4 +++ ColorProfile.java 24 Jul 2002 01:06:21 - 1.4.2.1 @@ -11,21 +11,15 @@ import org.apache.fop.fo.*; import org.apache.fop.fo.flow.*; import org.apache.fop.fo.properties.*; -import org.apache.fop.layout.AreaTree; import org.apache.fop.apps.FOPException; -/** - * The fo:root formatting object. Contains page masters, root extensions, - * page-sequences. - */ -public class ColorProfile extends ToBeImplementedElement { +public class ColorProfile extends FObj { public static class Maker extends FObj.Maker { public FObj make(FObj parent, PropertyList propertyList) throws FOPException { return new ColorProfile(parent, propertyList); } - }
Flow and region-body
Hi, I'm about to remove some hackery from the maintenance branch, as part of a general cleanup. There is a comment in Flow.java (soon/now AbstractFlow.java) // flow is *always* laid out into a BodyAreaContainer I was not able to find support for this directly in the spec, although I think this is reasonable. Can anybody comment on this? I nail this down for now, apparently this is how FOP currently works anyway. Actually, routing static-content into a body region causes FOP to loop, and if neither the flow nor static content go into the body a no flow found is logged/thrown. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Flow and region-body
-Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED]] Sent: July 23, 2002 11:12 PM To: fop dev Subject: Flow and region-body Hi, I'm about to remove some hackery from the maintenance branch, as part of a general cleanup. There is a comment in Flow.java (soon/now AbstractFlow.java) // flow is *always* laid out into a BodyAreaContainer I was not able to find support for this directly in the spec, although I think this is reasonable. Can anybody comment on this? I nail this down for now, apparently this is how FOP currently works anyway. Actually, routing static-content into a body region causes FOP to loop, and if neither the flow nor static content go into the body a no flow found is logged/thrown. J.Pietschmann I believe I had something to do with this. :-) Basically, you're right - there is no direct support in the spec for the assertion that fo:flow content must go into fo:region-body child areas, and fo:static-contents go into the 4 other regions' child areas. I think it is clearly the intent of XSL 1.0, however, that fo:flow content go into fo:region-body, and fo:static-content go into the other 4 regions. After all, it is impossible to look at the specialisation of fo:region-body and not realise that it occupies a special position in the region pantheon. Down the road, with XSL 2.0, we may see some generalisation of flows of the fo:flow type, and have more flexibility than just one single fo:region-body. Regards, Arved Sandstrom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/src/org/apache/fop/fo/pagination PageSequence.java
pietsch 2002/07/23 19:39:45 Modified:src/org/apache/fop/fo/flow Tag: fop-0_20_2-maintain Flow.java StaticContent.java src/org/apache/fop/fo/pagination Tag: fop-0_20_2-maintain PageSequence.java Added: src/org/apache/fop/fo/flow Tag: fop-0_20_2-maintain AbstractFlow.java Log: Removed fo:flow hackery. Simplified structure checking and page layout loop. Some minor cosmetic changes. Revision ChangesPath No revision No revision 1.24.2.3 +2 -181xml-fop/src/org/apache/fop/fo/flow/Flow.java Index: Flow.java === RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Flow.java,v retrieving revision 1.24.2.2 retrieving revision 1.24.2.3 diff -u -r1.24.2.2 -r1.24.2.3 --- Flow.java 24 Jul 2002 01:06:22 - 1.24.2.2 +++ Flow.java 24 Jul 2002 02:39:44 - 1.24.2.3 @@ -12,82 +12,25 @@ import org.apache.fop.fo.properties.*; import org.apache.fop.fo.pagination.*; import org.apache.fop.layout.Area; -import org.apache.fop.layout.BodyAreaContainer; import org.apache.fop.apps.FOPException; -// Java -import java.util.Hashtable; -import java.util.Enumeration; -import java.util.Vector; - -public class Flow extends FObj { +public class Flow extends AbstractFlow { public static class Maker extends FObj.Maker { public FObj make(FObj parent, PropertyList propertyList) throws FOPException { return new Flow(parent, propertyList); } - } public static FObj.Maker maker() { return new Flow.Maker(); } -/** - * PageSequence container - */ -private PageSequence pageSequence; - -/** - * Area in which we lay out our kids - */ -private Area area; - -/** - * Vector to store snapshot - */ -private Vector markerSnapshot; - -/** - * flow-name attribute - */ -private String _flowName; - -/** - * Content-width of current column area during layout - */ -private int contentWidth; - -private Status _status = new Status(Status.AREA_FULL_NONE); - - protected Flow(FObj parent, PropertyList propertyList) throws FOPException { super(parent, propertyList); - -if (parent.getName().equals(fo:page-sequence)) { -this.pageSequence = (PageSequence)parent; -} else { -throw new FOPException(flow must be child of page-sequence, not - + parent.getName()); -} setFlowName(getProperty(flow-name).getString()); - -// according to communication from Paul Grosso (XSL-List, -// 001228, Number 406), confusion in spec section 6.4.5 about -// multiplicity of fo:flow in XSL 1.0 is cleared up - one (1) -// fo:flow per fo:page-sequence only. - -if (pageSequence.isFlowSet()) { -if (getName().equals(fo:flow)) { -throw new FOPException(Only a single fo:flow permitted - + per fo:page-sequence); -} else { -throw new FOPException(getName() - + not allowed after fo:flow); -} -} pageSequence.addFlow(this); } @@ -105,128 +48,6 @@ _flowName = name; } -} - -public String getFlowName() { -return _flowName; -} - -public Status layout(Area area) throws FOPException { -return layout(area, null); - -} - -public Status layout(Area area, Region region) throws FOPException { -if (this.marker == START) { -this.marker = 0; -} - -// flow is *always* laid out into a BodyAreaContainer -BodyAreaContainer bac = (BodyAreaContainer)area; - -boolean prevChildMustKeepWithNext = false; -Vector pageMarker = this.getMarkerSnapshot(new Vector()); - -int numChildren = this.children.size(); -if (numChildren == 0) { -throw new FOPException(fo:flow must contain block-level children); -} -for (int i = this.marker; i numChildren; i++) { -FObj fo = (FObj)children.elementAt(i); - -if (bac.isBalancingRequired(fo)) { -// reset the the just-done span area in preparation -// for a backtrack for balancing -bac.resetSpanArea(); - -this.rollback(markerSnapshot); -// one less because of the continue -i = this.marker - 1;