Re: 0.20.5rc3 (was Re: PDF Encryption: Clarification)
Jeremias Maerki wrote: +1 for a 0.20.5rc3 ASAP (as Clay Leeds suggests). 0.20.5rc2 is bugged and I believe Jörg is tired of marking new bug reports as duplicates. :-) +1 for really (!) going to bugfixing-only mode in the maintenance branch. +1 for 0.20.5 being the last release from the maintenance branch. ditto. -- Oleg Tkachenko http://www.tkachenko.com/blog Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/render/pdf FontTriplet.java
jeremias2003/04/03 04:50:03 Modified:src/java/org/apache/fop/render/pdf FontTriplet.java Log: Added toString() method for debugging Revision ChangesPath 1.2 +7 -0 xml-fop/src/java/org/apache/fop/render/pdf/FontTriplet.java Index: FontTriplet.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/pdf/FontTriplet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- FontTriplet.java 11 Mar 2003 13:05:13 - 1.1 +++ FontTriplet.java 3 Apr 2003 12:50:03 - 1.2 @@ -92,5 +92,12 @@ public String getStyle() { return style; } + +/** + * @see java.lang.Object#toString() + */ +public String toString() { +return getName() + , + getStyle() + , + getWeight(); +} } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/render/pdf FontSetup.java
jeremias2003/04/03 04:51:27 Modified:src/java/org/apache/fop/render/pdf FontSetup.java Log: Fix font registration (normal and bold work again, invalid values get barked at) Make the kerning and embedding-url attributes optional as it should be Revision ChangesPath 1.3 +18 -5 xml-fop/src/java/org/apache/fop/render/pdf/FontSetup.java Index: FontSetup.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/pdf/FontSetup.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- FontSetup.java27 Mar 2003 11:17:46 - 1.2 +++ FontSetup.java3 Apr 2003 12:51:27 - 1.3 @@ -233,11 +233,24 @@ try { weight = Integer.parseInt(triplet.getWeight()); weight = ((int)weight / 100) * 100; -weight = Math.min(weight, 100); -weight = Math.max(weight, 900); +weight = Math.max(weight, 100); +weight = Math.min(weight, 900); } catch (NumberFormatException nfe) { -/[EMAIL PROTECTED] log this exception */ +//weight is no number, so convert smybolic name to number +if (triplet.getWeight().equals(normal)) { +weight = 400; +} else if (triplet.getWeight().equals(bold)) { +weight = 700; +} else { +throw new IllegalArgumentException( +Illegal value for font weight: ' ++ triplet.getWeight() ++ '. Use one of: 100, 200, 300, ++ 400, 500, 600, 700, 800, 900, ++ normal (=400), bold (=700)); +} } +//System.out.println(Registering: +triplet+ weight=+weight); fontInfo.addFontProperties(internalName, triplet.getName(), triplet.getStyle(), @@ -291,8 +304,8 @@ EmbedFontInfo efi; efi = new EmbedFontInfo(font[i].getAttribute(metrics-url), -font[i].getAttributeAsBoolean(kerning), -tripleList, font[i].getAttribute(embed-url)); +font[i].getAttributeAsBoolean(kerning, false), +tripleList, font[i].getAttribute(embed-url, null)); fontList.add(efi); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/fonts MultiByteFont.java CIDFont.java
jeremias2003/04/03 04:53:44 Modified:src/java/org/apache/fop/render/pdf FontReader.java src/java/org/apache/fop/pdf PDFFactory.java src/java/org/apache/fop/fonts MultiByteFont.java CIDFont.java Log: Fix TrueType embedding. Width array did not reflect the subset. Was my bad. Revision ChangesPath 1.3 +1 -1 xml-fop/src/java/org/apache/fop/render/pdf/FontReader.java Index: FontReader.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/pdf/FontReader.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- FontReader.java 15 Mar 2003 16:58:59 - 1.2 +++ FontReader.java 3 Apr 2003 12:53:44 - 1.3 @@ -304,7 +304,7 @@ wds[j++] = i.intValue(); } -multiFont.addCIDWidthEntry(cidWidthIndex, wds); +//multiFont.addCIDWidthEntry(cidWidthIndex, wds); multiFont.setWidthArray(wds); } else if (bfranges.equals(localName)) { 1.3 +1 -1 xml-fop/src/java/org/apache/fop/pdf/PDFFactory.java Index: PDFFactory.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/pdf/PDFFactory.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- PDFFactory.java 27 Mar 2003 11:04:31 - 1.2 +++ PDFFactory.java 3 Apr 2003 12:53:44 - 1.3 @@ -1023,7 +1023,7 @@ new PDFCIDFont(basefont, cidMetrics.getCIDType(), cidMetrics.getDefaultWidth(), - cidMetrics.getWidths(), sysInfo, + cidMetrics.getSubsetWidths(), sysInfo, (PDFCIDFontDescriptor)pdfdesc); getDocument().registerObject(cidFont); 1.2 +20 -19xml-fop/src/java/org/apache/fop/fonts/MultiByteFont.java Index: MultiByteFont.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fonts/MultiByteFont.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MultiByteFont.java11 Mar 2003 13:05:15 - 1.1 +++ MultiByteFont.java3 Apr 2003 12:53:44 - 1.2 @@ -73,7 +73,7 @@ private CIDFontType cidType = CIDFontType.CIDTYPE2; private String namePrefix = null;// Quasi unique prefix -private PDFWArray warray = new PDFWArray(); +//private PDFWArray warray = new PDFWArray(); private int width[] = null; private BFEntry[] bfentries = null; @@ -170,23 +170,6 @@ } } -/* unused -public PDFWArray getWidthsAsPDFWArray() { -if (isEmbeddable()) { -// Create widths for reencoded chars -warray = new PDFWArray(); -int[] tmpWidth = new int[usedGlyphsCount]; - -for (int i = 0; i usedGlyphsCount; i++) { -Integer nw = (Integer)usedGlyphsIndex.get(new Integer(i)); -int nwx = (nw == null) ? 0 : nw.intValue(); -tmpWidth[i] = width[nwx]; -} -warray.addEntry(0, tmpWidth); -} -return warray; -}*/ - /** * @see org.apache.fop.fonts.FontDescriptor#isEmbeddable() */ @@ -243,6 +226,23 @@ } /** + * @see org.apache.fop.fonts.CIDFont#getSubsetWidths() + */ +public PDFWArray getSubsetWidths() { +// Create widths for reencoded chars +PDFWArray warray = new PDFWArray(); +int[] tmpWidth = new int[usedGlyphsCount]; + +for (int i = 0; i usedGlyphsCount; i++) { +Integer nw = (Integer)usedGlyphsIndex.get(new Integer(i)); +int nwx = (nw == null) ? 0 : nw.intValue(); +tmpWidth[i] = width[nwx]; +} +warray.addEntry(0, tmpWidth); +return warray; +} + +/** * Remaps a codepoint based. * @param i codepoint to remap * @return new codepoint @@ -334,9 +334,10 @@ * @param cidWidthIndex index * @param wds array of widths */ +/* public void addCIDWidthEntry(int cidWidthIndex, int[] wds) { this.warray.addEntry(cidWidthIndex, wds); -} +}*/ /** 1.2 +11 -1 xml-fop/src/java/org/apache/fop/fonts/CIDFont.java Index: CIDFont.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fonts/CIDFont.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u
PCL TTF Fontloading extension
Hello, we have extended the TTFReader, Fontclasses and the PCLRenderer. All chanced Classes are in this mail. Also a short shell script which shows the process to add new fonts. Best regards Dipl. Inf. (FH) Thomas Kiesl Application Development Engineer Materna GmbH Co. KG Theodor-Heuss-Straße 59 61118 Bad Vilbel Tel. 06101 / 806 0 Fax 06101 / 806 590 [EMAIL PROTECTED] http://www.materna.de fop-src-pcl-font-ext.tar.gz Description: Binary data ttftest.sh Description: Binary data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
PCL TTF Fontloading extension
Hello, we have extended the TTFReader, Fontclasses and the PCLRenderer. All chanced Classes are in this mail. Also a short shell script which shows the process to add new fonts. #! /bin/sh # # Shell script for creating ttf xml-files java -cp build/fop.jar:lib/xercesImpl-2.0.1.jar:lib/xml-apis.jar:lib/xalan-2.3.1.jar: lib/batik.jar org.apache.fop.fonts.apps.TTFReader /tmp/fonts/N019003D.TTF -pclsymbolset 19U -pclspacing 1 -pclstyle 992 -pclstroke 0 -pcltypeface 5401 /tmp/fonts/nimbus.xml Best regards Dipl. Inf. (FH) Thomas Kiesl Application Development Engineer Materna GmbH Co. KG Theodor-Heuss-Straße 59 61118 Bad Vilbel Tel. 06101 / 806 0 Fax 06101 / 806 590 [EMAIL PROTECTED] http://www.materna.de fop-src-pcl-font-ext.tar.gz Description: application/tgz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: PCL TTF Fontloading extension
Thank you for your contribution. You'd spare us a lot of work if you would resubmit your patch as a unified diff against the current CVS. Thank you. But to be honest, even if you resubmit the patch as a diff, I can't guarantee you that it'll get integrated. As you probably know we're doing a redesign of FOP and decided that the maintenance branch will soon get discontinued. Most of us won't add any new functionality in the maintenance branch anymore. The focus of the majority of the committers is on the redesign. I'd like to encourage you, however, to participate in the development of the redesigned FOP, so we can replace the old FOP soon with something better. On 03.04.2003 14:57:30 Müller, Thorsten wrote: we have extended the TTFReader, Fontclasses and the PCLRenderer. All chanced Classes are in this mail. Also a short shell script which shows the process to add new fonts. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: xml-fop status.xml
jeremias2003/04/03 05:56:12 Modified:.status.xml Log: Update changes. Revision ChangesPath 1.29 +7 -0 xml-fop/status.xml Index: status.xml === RCS file: /home/cvs/xml-fop/status.xml,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- status.xml2 Apr 2003 00:40:04 - 1.28 +++ status.xml3 Apr 2003 13:56:12 - 1.29 @@ -104,6 +104,13 @@ changes release version=2003 date=2003 + action context=code dev=JM type=fix + Fixed TrueType embedding. Width array now reflects the subset again. + /action + action context=code dev=JM type=fix + Fixed font registration for PDF renderer. normal and bold get + accepted as font-weight again. Fixed font-weight normalization. + /action action context=code dev=KLL type=update Added markers to page when areas added. When an area is added that is created by an FO that contains markers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/documentation/content/xdocs compliance.xml
vmote 2003/04/03 07:29:33 Modified:src/documentation/content/xdocs compliance.xml Log: Complete citations URLs. Revision ChangesPath 1.7 +189 -188 xml-fop/src/documentation/content/xdocs/compliance.xml Index: compliance.xml === RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/compliance.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- compliance.xml2 Apr 2003 20:34:03 - 1.6 +++ compliance.xml3 Apr 2003 15:29:33 - 1.7 @@ -241,220 +241,221 @@ level-2 name=Common Relative Position Properties citation=§7.12 extURL=slice7.html#common-relative-position-properties level-3 name=relative-position citation=§7.12.1 extURL=slice7.html#relative-position compliance-level=2 comply=no/ /level-2 -level-2 name=Area Alignment Properties - level-3 name=alignment-adjust compliance-level=1 comply=no/ - level-3 name=alignment-baseline compliance-level=1 comply=no/ - level-3 name=baseline-shift compliance-level=1 comply=no/ - level-3 name=display-align compliance-level=2 comply=no/ - level-3 name=dominant-baseline compliance-level=1 comply=no/ - level-3 name=relative-align compliance-level=2 comply=no/ -/level-2 -level-2 name=Area Dimension Properties - level-3 name=block-progression-dimension compliance-level=1 comply=no/ - level-3 name=content-height compliance-level=2 comply=no/ - level-3 name=content-width compliance-level=2 comply=no/ - level-3 name=height compliance-level=1 comply=yes/ - level-3 name=inline-progression-dimension compliance-level=1 comply=no/ - level-3 name=max-height compliance-level=3 comply=no/ - level-3 name=max-width compliance-level=3 comply=no/ - level-3 name=min-height compliance-level=3 comply=no/ - level-3 name=min-width compliance-level=3 comply=no/ - level-3 name=scaling compliance-level=2 comply=no/ - level-3 name=scaling-method compliance-level=2 comply=no/ - level-3 name=width compliance-level=1 comply=yes/ -/level-2 -level-2 name=Block and Line-related Properties - level-3 name=hyphenation-keep compliance-level=2 comply=no/ - level-3 name=hyphenation-ladder-count compliance-level=2 comply=no/ - level-3 name=last-line-end-indent compliance-level=2 comply=no/ - level-3 name=line-height compliance-level=1 comply=yes/ - level-3 name=line-height-shift-adjustment compliance-level=2 comply=no/ - level-3 name=line-stacking-strategy compliance-level=1 comply=no/ - level-3 name=linefeed-treatment compliance-level=2 comply=no/ - level-3 name=text-align compliance-level=1 comply=yes/ - level-3 name=text-align-last compliance-level=2 comply=yes/ - level-3 name=text-indent compliance-level=1 comply=yes/ - level-3 name=white-space-collapse compliance-level=2 comply=yes/ - level-3 name=white-space-treatment compliance-level=2 comply=no/ - level-3 name=wrap-option compliance-level=1 comply=yes/ -/level-2 -level-2 name=Character Properties - level-3 name=character compliance-level=1 comply=yes/ - level-3 name=letter-spacing compliance-level=2 comply=yes/ - level-3 name=suppress-at-line-break compliance-level=2 comply=no/ - level-3 name=text-decoration compliance-level=2 comply=yes/ - level-3 name=text-shadow compliance-level=2 comply=no/ - level-3 name=text-transform compliance-level=2 comply=no/ - level-3 name=treat-as-word-space compliance-level=2 comply=no/ - level-3 name=word-spacing compliance-level=2 comply=no/ -/level-2 -level-2 name=Color-related Properties - level-3 name=color compliance-level=1 comply=yes/ - level-3 name=color-profile-name compliance-level=2 comply=no/ - level-3 name=rendering-intent compliance-level=2 comply=no/ -/level-2 -level-2 name=Float-related Properties - level-3 name=clear compliance-level=2 comply=no/ - level-3 name=float compliance-level=2 comply=no/ - level-3 name=intrusion-displace compliance-level=2 comply=no/ -/level-2 -level-2 name=Keeps and Breaks Properties - level-3 name=break-after compliance-level=1 comply=yes/ - level-3 name=break-before compliance-level=1 comply=yes/ - level-3 name=keep-together compliance-level=2 comply=partial +level-2 name=Area Alignment Properties citation=§7.13 extURL=slice7.html#area-alignment + level-3 name=alignment-adjust citation=§7.13.1
Re: 300dpi JPEG scaling
On Sun, 2003-03-30 at 03:43, J.Pietschmann wrote: automatic fitting sets in. Specify the width and height you want in the resulting PDF in non-pixel units. The scaling property is not supported anyway. For instance, I have taken a very large image (1.2MB) that is 1760 x 1184 pixels (5.867in x 3.947in) and am trying to scale it. I can get it Well, specifying fo:external-graphic src=/var/data/images/1/127.jpeg width=5.867in height=3.947in/ should be sufficient. That did the trick! I set the container that held the image to the actual pixel size of the image, then can specify the width in the fo:external-graphic tag in inches, and that scales the image. Thanks for the help! -- Nathan Hokanson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Absolute-positon of a block
Version: 0.20.5rc, with my fixes to get markers working. What Im trying to do is place a fo:block at an absolute position on a page. Any way I can. The idea is to format text on a page so that when we feed a pre-printed form through the printer we get X placed in a box, a name in its box, a date where it should be on the form, etc. I see that absolute-position isnt supported yet, but that top, right, etc., are. Is there functionality implemented in 0.20.5rc that allows a block to be placed at a specific position or do I need to add the implementation of absolute-position (and, if I need to do this, can anyone suggest any helpful hints)? -- Mark C. Allman -- Innovator -- Allman Professional Consulting, Inc. -- www.allmanpc.com, 617-947-4263 BusinessMsg the secure, managed, J2EE-standard Enterprise IM solution (alpha testing shortly).
Re: Absolute-positon of a block
Mark, That's funny... We are using FOP to move *away* from something like this. Our clients are tired of paying us to sell them pre-printed pages with the boxes, only to have the little x be off-center ;-) I don't know if it'll help, but you could use blind tables with images or something inside to maneuver the box where you want it. Of course, it'll take a bit of trial and error. Also, the results might be different depending on the printer, as well as whether you're outputting with -awt/-print or -ps/-pdf. Good luck! Mark C. Allman wrote: Version: 0.20.5rc, with my fixes to get markers working. What Im trying to do is place a fo:block at an absolute position on a page. Any way I can. The idea is to format text on a page so that when we feed a pre-printed form through the printer we get X placed in a box, a name in its box, a date where it should be on the form, etc. I see that absolute-position isnt supported yet, but that top, right, etc., are. Is there functionality implemented in 0.20.5rc that allows a block to be placed at a specific position or do I need to add the implementation of absolute-position (and, if I need to do this, can anyone suggest any helpful hints)? -- Clay Leeds - [EMAIL PROTECTED] Web Developer - Medata, Inc. - http://www.medata.com PGP Public Key: https://mail.medata.com/pgp/cleeds.asc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Absolute-position of a block
Yea were dealing with medical forms. We need (my client needs, actually) to support a customer that has these forms to be printed. Things like claims forms. -- Mark C. Allman -- Innovator -- Allman Professional Consulting, Inc. -- www.allmanpc.com, 617-947-4263 BusinessMsg the secure, managed, J2EE-standard Enterprise IM solution (alpha testing shortly). -Original Message- From: Clay Leeds [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2003 1:41 PM To: [EMAIL PROTECTED] Subject: Re: Absolute-positon of a block Mark, That's funny... We are using FOP to move *away* from something like this. Our clients are tired of paying us to sell them pre-printed pages with the boxes, only to have the little x be off-center ;-) I don't know if it'll help, but you could use blind tables with images or something inside to maneuver the box where you want it. Of course, it'll take a bit of trial and error. Also, the results might be different depending on the printer, as well as whether you're outputting with -awt/-print or -ps/-pdf. Good luck! Mark C. Allman wrote: Version: 0.20.5rc, with my fixes to get markers working. What Im trying to do is place a fo:block at an absolute position on a page. Any way I can. The idea is to format text on a page so that when we feed a pre-printed form through the printer we get X placed in a box, a name in its box, a date where it should be on the form, etc. I see that absolute-position isnt supported yet, but that top, right, etc., are. Is there functionality implemented in 0.20.5rc that allows a block to be placed at a specific position or do I need to add the implementation of absolute-position (and, if I need to do this, can anyone suggest any helpful hints)? -- Clay Leeds - [EMAIL PROTECTED] Web Developer - Medata, Inc. - http://www.medata.com PGP Public Key: https://mail.medata.com/pgp/cleeds.asc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Absolute-position of a block
Aha, I see what I need to change. I take the posted example, move the fo:block-container to the fo:flow, wrap it in a fo:block, and it disappears. This is what I was doing (a container in a block) and it wasnt working. As I (try to) read the spec it seems legal to do this. If I take out the wrapping fo:block it appears to work like a charm. Heres the edited FO code: ?xml version=1.0 encoding=UTF-8 ? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format fo:layout-master-set fo:simple-page-master master-name=simpleA4 page-height=11in page-width=8.5in margin-top=0in margin-bottom=0in margin-left=0in margin-right=0in fo:region-before extent=0in / fo:region-body margin-top=0in / /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=simpleA4 fo:flow flow-name=xsl-region-body fo:blockHello World!/fo:block fo:blockxsl-region-before/fo:block fo:block !-- ADDED, remove to have the container appear -- fo:block-container left=2cm top=1cm width=5cm height=1cm background-color=lightgreen position=absolute fo:blockI love block-containers!/fo:block /fo:block-container /fo:block !-- ADDED, remove to have the container appear -- /fo:flow /fo:page-sequence /fo:root Its NO BIG DEAL at all. I just wanted to check with folks after consulting the compliance page. -- Mark C. Allman -- Innovator -- Allman Professional Consulting, Inc. -- www.allmanpc.com, 617-947-4263 BusinessMsg the secure, managed, J2EE-standard Enterprise IM solution (alpha testing shortly). -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2003 2:20 PM To: [EMAIL PROTECTED] Subject: Re: Absolute-positon of a block Just answered that yesterday on fop-user: http://marc.theaimsgroup.com/?l=fop-userm=104928256603740w=2 On 03.04.2003 20:34:59 Mark C. Allman wrote: Version: 0.20.5rc, with my fixes to get markers working. What I'm trying to do is place a fo:block at an absolute position on a page. Any way I can. The idea is to format text on a page so that when we feed a pre-printed form through the printer we get X placed in a box, a name in it's box, a date where it should be on the form, etc. I see that absolute-position isn't supported yet, but that top, right, etc., are. Is there functionality implemented in 0.20.5rc that allows a block to be placed at a specific position or do I need to add the implementation of absolute-position (and, if I need to do this, can anyone suggest any helpful hints)? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]