Ignore:
Timestamp:
03/22/08 03:23:25 (4 years ago)
Author:
jharrop
Message:

log statements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docx4j/src/main/java/org/docx4j/openpackaging/packages/WordprocessingMLPackage.java

    r205 r217  
    2828import javax.xml.bind.JAXBContext; 
    2929import javax.xml.bind.Marshaller; 
     30import javax.xml.parsers.DocumentBuilderFactory; 
    3031 
    3132import org.apache.log4j.Logger; 
     
    446447                Substituter.FontMapping fm = (Substituter.FontMapping)pairs.getValue(); 
    447448                 
    448                         log.info("Substituting " + fontName + " with " + fm.getPhysicalFont().getFamilyName() + " from " + fm.getPhysicalFont().getEmbeddedFile() ); 
    449449                        if (fm.getPhysicalFont()!=null) { 
    450450                                try { 
     
    461461                                                log.info("Got it"); 
    462462                                                renderer.getFontResolver().addFont(afm, BaseFont.CP1252, true, FontUtils.pathFromURL(fm.getPhysicalFont().getEmbeddedFile()));  // drop the 'file:'      
     463                                                        log.info("Substituting " + fontName + " with embedding " + fm.getPhysicalFont().getFamilyName() + " from " + fm.getPhysicalFont().getEmbeddedFile() ); 
    463464                                        } else { 
    464465                                                // Should we be doing afm first, or pfm? 
     
    470471                                                        log.info("Got it"); 
    471472                                                        renderer.getFontResolver().addFont(pfm, BaseFont.CP1252, true, FontUtils.pathFromURL(fm.getPhysicalFont().getEmbeddedFile() ));  // drop the 'file:' 
     473                                                                log.info("Substituting " + fontName + " with embedding " + fm.getPhysicalFont().getFamilyName() + " from " + fm.getPhysicalFont().getEmbeddedFile() ); 
    472474                                                } else { 
    473475                                                        // Shouldn't happen. 
     
    475477                                                } 
    476478                                        } 
    477                                         } else { 
    478                                                  
     479                                        } else {                                 
    479480                                                renderer.getFontResolver().addFont(FontUtils.pathFromURL(fm.getPhysicalFont().getEmbeddedFile()), true); 
     481                                                log.info("Substituting " + fontName + " with embedding " + fm.getPhysicalFont().getFamilyName() + " from " + fm.getPhysicalFont().getEmbeddedFile() ); 
    480482                                        } 
    481483                                } catch (java.io.IOException e) { 
     
    500502            } 
    501503                 
     504            // TESTING 
     505//          xhtmlDoc = org.docx4j.XmlUtils.neww3cDomDocument(); 
     506//          try { 
     507//                      javax.xml.parsers.DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); 
     508//                      dbf.setNamespaceAware(true); 
     509//                      dbf.newDocumentBuilder().newDocument(); 
     510//               
     511//                      xhtmlDoc = dbf.newDocumentBuilder().parse(new File("C:\\Users\\jharrop\\workspace\\docx4all\\sample-docs\\comic.html")); 
     512//        } catch (Exception e) { 
     513//            e.printStackTrace(); 
     514//        }          
     515             
    502516                renderer.setDocument(xhtmlDoc, null); 
    503517                renderer.layout(); 
Note: See TracChangeset for help on using the changeset viewer.