kurent wrote:
I read in a tutorial where it says that is how you get a landscape format. You say I want A4, but then rotate it by 90 degrees with the PageSize.A4.rotate() function. But when using a bold font on this landscape format the text is transparent. If you select it with the acrobat reader text select tool there is something there, but it is white text on a white background. If you use normal font the text shows up.
I read in a magazine that if my eyes were where my ears are, I'd have surround view. However, my eyes aren't where my ears are and I can only see what is in front of me.
In front of me, I have an example with a rotated A4 page and a font that is bold.
Please have a close look at the attachments. Is the bold text transparent, yes or no? If not, why are you posting a question on the mailing list without providing a standalone example that reproduces the problem AS I'VE BEEN ASKING YESTERDAY?
http://www.nabble.com/Re%3A-Bold-text-not-visible-in-landscape-p21019607.html -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info
landscape.pdf
Description: Adobe PDF document
import java.io.FileOutputStream; import java.io.IOException; import com.lowagie.text.*; import com.lowagie.text.pdf.PdfWriter; /** * This example was written by Bruno Lowagie. It is part of the book 'iText in * Action' by Manning Publications. * ISBN: 1932394796 * http://www.1t3xt.com/docs/book.php * http://www.manning.com/lowagie/ */ public class LandscapeBoldExample { /** * Generates a PDF file with the text 'Hello World'. The page size is * LETTER; the orientation is Landscape. * * @param args * no arguments needed here */ public static void main(String[] args) { // step 1: creation of a document-object Document document = new Document(PageSize.A4.rotate()); try { // step 2: // we create a writer PdfWriter.getInstance( // that listens to the document document, // and directs a PDF-stream to a file new FileOutputStream("landscape.pdf")); // step 3: we open the document document.open(); // step 4: we add a paragraph to the document Font font = new Font(Font.HELVETICA, 12, Font.BOLD); document.add(new Paragraph("Hello World", font)); document.add(new Paragraph("Hello World")); } catch (DocumentException de) { System.err.println(de.getMessage()); } catch (IOException ioe) { System.err.println(ioe.getMessage()); } // step 5: we close the document document.close(); } }
------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
