Home Forums DITA and XMetaL Discussion Graphic or image settings change Reply To: Graphic or image settings change

Derek Read

Reply to: Graphic or image settings change

OK, the following change will force images to be 100% (their original size as encoded in the image itself) regardless of what you set for their width or height attribute values (in the XML source) AND if the image is too big to fit inside its containing block (in your case this is essentially the column width) then they should be scaled down to fit — the feature you are looking for. This is working for me with raster images (tested with JPG and GIF).


Deliverable type:
“XMetaL Enhanced PDF via RenderX XEP”
File: ..DITA_OTdemoxmfoCustomizationfoxslxm_image_size_fix.xsl

Original template:
   
       
       
       
       
       
       
           
           
       

       
           
               
                   
               

           

           
               
                   
                   
                       
                           
                               
                                   
                               

                               
                                   
                               

                           

                       

                   

                   
                   
                       
                           
                               
                                   
                               

                               
                                   
                               

                           

                       

                   

               

           

       

   

New template:
   
       
       
       
       
       
       
           
           
       

       
       
           
       

   

For those that wish to dig into this further the following file both defines and calls the template called “placeImage” that is being redefined in the file listed above:
..DITA_OTdemoxmfoxslfocommons.xsl

The reason it was redefined in the first place is because the original DITA OT plug-in that our plug-in is based on (from Idiom, sometimes called the “PDF2” transtype) is that it assumed images would be coded at 72 DPI (72 pixels per inch, which is standard on some operating systems like Macs). As our software runs on Windows where 96 DPI is the standard display resolution we changed this to 96, so that what you see while editing would match what you see in output. For more information on the complexities of embedding raster images into PDF documents at the “right” resolution you may wish to search the web for “pdf image resolution” (the main point being that there really is no “right” resolution).

Reply

Products
Downloads
Support