Re: [iText-questions] iText Open Type Font

2009-01-14 Thread Thimo Seitz
Hello.

I’ve noticed that in your Fontpath is a blank after “Fonts”. Is that correct ?



Maybe you have a issue with your encoding of your sourcefile. Have you verified 
that your compiler and your jvm is using the same encoding as your 
sourcecode-editor ? e.g. UTF-8

If not, try to escape your chars like \u, where  is a Unicode character 
code.

Best Regards
Thimo Seitz


Dipl.-Inf. (FH) Thimo Seitz
Geschäftsführer Entwicklung
Flyer-Ex Software GmbH
Am Weichselgarten 7
91058 Erlangen/Tennenlohe
Tel. 09131 / 691-189

thimo.se...@flyer-ex.demailto:thimo.se...@flyer-ex.de
http://www.flyer-ex.de


Von: Hua Nguyen Hung [mailto:h.n.h...@cuvel.com]
Gesendet: Mittwoch, 14. Januar 2009 04:57
An: itext-questions@lists.sourceforge.net
Betreff: [iText-questions] iText Open Type Font

 Dear everyone !  I have problem with Font when create pdf file . I use Open 
Type Font  (AquaKanaRegular )

with encoding IDENTITY-H ,the pdf file do not have any content .

Anyone know the problem , please help me !

Platform I use to test :
OS : Mac  10.4.8
Java JDK :1.5
iText version : 2.1.4
Adobe Reader : 8.1.3

This is my code

public class TestMain {
public static void main(String[] args){
Document document = new Document();

String text = aおはじょございますa;
try{

PdfWriter.getInstance(document, 
new FileOutputStream(HelloWorld.pdf));

document.open();

Font bf = 
FontFactory.getFont(/System/Library/Fonts 
/AquaKanaRegular.otf,BaseFont.IDENTITY_H, BaseFont.EMBEDDED, 14f);

document.add(new 
Paragraph(text, bf));
}
catch(DocumentException de){

System.out.println(de.getMessage());
}
catch(IOException ioe){

System.out.println(ioe.getMessage());
}

document.close();
}
}
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
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] Help with a strange document

2009-01-14 Thread Alexis Pigeon
Hi RG,

On 14/01/2009, rgarret rgar...@co.pierce.wa.us wrote:

  Hello,

  I have an application that takes pdf images and stamps them in the upper
  right corner. I calculate where to place the stamp using the documents
  dimensions and some default offsets. 99% of the time it works but we have
  one customer who's documents never get stamped properly. According to itext
  their documents are all 792x612 with 0 rotation but in acrobat it does not
  look like a landscape image and the document properties say it is 8.50x11.00
  in. Itext tries to stamp it but the stamp seems to end up out of bounds
  where I can not see it.

  I should also mention that if I rotate the image -90 before stamping it
  comes out just right. Not only that but the text orientation looks just the
  same in acrobat as if the original was rotated 90...very odd. I'd love to
  just detect when width  height and rotate -90 but I can not do that for
  true landscape documents otherwise the text is sideways and the stamp is in
  the wrong place.

  I don't know if it matters but the PDF Producer is a Xerox WorkCenter 7345.

If your customer's ok with it, please provide one of these faulty
files for inspection, so that the PDF gurus who keep an eye on the
list can have a look at it.

Cheers,
alexis

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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] iText Open Type Font

2009-01-14 Thread mister bean

There are known problems with this font. See
http://forum.soft32.com/mac/System-Fonts-Display-Font-Book-ftopict4205.html
which discusses it in length.

Unless someone else points you to something in your iText code, I would look
very carefully at the font. Try using some .otf font that's not a peculiar
subset of Apple's own version and see if that works with the same code.

---mr. bean

 re 


Hua Nguyen Hung wrote:
 
  Dear everyone !  I have problem with Font when create pdf file . I use
 Open Type Font  (AquaKanaRegular )
 
  
 
 with encoding IDENTITY-H ,the pdf file do not have any content .
 
  
 
 Anyone know the problem , please help me !
 
  
 
 Platform I use to test :
 
 OS : Mac  10.4.8
 
 Java JDK :1.5
 
 iText version : 2.1.4 
 
 Adobe Reader : 8.1.3
 
  
 
 This is my code
 
  
 
 public class TestMain {
 
 public static void main(String[] args){
 
 Document document = new Document();
 
 
 
 String text = aおはじょございますa;
 
 try{
 
 
 

 PdfWriter.getInstance(document, new FileOutputStream(HelloWorld.pdf));
 
 
 
 document.open();
 
 
 
 Font bf =
 FontFactory.getFont(/System/Library/Fonts
 /AquaKanaRegular.otf,BaseFont.IDENTITY_H, BaseFont.EMBEDDED, 14f);
 
 
 
 document.add(new
 Paragraph(text, bf));
 
 }
 
 catch(DocumentException de){
 

 System.out.println(de.getMessage());
 
 }
 
 catch(IOException ioe){
 

 System.out.println(ioe.getMessage());
 
 }
 
 
 
 document.close();
 
 }
 
 }
 
 
 --
 This SF.net email is sponsored by:
 SourcForge Community
 SourceForge wants to tell your story.
 http://p.sf.net/sfu/sf-spreadtheword
 ___
 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
 

-- 
View this message in context: 
http://www.nabble.com/iText-Open-Type-Font-tp21451159p21452108.html
Sent from the iText - General mailing list archive at Nabble.com.


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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] Help with a strange document

2009-01-14 Thread 1T3XT info
rgarret wrote:
 According to itext
 their documents are all 792x612 with 0 rotation

In other words, the mediabox is 11 x 9 inch.
The 0 rotation: are you sure you used the method 
getPageSizeWithRotation()? Because when you use getPageSize(), you'll 
always get rotation 0 even if the page is rotated!
Maybe you are using the wrong method, and maybe the rotation is 90 
degrees...

 but in acrobat it does not
 look like a landscape image and the document properties say it is 8.50x11.00
 in.

Suppose I was right about your first mistake. Then the MediaBox is 11 x 
9 inch rotated 90 degrees. Now you stamp it, based on those 
measurements. But what if the document has a CropBox that is smaller 
than the MediaBox? That would explain the behavior you're explaining.

 Not only that but the text orientation looks just the
 same in acrobat as if the original was rotated 90...very odd.

Did you read chapter 2 of iText in Action? If so, did you understand 
the concept behind the method setRotateContents? If so, please explain 
what's odd about this.

 I'd love to
 just detect when width  height and rotate -90 but I can not do that for
 true landscape documents otherwise the text is sideways and the stamp is in
 the wrong place.

Read the documentation. Chapter 2 and 14 are probably crucial if you 
want to understand what happens.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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] Controling Automatic Page Breaking

2009-01-14 Thread Charles Mason
On Tue, Jan 13, 2009 at 2:16 PM, Klas Lindbäck klas.lindb...@val.se wrote:
 What page breaking algorithm do you want to use?
 Do you want to keep entire sections on the same page or do
 you want to avoid orphans and/or widows?

 A simple way to find the height of an entire section is to preview the
 output:
 1. Create a scrap document with the same pagesize, borders etc
 and render the section on it.
 2. Read the current Y position.

 You can then compare with the space left on the current page of your
 document.

Thanks for the replies everyone.

I hadn't though about rendering it to a scrap document first, I think
that's the best way to handle this.

Thanks again,

Charlie M

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


[iText-questions] SGV and iText

2009-01-14 Thread privat
Hello,

Does anybody know how to handle SVG in iText?
Thanks for your help.

best regards

Markus--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
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

[iText-questions] Keeping images untouched from compession

2009-01-14 Thread privat
Hello,

Does anybody know how to keep the orginal image.
I tried to insert a image but it was compressed by imageio.
Thanks for your help.

best regards

Markus--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
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] Keeping images untouched from compession

2009-01-14 Thread 1T3XT info
pri...@samea.de wrote:
 Hello,
  
 Does anybody know how to keep the orginal image.

iText doesn't change images. It keeps the original pixels.

 I tried to insert a image but it was compressed by imageio.

The resolution may be changed when adding the image to a PDF, but your 
allegation is wrong. Please rephrase your question so that it doesn't 
sound like something that is not true.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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] SGV and iText

2009-01-14 Thread 1T3XT info
pri...@samea.de wrote:
 Hello,
  
 Does anybody know how to handle SVG in iText?

That's explained in chapter 2 of iText in Action.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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] Marked Content

2009-01-14 Thread David Thielen
Hi;

 

I am very sorry - we had our internet connection go down for 2 days and
I lost the emails coming in answering my question below. So could anyone
who answered this answer again? Thanks

 

 

I'm diving into the Marked Content and have a couple of questions.

 

1)  Does it work with ColumnText? It looks like it should but better
to ask.

2)  It looks like what we do is pass in the formatting via html
commands. Is there any restriction on this or is it pretty much all
html?

3)  Do we need to pass in character formatting like b or can
Acrobat figure that out based on the settings of the text we render?

4)  Is there a way to tell it the lines we draw are for a table? Or
do we just specify that in the table part and it will ignore the
lines?

 

Thanks - dave 

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
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] Marked Content

2009-01-14 Thread Rick Carback
David,

See list archives (also accessible from the link at the bottom of the page):

https://lists.sourceforge.net/lists/listinfo/itext-questions

-R

On Wed, Jan 14, 2009 at 3:50 PM, David Thielen da...@windward.net wrote:

  Hi;



 I am very sorry – we had our internet connection go down for 2 days and I
 lost the emails coming in answering my question below. So could anyone who
 answered this answer again? Thanks





 I'm diving into the Marked Content and have a couple of questions.



 1)  Does it work with ColumnText? It looks like it should but better
 to ask.

 2)  It looks like what we do is pass in the formatting via html
 commands. Is there any restriction on this or is it pretty much all html?

 3)  Do we need to pass in character formatting like b or can Acrobat
 figure that out based on the settings of the text we render?

 4)  Is there a way to tell it the lines we draw are for a table? Or do
 we just specify that in the table part and it will ignore the lines?



 Thanks – dave


 --
 This SF.net email is sponsored by:
 SourcForge Community
 SourceForge wants to tell your story.
 http://p.sf.net/sfu/sf-spreadtheword
 ___
 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:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
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