google-code-export / purepdf

Automatically exported from code.google.com/p/purepdf
2 stars 1 forks source link

Error thrown when use local characters with purePDF 0.74.20100527 #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. declare font : 
FontsResourceFactory.getInstance().registerFont(BaseFont.HELVETICA, new 
BuiltinFonts.HELVETICA());
2.add some text with local characters in pdf : 
this.document.add(purePdfComponentWithText);

What is the expected output? What do you see instead?
I expecting to be able to save successfully the file. But error is thrown 
instead : 

ReferenceError: Error #1069: Property undefined not found on 
__AS3__.vec.Vector.<int> and there is no default value.
    at org.purepdf.pdf.fonts::BaseFont/_getWidthI()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/fonts/BaseFont.as:403]
    at org.purepdf.pdf.fonts::BaseFont/getWidth()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/fonts/BaseFont.as:272]
    at org.purepdf.pdf.fonts::BaseFont/getWidthPoint()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/fonts/BaseFont.as:284]
    at org.purepdf.pdf::PdfFont/getWidth()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/PdfFont.as:107]
    at org.purepdf.pdf::PdfChunk/getCharWidth()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/PdfChunk.as:305]
    at org.purepdf.pdf::BidiLine/processLine()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/BidiLine.as:528]
    at org.purepdf.pdf::ColumnText/go()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/ColumnText.as:460]
    at org.purepdf.pdf::PdfPCell/get maxHeight()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/PdfPCell.as:535]
    at org.purepdf.pdf::PdfPRow/calculateHeights()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/PdfPRow.as:122]
    at org.purepdf.pdf::PdfPRow/get maxHeights()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/PdfPRow.as:75]
    at org.purepdf.pdf::PdfPTable/getRowHeight1()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/PdfPTable.as:375]
    at org.purepdf.pdf::PdfPTable/calculateHeights()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/PdfPTable.as:237]
    at org.purepdf.pdf::PdfPTable/set totalWidth()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/PdfPTable.as:775]
    at org.purepdf.pdf::ColumnText/goComposite()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/ColumnText.as:1144]
    at org.purepdf.pdf::ColumnText/go()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/ColumnText.as:396]
    at org.purepdf.pdf::PdfDocument/_addPTable()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/PdfDocument.as:2114]
    at org.purepdf.pdf::PdfDocument/addElement()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/PdfDocument.as:384]
    at org.purepdf.pdf::PdfDocument/add()[/Users/alessandro/Documents/Workspaces/Flash/Opensource/purePDF/src/org/purepdf/pdf/PdfDocument.as:553]
...

What version of the product are you using? On what operating system?
purepdf 0.74.20100527

Please provide any additional information below.
If I use standard characters instead of some local(romanian, eg.: "ă", "î", 
"ş", "ţ"), no error is thrown. But I need to use the mentioned characters.

Original issue reported on code.google.com by mapand...@gmail.com on 27 Jul 2011 at 1:27

GoogleCodeExporter commented 9 years ago
Any update on that issue ? We're facing the exact same problem here with some 
other fancy exotic characters.

Original comment by gar...@gmail.com on 27 Sep 2011 at 2:50

GoogleCodeExporter commented 9 years ago
I resolved that issue. At <a 
href="http://stackoverflow.com/questions/6844524/writing-special-characters-with
-purepdf-in-as3">this</a> link you can see my solution.
Good luck.

Original comment by mapand...@gmail.com on 28 Sep 2011 at 5:07