Op 8/08/2013 11:42, Mark Duffill schreef: > > Hi, > > We are using iTextSharp to write out pdfs, however there was an issue > with precision. > > We enabled ByteBuffer.HIGH_PRECISION, but also needed to make the > following code change to PdfContentBytes.cs > > (Basically so we can pass in double precision values). >
I don't know about iTextSharp, but in iText, the casting is done in the ByteBuffer class: /** * Appends a string representation of a <CODE>float</CODE> according * to the Pdf conventions. * @param i the <CODE>float</CODE> to be appended * @return a reference to this <CODE>ByteBuffer</CODE> object */ public ByteBuffer append(float i) { return append((double)i); } This makes your fix unnecessary, doesn't it? I see that the same happens in iTextSharp: /** * Appends a string representation of a <CODE>float</CODE> according * to the Pdf conventions. * @param i the <CODE>float</CODE> to be appended * @return a reference to this <CODE>ByteBuffer</CODE> object */ public ByteBuffer Append(float i) { return Append((double)i); } Why would we need to cast the float value to double values in each drawing function if the casting is done in ByteBuffer? Please explain. ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php