You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by stephen smith <sm...@hotmail.com> on 2011/07/13 16:07:13 UTC

new to PDFbox is it possible to change text font

Hello,
 
I have a stamped PDF, I am using PDFbox to print it. I have set the text colors on the PDF template but when i go to print it all the text is black. I have looked everwhere and I can not find an example of setting the text color. Is it possible?
 
Thanks 		 	   		  

RE: new to PDFbox is it possible to change text font

Posted by stephen smith <sm...@hotmail.com>.
To add to this... I create the pdf using iText and "Stamp" a PDF template that had the colors. Once the PDF has been stamped with iText I send that input string to the printer using PDFBox:
 
pdDocument = PDDocument.load(PDFHelper.generatePDF(searchResponse)); 
pdDocument.save("c://test.pdf");
pdDocument.print(); 
 
 
if i open the pdf (with the above code) saved to the drive the correct text colors are on the pdf. However when I print they are black.
 
Has anyone run into this?
 
Thanks.
 

> From: smithsf22@hotmail.com
> To: users@pdfbox.apache.org
> Subject: new to PDFbox is it possible to change text font
> Date: Wed, 13 Jul 2011 08:07:13 -0600
> 
> 
> Hello,
> 
> I have a stamped PDF, I am using PDFbox to print it. I have set the text colors on the PDF template but when i go to print it all the text is black. I have looked everwhere and I can not find an example of setting the text color. Is it possible?
> 
> Thanks