Hai Andreas ..,

Thanks .., for the info .., I have similiar problem.
I'll check out the newest trunk to test it ..

Thanks!

Warm Regards,
Wildan

---
OpenThink Labs
http://sites.google.com/site/openthinklabs/

Aligning IT and Education

>> 087884599249

Y! : hawking_123
Linkedln : http://www.linkedin.com/in/wildanmaulana



2009/4/30 Andreas Lehmkühler <[email protected]>:
>
>> Thank you Andreas, The one I am using is PDFBox-0.7.3.jar.
> Hmmm, I suggest to switch to the trunk version. There are a lot of 
> improvements concerning the font-handling, especially  embedded ttf-fonts and 
> the use of system-fonts if the fonts aren't embedded to the pdf.
>
> Andreas Lehmkühler
>
>> 2009/4/29 Andreas Lehmkühler <[email protected]>
>>
>> > Hi Henry,
>> >
>> > what version of pdfbox are you using? The trunk or some older version?
>> >
>> > Andreas Lehmkühler
>> >
>> > henry du schrieb:
>> > > Hello everyone:
>> > >
>> > > I am currently using pdfbox to convert pdf to tiff.
>> > >
>> > > My existing pdf uses different fonts, not those STANDARD_14 defined in
>> > > PDType1Font. As result, fonts are replaced by default fonts when PDF is
>> > > converted to Image (page.convertToImage).
>> > >
>> > > Although the display (see below code segment)  are correct fonts type,
>> > they
>> > > are changed to some type else after pdf is converted into TIFF. The
>> real
>> > > types of Arial, TimesNewRoman are not used. Can you please let me know
>> > how
>> > > to make system fonts, Arial, TimesNewRoman etc, re-load before convert
>> > PDF
>> > > to image? Thank you very much.
>> > >
>> > > Display result:
>> > >
>> > > T1_1 - CourierStd
>> > > T1_0 - MyriadPro-Regular
>> > > TT4 - Verdana
>> > > TT3 - TimesNewRoman,Bold
>> > > TT2 - Arial,Italic
>> > > TT1 - Arial,Bold
>> > > TT0 - Arial
>> > >
>> > >
>> > > Code segment:
>> > >
>> > >    PDDocument document = PDDocument.load(pdf_filename);
>> > >    List pages = document.getDocumentCatalog().getAllPages();
>> > >    for( int i=0; i<pages.size(); i++ ){
>> > >        PDPage page = (PDPage)pages.get( i );
>> > >
>> > >        PDResources resource = page.getResources();
>> > >        Map fonts = resource.getFonts();
>> > >
>> > >        Iterator keyIterator = fonts.keySet().iterator();
>> > >        Object key = null;
>> > >        PDSimpleFont font = null;
>> > >        //PDFontDescriptor desc = null;
>> > >        System.out.println("Fonts list in page - " + i);
>> > >        while(keyIterator.hasNext()){
>> > >            key = keyIterator.next();
>> > >            font = (PDSimpleFont)fonts.get(key);
>> > >            System.out.println(key.toString() + " - " +
>> > > font.getFontDescriptor().getFontName());
>> > >        }
>> > > }
>> > >
>> > >
>> > > Henry
>> > >
>> >
>>
>
> --- original Nachricht Ende ----
>
>

Reply via email to