Re: [iText-questions] Font subsets document
I finally understand a bit, Word 2007 embedded subsets of the fonts used. Calibri subset (ABCDEE) Verdana,Bold subset (ABCDEE) Verdana subset (ABCDEE) Verdana subset (ABCDEE) I created a font of the basefont not containing all glyphs. The original text has a trademark sign, I can't force to embed without subsets (even with pdf/a option ticked). Is there a way to create a 'complete' font of these subfonts, reconstructing them? Kind regards, Peter Date: Sat, 11 Feb 2012 04:49:29 -0800 From: vahid_nas...@yahoo.com To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] Font subsets document Hello, MS-Word uses Font Fallback mechanism to show missing glyphs of your selected font. more info: http://msdn.microsoft.com/en-us/goglobal/bb688134 iText/Sharp has the same capability which is defined in FontSelector class. Here you can define your Font Substitution strategy and then call fontSelector.Process method. From: Peter van Raamsdonk peet...@hotmail.com To: Post all your questions about iText here itext-questions@lists.sourceforge.net Sent: Saturday, February 11, 2012 11:53 AM Subject: [iText-questions] Font subsets document Morning all, I have a pdf created from a Word document (template). From the pdf I get all the document base fonts used, I choose a basefont and create a font from this to include some extra text. When I add the text with contentByte from the stamper and setText with hard coded text like Uw the text is shown with square before the w (like the glyph can't be drawn). If I use BaseFont.createFont() the text is shown normally but I want the style/ font family properties of the font used originally. Regards, Peter van Raamsdonk -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ 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 -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ 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 -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ 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
Re: [iText-questions] Font subsets document
I hoped the FontSelector what Vahid also suggested would do the trick by adding all the subsetted fonts but alas. It would be nice to reuse (subsetted) fonts but it starts with the program that embeds the fonts. Oki I understand, have a nice evening, Peter On 15 feb 2012, at 13:40, Leonard Rosenthol wrote: Not using standard tools such as Word or Acrobat – no, there is not. Subsetting fonts is a common and standard practice. Leonard From: Peter van Raamsdonk [mailto:peet...@hotmail.com] Sent: Wednesday, February 15, 2012 6:41 AM To: vahid_nas...@yahoo.com; Leonard Rosenthol; itext-questions@lists.sourceforge.net Subject: RE: [iText-questions] Font subsets document I finally understand a bit, Word 2007 embedded subsets of the fonts used. Calibri subset (ABCDEE) Verdana,Bold subset (ABCDEE) Verdana subset (ABCDEE) Verdana subset (ABCDEE) I created a font of the basefont not containing all glyphs. The original text has a trademark sign, I can't force to embed without subsets (even with pdf/a option ticked). Is there a way to create a 'complete' font of these subfonts, reconstructing them? Kind regards, Peter Date: Sat, 11 Feb 2012 04:49:29 -0800 From: vahid_nas...@yahoo.com To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] Font subsets document Hello, MS-Word uses Font Fallback mechanism to show missing glyphs of your selected font. more info: http://msdn.microsoft.com/en-us/goglobal/bb688134 iText/Sharp has the same capability which is defined in FontSelector class. Here you can define your Font Substitution strategy and then call fontSelector.Process method. From: Peter van Raamsdonk peet...@hotmail.com To: Post all your questions about iText here itext-questions@lists.sourceforge.net Sent: Saturday, February 11, 2012 11:53 AM Subject: [iText-questions] Font subsets document Morning all, I have a pdf created from a Word document (template). From the pdf I get all the document base fonts used, I choose a basefont and create a font from this to include some extra text. When I add the text with contentByte from the stamper and setText with hard coded text like Uw the text is shown with square before the w (like the glyph can't be drawn). If I use BaseFont.createFont() the text is shown normally but I want the style/ font family properties of the font used originally. Regards, Peter van Raamsdonk -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ 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 -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ 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 -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ 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 -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing
Re: [iText-questions] Font subsets document
I meant combine, all subset parts which belong to a certain font contain all the glyphs (with original text). Text; hello world subset 1 contains hello subset 2 contains world Regards Peter On 15 feb 2012, at 19:11, Leonard Rosenthol wrote: How could you reuse a subset font, if the font doesn’t have the glyphs you need??! From: Peter van Raamsdonk [mailto:peet...@hotmail.com] Sent: Wednesday, February 15, 2012 12:49 PM To: Post all your questions about iText here; Leonard Rosenthol; Vahid Nasiri Subject: Re: [iText-questions] Font subsets document I hoped the FontSelector what Vahid also suggested would do the trick by adding all the subsetted fonts but alas. It would be nice to reuse (subsetted) fonts but it starts with the program that embeds the fonts. Oki I understand, have a nice evening, Peter On 15 feb 2012, at 13:40, Leonard Rosenthol wrote: Not using standard tools such as Word or Acrobat – no, there is not. Subsetting fonts is a common and standard practice. Leonard From: Peter van Raamsdonk [mailto:peet...@hotmail.com] Sent: Wednesday, February 15, 2012 6:41 AM To: vahid_nas...@yahoo.com; Leonard Rosenthol; itext-questions@lists.sourceforge.net Subject: RE: [iText-questions] Font subsets document I finally understand a bit, Word 2007 embedded subsets of the fonts used. Calibri subset (ABCDEE) Verdana,Bold subset (ABCDEE) Verdana subset (ABCDEE) Verdana subset (ABCDEE) I created a font of the basefont not containing all glyphs. The original text has a trademark sign, I can't force to embed without subsets (even with pdf/a option ticked). Is there a way to create a 'complete' font of these subfonts, reconstructing them? Kind regards, Peter Date: Sat, 11 Feb 2012 04:49:29 -0800 From: vahid_nas...@yahoo.com To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] Font subsets document Hello, MS-Word uses Font Fallback mechanism to show missing glyphs of your selected font. more info: http://msdn.microsoft.com/en-us/goglobal/bb688134 iText/Sharp has the same capability which is defined in FontSelector class. Here you can define your Font Substitution strategy and then call fontSelector.Process method. From: Peter van Raamsdonk peet...@hotmail.com To: Post all your questions about iText here itext-questions@lists.sourceforge.net Sent: Saturday, February 11, 2012 11:53 AM Subject: [iText-questions] Font subsets document Morning all, I have a pdf created from a Word document (template). From the pdf I get all the document base fonts used, I choose a basefont and create a font from this to include some extra text. When I add the text with contentByte from the stamper and setText with hard coded text like Uw the text is shown with square before the w (like the glyph can't be drawn). If I use BaseFont.createFont() the text is shown normally but I want the style/ font family properties of the font used originally. Regards, Peter van Raamsdonk -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ 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 -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ 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 -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ iText-questions mailing list iText-questions@lists.sourceforge.net https
Re: [iText-questions] Font subsets document
Ok clear, I wonder only how font extraction from a pdf would go. This would also result in fonts without all the glyphs I think. In Word 2007 the option to embed the font or have subsets (characters being used) is there but saving to pdf always results in subsets. But it is not an issue for me, I was only trying to understand how it works. Regards Peter On 15 feb 2012, at 19:55, Leonard Rosenthol wrote: Subset merging is VERY HARD. AFAIK, Adobe’s tools are the only ones that do it. (and not all the time, because sometimes you can’t match) Leonard From: Peter van Raamsdonk [mailto:peet...@hotmail.com] Sent: Wednesday, February 15, 2012 1:42 PM To: Leonard Rosenthol; Post all your questions about iText here Subject: Re: [iText-questions] Font subsets document I meant combine, all subset parts which belong to a certain font contain all the glyphs (with original text). Text; hello world subset 1 contains hello subset 2 contains world Regards Peter On 15 feb 2012, at 19:11, Leonard Rosenthol wrote: How could you reuse a subset font, if the font doesn’t have the glyphs you need??! From: Peter van Raamsdonk [mailto:peet...@hotmail.com] Sent: Wednesday, February 15, 2012 12:49 PM To: Post all your questions about iText here; Leonard Rosenthol; Vahid Nasiri Subject: Re: [iText-questions] Font subsets document I hoped the FontSelector what Vahid also suggested would do the trick by adding all the subsetted fonts but alas. It would be nice to reuse (subsetted) fonts but it starts with the program that embeds the fonts. Oki I understand, have a nice evening, Peter On 15 feb 2012, at 13:40, Leonard Rosenthol wrote: Not using standard tools such as Word or Acrobat – no, there is not. Subsetting fonts is a common and standard practice. Leonard From: Peter van Raamsdonk [mailto:peet...@hotmail.com] Sent: Wednesday, February 15, 2012 6:41 AM To: vahid_nas...@yahoo.com; Leonard Rosenthol; itext-questions@lists.sourceforge.net Subject: RE: [iText-questions] Font subsets document I finally understand a bit, Word 2007 embedded subsets of the fonts used. Calibri subset (ABCDEE) Verdana,Bold subset (ABCDEE) Verdana subset (ABCDEE) Verdana subset (ABCDEE) I created a font of the basefont not containing all glyphs. The original text has a trademark sign, I can't force to embed without subsets (even with pdf/a option ticked). Is there a way to create a 'complete' font of these subfonts, reconstructing them? Kind regards, Peter Date: Sat, 11 Feb 2012 04:49:29 -0800 From: vahid_nas...@yahoo.com To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] Font subsets document Hello, MS-Word uses Font Fallback mechanism to show missing glyphs of your selected font. more info: http://msdn.microsoft.com/en-us/goglobal/bb688134 iText/Sharp has the same capability which is defined in FontSelector class. Here you can define your Font Substitution strategy and then call fontSelector.Process method. From: Peter van Raamsdonk peet...@hotmail.com To: Post all your questions about iText here itext-questions@lists.sourceforge.net Sent: Saturday, February 11, 2012 11:53 AM Subject: [iText-questions] Font subsets document Morning all, I have a pdf created from a Word document (template). From the pdf I get all the document base fonts used, I choose a basefont and create a font from this to include some extra text. When I add the text with contentByte from the stamper and setText with hard coded text like Uw the text is shown with square before the w (like the glyph can't be drawn). If I use BaseFont.createFont() the text is shown normally but I want the style/ font family properties of the font used originally. Regards, Peter van Raamsdonk -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ 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 -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net
Re: [iText-questions] Font subsets document
I will post the document/ code tomorrow. Peter On 12 feb 2012, at 01:26, Paulo Soares wrote: Post the document and your code so that the problem can be reproduced. Paulo - Original Message - From: Peter van Raamsdonk To: Post all your questions about iText here Sent: Saturday, February 11, 2012 8:23 AM Subject: [iText-questions] Font subsets document Morning all, I have a pdf created from a Word document (template). From the pdf I get all the document base fonts used, I choose a basefont and create a font from this to include some extra text. When I add the text with contentByte from the stamper and setText with hard coded text like Uw the text is shown with square before the w (like the glyph can't be drawn). If I use BaseFont.createFont() the text is shown normally but I want the style/ font family properties of the font used originally. Regards, Peter van Raamsdonk -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ 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 -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ 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 -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ 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
[iText-questions] Font subsets document
Morning all, I have a pdf created from a Word document (template). From the pdf I get all the document base fonts used, I choose a basefont and create a font from this to include some extra text. When I add the text with contentByte from the stamper and setText with hard coded text like Uw the text is shown with square before the w (like the glyph can't be drawn). If I use BaseFont.createFont() the text is shown normally but I want the style/ font family properties of the font used originally. Regards, Peter van Raamsdonk -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ 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
Re: [iText-questions] Font subsets document
Hi, The original text in the pdf is shown without missing glyphs, the text is nothing special or with unicode characters. I don't understand why adding the same text gives problem with the selected font. My goal is to use the original text in the pdf and replace some certain parts of text/ words. Since replacing text is not possible I think, I read out the text, hide the original one (filter out BT and ET operators) and add new text with replaced words to the document again. I want to use the font in the pdf, not replace it. Regards Peter On 11 feb 2012, at 13:49, Vahid Nasiri wrote: Hello, MS-Word uses Font Fallback mechanism to show missing glyphs of your selected font. more info: http://msdn.microsoft.com/en-us/goglobal/bb688134 iText/Sharp has the same capability which is defined in FontSelector class. Here you can define your Font Substitution strategy and then call fontSelector.Process method. From: Peter van Raamsdonk peet...@hotmail.com To: Post all your questions about iText here itext-questions@lists.sourceforge.net Sent: Saturday, February 11, 2012 11:53 AM Subject: [iText-questions] Font subsets document Morning all, I have a pdf created from a Word document (template). From the pdf I get all the document base fonts used, I choose a basefont and create a font from this to include some extra text. When I add the text with contentByte from the stamper and setText with hard coded text like Uw the text is shown with square before the w (like the glyph can't be drawn). If I use BaseFont.createFont() the text is shown normally but I want the style/ font family properties of the font used originally. Regards, Peter van Raamsdonk -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ 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 -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ 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 -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ 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
[iText-questions] BarcodeInter25, createAwtImage image units?
Hi, I'm using itextpdf-5.1.3 to draw my Interleaved 2 of 5 barcode in Graphics2d java. I set the setX (narrow module width calculated from the available width and printer dpi) and set setN widefactor (3). I use tenth mm as units. When getting the getBarcodeSize(), I get the correct width and height in mm. However when I create an image with createAwtImage, the width of the image is not the same as the calculated barcode width? Should there be some conversion? I can draw the image by drawImage but I'm afraid that the scaling breaks the barcode image. Kind regards, Peter van Raamsdonk -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev___ 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
Re: [iText-questions] BarcodeInter25, createAwtImage image units?
The setX is not taken into effect with createAwtImage image, the width always stays the same. The method getBarcodeSize() gives the correct width. This was noted before, it looks like it is still in the latest 5.1.3 library, http://itext-general.2136553.n4.nabble.com/Problem-with-Barcode128-and-bar-widths-td2169079.html Paolo, Bruno can you confirm/ check this? Regards, Peter From: peet...@hotmail.com To: itext-questions@lists.sourceforge.net Date: Tue, 10 Jan 2012 11:54:58 +0100 Subject: [iText-questions] BarcodeInter25, createAwtImage image units? Hi, I'm using itextpdf-5.1.3 to draw my Interleaved 2 of 5 barcode in Graphics2d java. I set the setX (narrow module width calculated from the available width and printer dpi) and set setN widefactor (3). I use tenth mm as units. When getting the getBarcodeSize(), I get the correct width and height in mm. However when I create an image with createAwtImage, the width of the image is not the same as the calculated barcode width? Should there be some conversion? I can draw the image by drawImage but I'm afraid that the scaling breaks the barcode image. Kind regards, Peter van Raamsdonk -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev ___ 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 -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev___ 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
Re: [iText-questions] BarcodeInter25, createAwtImage image units?
Ok, not a bug... http://itext-general.2136553.n4.nabble.com/Barcode-Image-sizes-td2169024.html#none Sorry for not looking futher first. Peter From: peet...@hotmail.com To: itext-questions@lists.sourceforge.net Date: Tue, 10 Jan 2012 13:21:26 +0100 Subject: Re: [iText-questions] BarcodeInter25, createAwtImage image units? The setX is not taken into effect with createAwtImage image, the width always stays the same. The method getBarcodeSize() gives the correct width. This was noted before, it looks like it is still in the latest 5.1.3 library, http://itext-general.2136553.n4.nabble.com/Problem-with-Barcode128-and-bar-widths-td2169079.html Paolo, Bruno can you confirm/ check this? Regards, Peter From: peet...@hotmail.com To: itext-questions@lists.sourceforge.net Date: Tue, 10 Jan 2012 11:54:58 +0100 Subject: [iText-questions] BarcodeInter25, createAwtImage image units? Hi, I'm using itextpdf-5.1.3 to draw my Interleaved 2 of 5 barcode in Graphics2d java. I set the setX (narrow module width calculated from the available width and printer dpi) and set setN widefactor (3). I use tenth mm as units. When getting the getBarcodeSize(), I get the correct width and height in mm. However when I create an image with createAwtImage, the width of the image is not the same as the calculated barcode width? Should there be some conversion? I can draw the image by drawImage but I'm afraid that the scaling breaks the barcode image. Kind regards, Peter van Raamsdonk -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev ___ 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 -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev ___ 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 -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev___ 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
[iText-questions] Human readable text with BarcodeInter25 (createAwtImage)?
Morning, I'm using the createAwtImage in java to draw a barcode image. Is it possible to show the barcode value under the image or is this something I have to draw itself and not included in the picture? Kind regards, Peter van Raamsdonk -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev___ 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
Re: [iText-questions] IText and Android
Hi, I thought there was a way to set java apps into bytecode and run it on Android. I don't know if you need to make an apk of it. Check the developer section and SDK. So you can make it anyway you like and you normally do. I'm working with the emulator and have Android on the Motorola Milestone ( Driod in the US ) I don't know if this is what you meant... Peter Op 17 jun 2010, om 18:13 heeft 1T3XT info het volgende geschreven: Arindam Ray wrote: Hi All, I have to develop an android application which would write a PDF file dynamically. My question is it possible to use iText in Android based applications? I've forwarded this question many times to mr. Marc Vanlerberghe: http://www.linkedin.com/in/marcvl I've asked him if Google would like to sponsor an iText port to the Dalvik VM (that's the VM running the Java code on Android). However, I didn't get any response, nor did anyone else want to invest in an Android version of iText. Unfortunately such a port doesn't write itself, so I suggest that you find a sponsor and somebody who can provide all the material that is needed to create such a port. (I don't have an Android phone, nor an iPhone, I don't even have a Blackberry, I only have a simple cell phone that can't even connect to the internet.) -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
[iText-questions] BaseFont.IDENTITY_H and BaseFontParameters (Polish characters)
Hi, just a question about registering fonts which strikes me a bit weird.. I'm using pdfGraphics2D and register awt fonts and pdf fonts.. The awt fonts are physical included fonts.. fontName is location of the font/ resource.. FontFactory.register(fontName) BaseFont pdfFont = BaseFont.createFont(fontName, BaseFont.IDENTITY_H, BaseFont.EMBEDDED); Object allNames[] = {pdfFont.getPostscriptFontName(), pdfFont.getFamilyFontName(), pdfFont.getFullFontName()}; mapper.insertNames(allNames, fontName); I put all the fonts in the DefaultFontMapper mapper.. When I use Polish characters and use by example Arial as font only certain glyphs are drawn.. I noticed that the BaseFontParameters are default on CP1252.. When setting them to Identity-H... DefaultFontMapper.BaseFontParameters baseFontParameters = mapper.getBaseFontParameters(pdfFont.getPostscriptFontName()); if (baseFontParameters != null) { baseFontParameters.encoding = BaseFont.IDENTITY_H; baseFontParameters.embedded = true; } All is displayed correctly.. But why is this default on CP1252 when I just added the basefont with Identity-H to the map? Kind regards, Peter van Raamsdonk _ What can you do with the new Windows Live? Find out http://www.microsoft.com/windows/windowslive/default.aspx-- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
Re: [iText-questions] BaseFont.IDENTITY_H and BaseFontParameters(Polish characters)
Hi Paulo, I don't quite understand.. it is a reference to the font file and when found it is embedded in the pdf... Why can't the BaseFontParameters be adjusted to the basefont encoding? Kind regards, Peter van Raamsdonk Ps, what a beautiful day :) From: psoa...@glintt.com To: itext-questions@lists.sourceforge.net Date: Thu, 2 Apr 2009 11:30:57 +0100 Subject: Re: [iText-questions] BaseFont.IDENTITY_H and BaseFontParameters(Polish characters) You're adding the font name, not the font itself. Paulo - Original Message - From: Peter van Raamsdonk peet...@hotmail.com To: itext-questions@lists.sourceforge.net Sent: Thursday, April 02, 2009 11:10 AM Subject: [iText-questions] BaseFont.IDENTITY_H and BaseFontParameters(Polish characters) Hi, just a question about registering fonts which strikes me a bit weird.. I'm using pdfGraphics2D and register awt fonts and pdf fonts.. The awt fonts are physical included fonts.. fontName is location of the font/ resource.. FontFactory.register(fontName) BaseFont pdfFont = BaseFont.createFont(fontName, BaseFont.IDENTITY_H, BaseFont.EMBEDDED); Object allNames[] = {pdfFont.getPostscriptFontName(), pdfFont.getFamilyFontName(), pdfFont.getFullFontName()}; mapper.insertNames(allNames, fontName); I put all the fonts in the DefaultFontMapper mapper.. When I use Polish characters and use by example Arial as font only certain glyphs are drawn.. I noticed that the BaseFontParameters are default on CP1252.. When setting them to Identity-H... DefaultFontMapper.BaseFontParameters baseFontParameters = mapper.getBaseFontParameters(pdfFont.getPostscriptFontName()); if (baseFontParameters != null) { baseFontParameters.encoding = BaseFont.IDENTITY_H; baseFontParameters.embedded = true; } All is displayed correctly.. But why is this default on CP1252 when I just added the basefont with Identity-H to the map? Kind regards, Peter van Raamsdonk What can you do with the new Windows Live? Find outhttp://www.microsoft.com/windows/windowslive/default.aspx -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/-- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
Re: [iText-questions] How to locate adobe javascript folder in java?
You can only do this by executing script on the client side (install once) Try hta for Internet Explorer or XUL for FireFox. That's how I worked around the 'silent print' issue. H2H, Peter - Original Message - From: darrenmia [EMAIL PROTECTED] To: itext-questions@lists.sourceforge.net Sent: Saturday 8 November 2008 17:17 Subject: [iText-questions] How to locate adobe javascript folder in java? Hi all, I would like to locate the adobe reader javascripts folder, in order to insert a folder lever javascript Example of the folder C:\Documents and Settings\user\Application Data\Adobe\Acrobat\7.0\JavaScripts or C:\Program Files\Adobe\Acrobat 7.0\Reader\Javascripts Does Itext has any function to locate this folder? brgds, Darren -- View this message in context: http://www.nabble.com/How-to-locate-adobe-javascript-folder-in-java--tp20397540p20397540.html Sent from the iText - General mailing list archive at Nabble.com. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
Re: [iText-questions] Simulation of font styles (styled source to nonstyled display)
Here's my original reference, http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg30224.html Font simulation was introduced in itext 2.0.5 (which I'm still using). Example, I have a true type font only in italic style but want to show it like regular (so a reverse in font simulation so to speak or unskew). Why you might ask, to use your own ttf font and still have the possibility to use all font styles. If it works for regular type which is one font style why not for other font styles. Yes/ no? Paulo? - Original Message - From: Peter van Raamsdonk To: Post all your questions about iText here Sent: Monday 7 July 2008 20:43 Subject: [iText-questions] Simulation of font styles (styled source to nonstyled display) Hi, simulation works fine if you use a plain ttf font source (registering AWT font and PDF font) without any styles and want to display it bold or italic. But can it work the other way around? Having a bold italic or bold or just italic font and displaying it normally (not bold or italic). I know it is stretching it a bit. Regards Peter -- - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar
[iText-questions] Simulation of font styles (styled source to non styled display)
Hi, simulation works fine if you use a plain ttf font source (registering AWT font and PDF font) without any styles and want to display it bold or italic. But can it work the other way around? Having a bold italic or bold or just italic font and displaying it normally (not bold or italic). I know it is stretching it a bit. Regards Peter- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar
Re: [iText-questions] message at silent print since last acrobat aeader update
Leonard, Have you had a chance to look at my pdf? I did what you said, it is signed, it is stated as trusted. However I still get the warning message on the execution of the print. Regards, Peter From: [EMAIL PROTECTED]: Wed, 5 Mar 2008 06:47:10 -0500To: [EMAIL PROTECTED]: Re: [iText-questions] message at silent print since last acrobat aeader updateAdobe will NOT be changing it's position - this is a security concern and we plan to continue to prevent the use of insecure functionality in untrusted environments. Our users prefer it this way. That said, we understand that there ARE scenarios where trust can be established and therefore such features SHOULD be enabled. In those environments, we expect to allow you to do this. It's all about trust... Leonard On Mar 5, 2008, at 6:05 AM, Sérgio Oliveira wrote: Leonard, In the future I do believe Adobe will need to change its position about this, because while they see it as a threat, customers see it as a functionality.Also, I think there is another way to acomplish a silent print: if one use the same code but in a javascript folder. From: [EMAIL PROTECTED]: Tue, 4 Mar 2008 10:59:53 -0500To: [EMAIL PROTECTED]: Re: [iText-questions] message at silent print since last acrobat aeader updateDepends on your certificate. In the future, there may be other options - but for Acrobat 8.x, this is the only one. Leonard On Mar 4, 2008, at 10:46 AM, Sérgio Oliveira wrote: Hi, What is the consequence of that in the size of the pdf, if any? Thanks From: [EMAIL PROTECTED]: Mon, 25 Feb 2008 15:24:24 -0500To: [EMAIL PROTECTED]: Re: [iText-questions] message at silent print since last acrobat aeader updateYOU may consider it trusted, but you have not in any way designed it to Acrobat/Reader - so it doesn't know that. Self-signing the document AND then distributing that signature to all users and marking it as trusted will indeed work. Leonard On Feb 25, 2008, at 1:37 PM, Peter van Raamsdonk wrote: Hi Leonard, My local application runs in a trusted environment but still the warnings appear.If I (self) sign the document would that be a working solution? Regards, Peter From: [EMAIL PROTECTED] Date: Thu, 21 Feb 2008 12:31:17 -0500 To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] message at silent print since last acrobat aeader update On Feb 21, 2008, at 12:09 PM, 1T3XT info wrote: Simon Staiger wrote: Since the latest update of Acrobat Reader I get a message while trying to print a pdf – file silent. I use iText in a Sevlet to add JavaScript to a existing PDF. This always worked fine. Letting the printer spew out a document without user interaction always was a borderline issue. Not all end users appreciate it, and it could be considered a security hazard. I think that's what made Adobe decide to add such a message 100% accurate. Silent printing is no longer allowed w/o warnings to the user in an untrusted document/environment., and in my experience, you can't 'turn off' messages like that (but maybe I'm not looking hard enough). Your document and/or environment needs to be trusted by the user. Leonard - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ Express yourself instantly with MSN Messenger! MSN Messenger - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ Express yourself instantly with MSN Messenger! MSN Messenger - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ Express yourself instantly with MSN Messenger! MSN Messenger - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go
Re: [iText-questions] message at silent print since last acrobat aeader update
Hi Leonard, My local application runs in a trusted environment but still the warnings appear. If I (self) sign the document would that be a working solution? Regards, Peter From: [EMAIL PROTECTED] Date: Thu, 21 Feb 2008 12:31:17 -0500 To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] message at silent print since last acrobat aeader update On Feb 21, 2008, at 12:09 PM, 1T3XT info wrote: Simon Staiger wrote: Since the latest update of Acrobat Reader I get a message while trying to print a pdf – file silent. I use iText in a Sevlet to add JavaScript to a existing PDF. This always worked fine. Letting the printer spew out a document without user interaction always was a borderline issue. Not all end users appreciate it, and it could be considered a security hazard. I think that's what made Adobe decide to add such a message 100% accurate. Silent printing is no longer allowed w/o warnings to the user in an untrusted document/environment., and in my experience, you can't 'turn off' messages like that (but maybe I'm not looking hard enough). Your document and/or environment needs to be trusted by the user. Leonard - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] one font containing all styles emulate bold, italic or bolditalic
I have tried the latest iText and the style emulation works perfectly. I see that no font replacement occurs. Truly excellent! Thx Paulo - Original Message - From: Paulo Soares [EMAIL PROTECTED] To: Post all your questions about iText here itext-questions@lists.sourceforge.net Sent: Monday, October 22, 2007 5:07 PM Subject: Re: [iText-questions] one font containing all styles emulate bold,italic or bolditalic I think that the latest iText version already does the style emulation in Graphics2D. Paulo -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter van Raamsdonk Sent: Monday, October 22, 2007 3:08 PM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] one font containing all styles emulate bold,italic or bolditalic Hi, I'm using the Microsoft Sans Serif true type font in my code and I want to emulate bold or italic. I use Graphics2D to paint my text and I don't use chunk. I found this message in the forum what exactly describes the problem but the solution is unclear to me. http://threebit.net/mail-archive/itext-questions/msg04147.html I create the awt font from file and use the name to register it to pdf. For the pdf font mapping pseudo code; String formName = somelocation/fonts/MICROSS.TTF; PdfTemplate template = contentByte.createTemplate(rect.width(), rect.height()); DefaultFontMapper mapper = new DefaultFontMapper(); FontFactory.register(fontName); BaseFont pdfFont = BaseFont.createFont(fontName, BaseFont.IDENTITY_H, BaseFont.EMBEDDED); Object allNames[] = {pdfFont.getPostscriptFontName(), pdfFont.getFamilyFontName(), pdfFont.getFullFontName()}; mapper.insertNames(allNames, fontName); Graphics2D g2d = template.createGraphics(rect.width(), rect.height(), mapper); When I watch the Set of FontFactory.getRegisteredFamilies() I see the styles missing compared to Arial. arial=[Arial, Arial Bold, Arial Italic, Arial Bold Italic] microsoft sans serif=[Microsoft Sans Serif] How can I set these styles using FontFactory to emulate bold or italic? Hopefully this is possible, :Peter Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
[iText-questions] one font containing all styles emulate bold, italic or bolditalic
Hi, I'm using the Microsoft Sans Serif true type font in my code and I want to emulate bold or italic. I use Graphics2D to paint my text and I don't use chunk. I found this message in the forum what exactly describes the problem but the solution is unclear to me. http://threebit.net/mail-archive/itext-questions/msg04147.html I create the awt font from file and use the name to register it to pdf. For the pdf font mapping pseudo code; String formName = somelocation/fonts/MICROSS.TTF; PdfTemplate template = contentByte.createTemplate(rect.width(), rect.height()); DefaultFontMapper mapper = new DefaultFontMapper(); FontFactory.register(fontName); BaseFont pdfFont = BaseFont.createFont(fontName, BaseFont.IDENTITY_H, BaseFont.EMBEDDED); Object allNames[] = {pdfFont.getPostscriptFontName(), pdfFont.getFamilyFontName(), pdfFont.getFullFontName()}; mapper.insertNames(allNames, fontName); Graphics2D g2d = template.createGraphics(rect.width(), rect.height(), mapper); When I watch the Set of FontFactory.getRegisteredFamilies() I see the styles missing compared to Arial. arial=[Arial, Arial Bold, Arial Italic, Arial Bold Italic] microsoft sans serif=[Microsoft Sans Serif] How can I set these styles using FontFactory to emulate bold or italic? Hopefully this is possible, :Peter _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] one font containing all styles emulate bold, italic or bolditalic
Hi Paulo, It can't be done with older versions using FontFactory? I will try the new version out and see if it works, thank you. Bye Peter - Original Message - From: Paulo Soares [EMAIL PROTECTED] To: Post all your questions about iText here itext-questions@lists.sourceforge.net Sent: Monday, October 22, 2007 5:07 PM Subject: Re: [iText-questions] one font containing all styles emulate bold,italic or bolditalic I think that the latest iText version already does the style emulation in Graphics2D. Paulo -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter van Raamsdonk Sent: Monday, October 22, 2007 3:08 PM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] one font containing all styles emulate bold,italic or bolditalic Hi, I'm using the Microsoft Sans Serif true type font in my code and I want to emulate bold or italic. I use Graphics2D to paint my text and I don't use chunk. I found this message in the forum what exactly describes the problem but the solution is unclear to me. http://threebit.net/mail-archive/itext-questions/msg04147.html I create the awt font from file and use the name to register it to pdf. For the pdf font mapping pseudo code; String formName = somelocation/fonts/MICROSS.TTF; PdfTemplate template = contentByte.createTemplate(rect.width(), rect.height()); DefaultFontMapper mapper = new DefaultFontMapper(); FontFactory.register(fontName); BaseFont pdfFont = BaseFont.createFont(fontName, BaseFont.IDENTITY_H, BaseFont.EMBEDDED); Object allNames[] = {pdfFont.getPostscriptFontName(), pdfFont.getFamilyFontName(), pdfFont.getFullFontName()}; mapper.insertNames(allNames, fontName); Graphics2D g2d = template.createGraphics(rect.width(), rect.height(), mapper); When I watch the Set of FontFactory.getRegisteredFamilies() I see the styles missing compared to Arial. arial=[Arial, Arial Bold, Arial Italic, Arial Bold Italic] microsoft sans serif=[Microsoft Sans Serif] How can I set these styles using FontFactory to emulate bold or italic? Hopefully this is possible, :Peter Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] Get Viewer Preference
You can also trythe _javascript_ in the pdf (you can add this to the pdf created with itext, writer.addJavaScript(..)). That way you can 'force' the way it should be printed without hassling the user. Look at the flag values at page 577 (bottom). You can set this how you want this to be printed at each printjob without overwriting the (last) options that were set during printing. Options, none, fit and schrink var pp = this.getPrintParams();pp.pageHandling = pp.constants.fit; Note, this only works for Acrobat 7 and up. Ps, the reference can be dl at; http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf Peter You wrote; I have seen that the printer dialog box parameters can be changed using setViewerPreferences() and that's fine ! Now the question : Is there a way to get the viewer preferences ? I'd like to capture the page scaling (none / fit to printer margins / reduce to printer margins). The idea is to send a _javascript_ message when the first page is openedto request the user to change the scaling if is accidently set to "none" (my generated doc does not give optimal results when printed with "none"). Thanks for your feedback, André.Live Search, for accurate results! Click here - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] Color looks different after drawingparticular image types
Thx Eliot, This code sure helps. A shame that the reader really bytes sometimes ;) Bye PeterLive Search, for accurate results! Click here - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] Color looks different after drawingparticular image types
Eliot, An example of the use of an ICC profile would be very welcome :) Bye and thanks for the help PeterPlay online games with your friends with Messenger - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] Color looks different after drawingparticular image types
Thanks Eliot, I was poking around with the writer in java. writer.setDefaultColorspace(PdfName.COLORSPACE, PdfName.DEFAULTRGB); or PdfName.ALTERNATE, PdfName.DEFAULTRGB But that didn't quite hack it I must admit that I don't grasp the variables, first one is from (acts as trigger)and the other one is to (action, convert to)? I will try some more, easy enough :) Bye PeterPlay online games with your friends with Messenger - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
[iText-questions] Applying font style
I create fonts from the actual font file and use them in the PdfGraphics2D to draw text, for the pdf side I use the location of the actual font to create them, register the names, place them in the FontMapper and pass it on to the writer. This all works fontastic. A font (family)typically consists of four styles, regular, italic, bold and bolditalic. Usually there are four fonts like in Arial, Times, Courier a.o. containing these individual styles. Yet my question; Is there anyway in itext touse bold and italic for a 'single' font like Microsoft Sans Serif. If I load the font and pass the styles it is only drawn regular. I've read "The Bold, Italic an BoldItalic styles don't work with embedded fonts." "When you are using a built-in font, applying another style, changes the font.For instance: when you are using 'Arial' and you change the style into italic, the font is replaced internally by 'Arial Italic' (which is a totally different font).In this case you will have to embed both fonts: "arial.ttf" and "ariali.ttf" http://itextsharp.sourceforge.net/tutorial/ch09.html but Microsoft Sans Serif is just one font. It derives me crazy, PeterLive Search, for accurate results! Click here - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] Color looks different after drawing particular image types
Yes, some of myimages have transparency... Why does this affects all elements (What Bill wrote) and what can you do about it? I don't expect this behaviour. You can change the colormodel of an image but an image changing the colormodel of an Graphic Enviroment? This could be troublesome indeed :( Finally ironed out the images so they look like they supposed too (images with non default colormodel loading 20x slower, ImageIO bugs) and now this with the colors. I keep running into problems withcolormodels. Humpf, WYSI(not always)WYG, PeterPlay online games with your friends with Messenger - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] Color looks different after drawingparticularimage types
Thx for the input Paulo, Leonard has written also something about it;http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg28628.html How do I go about "tagging my data with ICC profiles"? I thought I already converted the images to the sRGB colorspace. Colorspace the final frontier, PeterPlay online games with your friends with Messenger - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
Re: [iText-questions] Color looks differentafterdrawingparticularimage types
Thanks all for looking into the colorspace business, Let me know if there is anything I can use or howI can go about it. I saw some interesting bits in the JAI interest group but going about it that way gives me a headache. I don't even know if it is the proper way. Passing on the ICC profile to the JAI. If also seen that in the pdf AcroJS you can also manipulate colorspace but that's only for printing. Tag and bag'em I say ;) Bye PeterHotmail en Messenger on the move Click here - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
[iText-questions] Color looks different after drawing particular image types
Hi, I don't know if this is itext related or simple in the pdf. I use the pdfgraphics2d and paintimages loaded by ImageIO. If I fill a simple rectangle with an color the color 'visually' changes (darkens)in the pdf when I draw an image with a different colormodel like in gif or png. In fact all colors change butinimages the change isharder to notice compared to a solid color.If I draw a jpg or bmp or don't draw an image, the colors stays correct (or the same compared to the color (RGB)in html). If tried resetting the color, background andcomposite to thestart valuesbut still the same result. There are no layers painted over each other mixing the colors. No blending involved. If I look at the color, the colorstays exactlythe same and the colormodel too, yet visually it is not the same. I use itext 1.3.0. It happens with both Acrobat reader 7 and 8. I wonder if anybody noticed this too and where the problem may lie. If I print the pdf the color is printed in the darkened form (this could be printer related). If I use the same color in html it is shown in a lightened form. Basically nothing changes but is shown otherwise, Color me crazy but it is true, PeterLive Search, for accurate results! Click here - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
[iText-questions] Graphics2d + transparency
Anybody any transparent thoughts on this... I'm usingbuffered images to draw on Graphics2d generated from the PdfContentByte.The bufferedimages are type ARGB(source PNG, GIF) and theycontain transparency if I check image.getColorModel().getTransparency(). To check the transparency further I even replaced all transparent areas with an other color. However when generating the pdf the transparency is turned into a solid color. If I use a template with PdfGState and set the blendmode to BM_MULTIPLY transparency is achieved simular to Photoshop. However the downside is that the layers of individual images or text get mixed. My question: Does transparency for Graphics2d work? If it works what am I doing wrong? If it doesn't work when will it be fixed? Greetings from Peter --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk=110944=241720=121642 ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions