Find dpi & Align center of Image

Hi All,
I have new request but struggling in the below points:
1. Find less than 300 dpi image in the active document
2. Create text frame and fix center of the image vertically and horizotally.
Hope I completed the script by 90%
Completed Script:
var myGraphics = app.activeDocument.allGraphics;
var targetResolution = 300;
for (var i = 0; i < myGraphics.length; i++) {
    try
    if (myGraphics[i].effectivePpi[0] < 300) {
        var myPPI = myGraphics[i].effectivePpi[0] + " dpi"             //please ensure this line should be correct
        var myName = myGraphics[i].itemLink.name;
        var myPage = myGraphics[i].parentPage;
        var myCaption = myPage.textFrames.add();
        myCaption.textFramePreferences.verticalJustification = VerticalJustification.TOP_ALIGN;
        myCaption.contents = "FPO\r" + myName + "\r" + "Low Res " + myPPI;
        var bnds = myGraphics[i].parent.visibleBounds;
        myCaption.visibleBounds = [bnds[2] + 3, bnds[1], bnds[2] + 6, bnds[3]];
        myCaption.fit(FitOptions.FRAME_TO_CONTENT);
        try {
            var myPStyle = app.activeDocument.paragraphStyles.add({name: "Caption_lowres", justification: Justification.CENTER_ALIGN});
        } catch (myError) {
              myCaption.parentStory.appliedParagraphStyle = app.activeDocument.paragraphStyles.item("Caption_lowres");
        myPage.groups.add([myCaption, myGraphics[i].parent]);
catch(myError)
REQUIRED OUTPUT
But Current Output using above script
Thanks
Beginner_X

Hi Mr.Dave,
Thank you for your response...
I trying your code but I am not able to get the output.
Could you help to get the output for me.
var myGraphics = app.activeDocument.allGraphics;
var targetResolution = 300;
for (var i = 0; i < myGraphics.length; i++) {
    try
    if (myGraphics[i].effectivePpi[0] < 300) {
       var myPPI = myGraphics[i].effectivePpi[0] + " dpi"
        var myName = myGraphics[i].itemLink.name;
        var myPage = myGraphics[i].parentPage;
        var myCaption = myPage.textFrames.add();
        myCaption.textFramePreferences.verticalJustification = VerticalJustification.TOP_ALIGN;
        myCaption.contents = "FPO\r" + myName + "\r" + "Low Res " + myPPI;
        var bnds = myGraphics[i].parent.visibleBounds;
        myCaption.visibleBounds = [bnds[2] + 3, bnds[1], bnds[2] + 6, bnds[3]];
        var center = {x : (bnds[1] + bnds[3])/2, y : (bnds[0] + bnds[2])/2}
        var capCenter = {x : (capbnds[1] + capbnds[3])/2, y : (capbnds[0] + capbnds[2])/2}
        myCaption.move(undefined, [center.x - capCenter.x, center.y - capCenter.y]);
         myCaption.fit(FitOptions.FRAME_TO_CONTENT);
        try {
            var myPStyle = app.activeDocument.paragraphStyles.add({name: "Caption_lowres", justification: Justification.CENTER_ALIGN});
        } catch (myError) {
              myCaption.parentStory.appliedParagraphStyle = app.activeDocument.paragraphStyles.item("Caption_lowres");
        myPage.groups.add([myCaption, myGraphics[i].parent]);
catch(myError)
Help me to get output as per attached screenshot
Thanks
Beginner

Similar Messages

  • Center aligned Text in image

    Hai,
    I urgently need help. I want to create a jpg image which is totally white in this white image i draw some multiple line text which i want to write in the center of image. I send the Text as string to my class through servlet file. The string has some newline charatcer also. So can anybody tell me how can i draw image with center aligend text.
    I use Graphics2D class for drawing and with fontMetrics to get the length of my message string. But it is not fitted in image and crossing the limit of my image.
    My white image size is not fix i m using different kind of size white image.
    Thanx in advance

    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class TextPanel extends JPanel
         public TextPanel(String text)
              setBackground( Color.WHITE );
              setBorder( new EmptyBorder(5, 5, 5, 5) );
              setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
              add( Box.createVerticalGlue() );
              StringTokenizer st = new StringTokenizer(text, "\r\n");
              while (st.hasMoreTokens())
                   JLabel line = new JLabel( st.nextToken() );
                   line.setFont( UIManager.getFont( "TextField.font" ) );
                   line.setAlignmentX(0.5f);
                   add( line );
              add( Box.createVerticalGlue() );
         public static void main(String[] args)
              String text =
                   "first line\n" +
                   "second line\n" +
                   "a line with more text\n" +
                   "another line";
              JFrame frame = new JFrame();
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              frame.getContentPane().add( new TextPanel( text ) );
              frame.pack();
              frame.setLocationRelativeTo( null );
              frame.setVisible(true);
    }

  • New CSS Rollovers not align same as Image Rollovers - Dreamweaver CC

    I have put together a test page replacing Javascript Image Rollovers for CSS Image Rollovers and the alignment of items in the 3 columns (DIVS) is not the same as when old style rollovers. I cannot seem to find the error in my CSS and would like another pair of eyes to see if I'm missing something. Here is the screenshot of new page from Firefox, followed by the CSS. Images are loading into #sidebar1 (left column), #sidebar2 (right column) and #MainContent. #MainContent seems off centered and #sidebar outside margins are different. Any help would be greatly appreciated.
    CSS:
    <style type="text/css">
    <!--
    body {
        font: 81.3% Verdana, Arial, Helvetica, sans-serif;
        background: #666666;
        margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
        padding: 0;
        text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
        color: #000000;
    .oneColFixCtrHdr #container {
        width: 780px;  /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
        background: #FFFFFF;
        margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
        border: 1px solid #000000;
        text-align: left; /* this overrides the text-align: center on the body element. */
    .oneColFixCtrHdr #header {
        background: #DDDDDD;
        padding: 0;  /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
    .oneColFixCtrHdr #header h1 {
        margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
        padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
    .oneColFixCtrHdr #mainContent {
        background: #FFFFFF;
        width: 200px;
        margin-top: 0;
        margin-right: auto;
        margin-left: auto;
        margin-bottom: 0px;
    .oneColFixCtrHdr #sidebar1, #sidebar2, #mainContent {
        text-align: center;
        width: 200px;
        padding-top: 0px;
        padding-right: 30px;
        padding-bottom: 0;
        padding-left: 30px;
    .oneColFixCtrHdr #footer {
        padding: 0; /* this padding matches the left alignment of the elements in the divs that appear above it. */
        background:#CFAF86;
        clear:both
    .teammembers #nav #teammembers a {
        color: #FFF;
    .oneColFixCtrHdr #memberdues {
        padding-right: 315px;
        padding-left: 315px;
    .oneColFixCtrHdr #footer p {
        margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
        padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
        text-align: center;
        letter-spacing: 4px;
    #container #nav {
        line-height: 2em;
        font-weight: normal;
        background-color: #CFAF86;
        text-align: center;
        margin: 0px;
        padding-top: 0px;
        padding-bottom: 0px;
        padding-right: 10px;
        list-style-type: none;
        padding-left: 10px;
    #container #nav li {
        font-weight: bold;
        display: inline;
        padding-top: 0px;
        padding-right: 10px;
        padding-bottom: 0px;
        padding-left: 10px;
    #container #nav li a {
        color: #000;
        text-decoration: none;
    #container #nav li a:hover {
        color: #FFF;
        text-decoration: none;
    .renegadestext {
        font-style: italic;
        font-weight: bold;
        color: #000;
    .oneColFixCtrHdr #AboveMainContent {
        padding-top: 0px;
        padding-right: 20px;
        padding-bottom: 0px;
        padding-left: 20px;
    .oneColFixCtrHdr #AboveMainContent h2 {
        text-align: center;
    .oneColFixCtrHdr #sidebar1 {
        background-color: #FFF;
        float: left;
        width: 200px;
    .oneColFixCtrHdr #sidebar2 {
        background-color: #FFF;
        float: right;
        width: 200px;
    #thomasbarber {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/thomas_barber.gif);
         background-repeat: no-repeat 0 0;
    #thomasbarber:hover {
        background-position: 0px -50px;
    #thomasbarber span {
        position: absolute;
        top: -999em;
    #janetbarber {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/janet_barber.gif);
         background-repeat: no-repeat 0 0;
    #janetbarber:hover {
        background-position: 0px -50px;
    #janetbarber span {
        position: absolute;
        top: -999em;
    #karenallen {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/karen_allen.gif);
         background-repeat: no-repeat 0 0;
    #karenallen:hover {
        background-position: 0px -50px;
    #karenallen span {
        position: absolute;
        top: -999em;
    #davidboudreaux {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/david_boudreaux.gif);
         background-repeat: no-repeat 0 0;
    #davidboudreaux:hover {
        background-position: 0px -50px;
    #davidboudreaux span {
        position: absolute;
        top: -999em;
    #melbahanna {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/melba_hanna.gif);
         background-repeat: no-repeat 0 0;
    #melbahanna:hover {
        background-position: 0px -50px;
    #melbahanna span {
        position: absolute;
        top: -999em;
    #kentunderwood {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/kent_underwood.gif);
         background-repeat: no-repeat 0 0;
    #kentunderwood:hover {
        background-position: 0px -50px;
    #kentunderwood span {
        position: absolute;
        top: -999em;
    #shawntrainor {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/shawn_trainor.gif);
         background-repeat: no-repeat 0 0;
    #shawntrainor:hover {
        background-position: 0px -50px;
    #shawntrainor span {
        position: absolute;
        top: -999em;
    #eddieokonski {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/eddie_okonski.gif);
         background-repeat: no-repeat 0 0;
    #eddieokonski:hover {
        background-position: 0px -50px;
    #eddieokonski span {
        position: absolute;
        top: -999em;
    #scotthartman {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/scott_hartman.gif);
         background-repeat: no-repeat 0 0;
    #scotthartman:hover {
        background-position: 0px -50px;
    #scotthartman span {
        position: absolute;
        top: -999em;
    #titoescobar {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/tito_escobar.gif);
         background-repeat: no-repeat 0 0;
    #titoescobar:hover {
        background-position: 0px -50px;
    #titoescobar span {
        position: absolute;
        top: -999em;
    #debbiehanna {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/debbie_hanna.gif);
         background-repeat: no-repeat 0 0;
    #debbiehanna:hover {
        background-position: 0px -50px;
    #debbiehanna span {
        position: absolute;
        top: -999em;
    #robertbarber {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/robert_barber.gif);
         background-repeat: no-repeat 0 0;
    #robertbarber:hover {
        background-position: 0px -50px;
    #robertbarber span {
        position: absolute;
        top: -999em;
    #gregallen {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/greg_allen.gif);
         background-repeat: no-repeat 0 0;
    #gregallen:hover {
        background-position: 0px -50px;
    #gregallen span {
        position: absolute;
        top: -999em;
    #johnmcclung {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/john_mcclung.gif);
         background-repeat: no-repeat 0 0;
    #johnmcclung:hover {
        background-position: 0px -50px;
    #johnmcclung span {
        position: absolute;
        top: -999em;
    #miketisdel {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/mike_tisdel.gif);
         background-repeat: no-repeat 0 0;
    #miketisdel:hover {
        background-position: 0px -50px;
    #miketisdel span {
        position: absolute;
        top: -999em;
    #butchhanna {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/butch_hanna.gif);
         background-repeat: no-repeat 0 0;
    #butchhanna:hover {
        background-position: 0px -50px;
    #butchhanna span {
        position: absolute;
        top: -999em;
    #kimberlyshepherd {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/kimberly_shepherd.gif);
         background-repeat: no-repeat 0 0;
    #kimberlyshepherd:hover {
        background-position: 0px -50px;
    #kimberlyshepherd span {
        position: absolute;
        top: -999em;
    #katrinabartkowiak {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/katrina_bartkowiak.gif);
         background-repeat: no-repeat 0 0;
    #katrinabartkowiak:hover {
        background-position: 0px -50px;
    #katrinabartkowiak span {
        position: absolute;
        top: -999em;
    #michelehartman {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/michele_hartman.gif);
         background-repeat: no-repeat 0 0;
    #michelehartman:hover {
        background-position: 0px -50px;
    #michelehartman span {
        position: absolute;
        top: -999em;
    #aliciaallen {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/alicia_allen.gif);
         background-repeat: no-repeat 0 0;
    #aliciaallen:hover {
        background-position: 0px -50px;
    #aliciaallen span {
        position: absolute;
        top: -999em;
    #melissalockwood {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/melissa_lockwood.gif);
         background-repeat: no-repeat 0 0;
    #melissalockwood:hover {
        background-position: 0px -50px;
    #melissalockwood span {
        position: absolute;
        top: -999em;
    #rustyhanna {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/rusty_hanna.gif);
         background-repeat: no-repeat 0 0;
    #rustyhanna:hover {
        background-position: 0px -50px;
    #rustyhanna span {
        position: absolute;
        top: -999em;
    #karenbarber {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/karen_barber.gif);
         background-repeat: no-repeat 0 0;
    #karenbarber:hover {
        background-position: 0px -50px;
    #karenbarber span {
        position: absolute;
        top: -999em;
    #chrishillman {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/chris_hillman.gif);
         background-repeat: no-repeat 0 0;
    #chrishillman:hover {
        background-position: 0px -50px;
    #chrishillman span {
        position: absolute;
        top: -999em;
    #frankmarshall {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/frank_marshall.gif);
         background-repeat: no-repeat 0 0;
    #frankmarshall:hover {
        background-position: 0px -50px;
    #frankmarshall span {
        position: absolute;
        top: -999em;
    #dorisboudreaux {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/doris_boudreaux.gif);
         background-repeat: no-repeat 0 0;
    #dorisboudreaux:hover {
        background-position: 0px -50px;
    #dorisboudreaux span {
        position: absolute;
        top: -999em;
    #johnburkett {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/john_burkett.gif);
         background-repeat: no-repeat 0 0;
    #johnburkett:hover {
        background-position: 0px -50px;
    #johnburkett span {
        position: absolute;
        top: -999em;
    #lisaburkett {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/lisa_burkett.gif);
         background-repeat: no-repeat 0 0;
    #lisaburkett:hover {
        background-position: 0px -50px;
    #lisaburkett span {
        position: absolute;
        top: -999em;
    #andreagordon {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/andrea_gordon.gif);
         background-repeat: no-repeat 0 0;
    #andreagordon:hover {
        background-position: 0px -50px;
    #andreagordon span {
        position: absolute;
        top: -999em;
    #jeffwilliams {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/jeff_williams.gif);
         background-repeat: no-repeat 0 0;
    #jeffwilliams:hover {
        background-position: 0px -50px;
    #jeffwilliams span {
        position: absolute;
        top: -999em;
    #taylordavis {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/taylor_davis.gif);
         background-repeat: no-repeat 0 0;
    #taylordavis:hover {
        background-position: 0px -50px;
    #taylordavis span {
        position: absolute;
        top: -999em;
    #leearnold {
        display: block;
        width: 150px;
        height: 50px;
        background-image: url(images/lee_arnold.gif);
         background-repeat: no-repeat 0 0;
    #leearnold:hover {
        background-position: 0px -50px;
    #leearnold span {
        position: absolute;
        top: -999em;
    -->
    </style>

    The text isn't centered within the containers for two reasons.
    1. Their display is set to block and
    2. There is nothing telling them to be centered
    One way to fix it would be to change the <a> tags to inline-block and add text-align:center to their parents and everything should center nicely within the columns.

  • How do I center an image inside a div tag using fluid grid layout?

    where do I find and what do i use the image properties position when using the fluid grid layout. I'd like to center the image in the mobile page versus th left position in the desktop.

    This is what my css codes looks like where the image is in the div tag:
    #logo_links {
        clear: both;
        float: left;
        margin-left: 0;
        width: 32.2033%;
        display: block;
    This is the html code where the image is:
      </div>
        <div id="logo_links">
          <div align="center">
            <p><img src="../fluidgrid/images/3_7x2logo.jpg" alt="" width="236" height="110" align="left"></p>
          </div>
        </div>
    I'm going to need more detail where to insert the suggested code as I am a newby!
    Thanks

  • How can I dynamically center an image in Crystal Reports?

    Hi! I'm using Visual Studio 2010, SQL Server 2008 R2 and Crystal Reports 13_0_11.
    I have a database full of images type image in SQL Server. Every image has diferent width. 
    I create a report with Crystal Reports and a Dataset and does everything that I want. But I can't horinzotal align the image, in the property window, the horizontal align option is disable, I don't know why... and I don't know what to do... 
    Please help me with how can I center the images or how can I enable the option...

    Hi Fafa0239,
    Since it is related to the Crystal Reports, please post questions related to third-party products in their forums (http://scn.sap.com/thread/3440443).
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How stop PS6 from removing the DPI value from an image when using "save for the web"?

    How stop PS6 from removing the DPI-value from an image when using "save for the web"?
    Example:
    - Open a tif image, that contains a dpi value (resolution).
    - Use the splice tool in PS6.
    - Export the slices with "Save for web", as gif-files.
    Then the dpi value is removed, the gif files has no dpi value (it's empty).
    How can we stop PS6 from removing the dpi value when using "save for web"?
    OR:
    When using the slice tool, how can we save the sliced pieces without PS removing the dpi value?

    you can make your art go a little bit over the bounds. or you can make sure your artboart and art edges align to pixels

  • Center an image

    I am new to Dreamweaver. I just bought CS6 and I'm trying to center an image in a div on the left side of my page. My page is set up with multiple background layers and a left navigation column and then the right side is the main context of the page. Instead of using something like a horizontal line in my navigation area, I have a small border type design that I want centered in this column. I understand how I can place the image to the right or left but how do you center it?
    I tried creating a class called .center but there's no options for centering something except for text. I did try using align center for text but that didn't work.
    I'm basically a novice with all of this so any help would be greatly appreciated.

    Do something like this:
    1) CSS like this:
    img.center {   display: block;   margin-left: auto;   margin-right: auto; }
    2)  HTML like this:
    <img src="my_big_one.jpg" alt="big_one" class="center" />
    This should do the job.

  • DPI of a linked image, illustrator - extendscript

    Hi,
    I am creating a script that needs to be able to find the DPI of a linked image. I presume there must be some way of getting to this data as it is in the links window in illustrator.
    I do also need to get other information in that window (colour space & scale), but the DPI is the one im struggling with at the moment.
    Mac 10.9, illustrator CS6, extendscript
    Has anyone got any ideas?
    Thanks in advance,
    Tom

    Thanks for the assistance, both of you.
    After looking at the XMP i have discovered that only Tiff files have the relevent data that i need and as there will be multiple file formats that the script will need to read this is not an option.
    I have used the bridge talk script from the other post that you linked and adapted it to search through all files in the document and quit photoshop when finished.
    One last question, is there anyway to find out if photoshop is already running? i dont want it to close the application if the user already had it open before running.

  • Cannot center bg-image in Firefox HELP!!!!!

    Hi all,
    I need to center the background image here below. it works fine in chrome and IE, not firefox. Any help would appreciated thanks!
    Here's the code:
    body {
    background-image: url(bgx.png);
    alignment:L center;
    background-repeat: no-repeat;
    background-position: top-center;
    background-position-x: center;
    background-color: #F2F2F2;
    font-family: garamond;
    color: #CCC;
    font-size: 20px;
    align: center;

    There's no way to predict or explain how various browsers will react to invalid code.
    As far as I know, the following are invalid usages -
    alignment:L center;
    background-position: top-center;
    background-position-x: center;

  • Photoshop Elements 7 - How do I align/center a layer?

    I'm using Photoshop Elements 7. How do I align/center a layer vertically or horizontally on a page?

    Are you adding objects to a blank layer? If so bring up the ruler then drag and drop guides to your center and any additional points. You can also set so that objects automatically snap to the guide lines.
    If you want to align visually similar images on top of each other, there is no auto-align like in CS5. The only work around is to lower the opacity of the top layer and then use the move tool to align by eye.
     

  • HOW TO: Action to resize & center crop images of various sizes

    Hello,
    I've gotten a lot of help here over the years so I wanted to share an action I created. I needed to resize and automatically center crop images of various sizes for my company's website. For example: All images needed to be 900px x 460px 72dpi - and because input images were from many different sources, the dimensions were different for each image. It seemed straight forward at first (sort of) but I couldn't find a way of doing this without a script or some third party program - so I came up with the following action. Hope someone gets some use out of it.
    Note: Change action as needed to suit your needs.
    Resize and Center Crop (Auto)
    Fit Image
         height: 900px
         width: 900px
         With Don't Enlarge
    Canvas Size
         height: 460px
         vertical: center
         extension color: white
    Image Size
         width: 900px
         resolution: 72 per inch
         with scale styles
         with constrain proportions
    Save (optional)
         As: JPEG
         Quality: 12
         Scans: 5 (for web images)
    This assumes that the images are at least horizontal, but if you have photoshop CC you can create a conditional action that will work with vertical and horizontal images. If you are square cropping, this action makes it a breeze. I also have an action that uses the same basic logic, but lets me manually move the crop box. The only real issue I have encountered is when the original image ratio is very narrow, which leads to some white space on the top and bottom (I'm working on updating the action to address this). But it has worked on about 95% of my images. Again, you will probably need to adjust all of the variables depending on what you are trying to do, but it should be possible with the same steps. And of course this can also be used to batch process.
    Feel free to let me know if anyone comes up with improvements! Thanks

    Hmm thanks Mylenium, I got that response a lot when I was searching before. But if you re-read above, I am explaining a method of doing it without a script. So it wasn't really a question, just a tip in case anyone else wanted to do the same.

  • How to align center for 800x600 webpage on a 1024x768 screen ?

    Dear all,
    I wonder if I can align center for a 800x600 webpage on a 1024x768 screen using Oracle Portal ?
    thanks
    George

    Hi Sonia,
    I can create the user inteface template successfully as you described.
    You can use a user interface template for this.
    Go to Providers -> Locally Built Providers -> Shared Components -> User Interface Templates.
    Then create a template for your pages and add the following lines:
    <table width="800" border="0" cellpadding="0" cellspacing="0" align="center">
    <tr>
    <td>#BODY#</td>
    </tr>
    </table>
    But, I can't follow the following.
    I go back to my page group and click [Properties]. And I can't find the [Optional].
    I am using Portal 1.10.2. Can you help me ?
    After that, go back to your page template, and on its properties, go to optional and then select the User Interface Template you have just created.
    With this you won't have to change your original Template.
    Thanks
    George (HK)

  • How to center an Image exported as EPS?

    Hello,
    Does anyone know how a good way to center an image on the page when exporting as EPS via a javascript from AI CS3?
    Here's the workflow:
    Open native AI File with multiple layers
    Make only the layer being exported visible
    Export the layer as EPS using export parameters
    Repeat until all layers are exported
    As it stands now, each image is exported as it was placed on the original AI file. I would like to center the image on the page before exporting.
    Best,
    Don

    Hi Sneedbreedley, welcome back to the forums.
    To center elements, you need just 3 things:
    valid document type (DW does this for you when you create a new page).
    declared width in pixels, ems or %.
    margin-left and margin-right of auto (browser default).
    To center paragraphs, headings, etc... use text-align:center property.
    CSS:
    body {
    width: 980px;
    margin:0 auto; /**this is centered on screen**/
    .center {text-align:center}
    HTML
    <!doctype html>
    <head>
    <meta charset="utf-8">
    </head>
    <body>
    <h1 class="center">This heading is centered</h1>
    <h2>This heading is not centered</h2>
    <p class="center">Insert image here</p>
    </body>
    </html
    Nancy O.

  • How to Center an Image?

    It used to be easy to center an image, but not anymore. I do not know ANYTHING about CSS so please tell me from Step 1 how to do it.
    I created a simple blank html page and inserted an image in it. I looked in properties but nothing saying CSS shows up. So at this point, how do I center it?

    Hi Sneedbreedley, welcome back to the forums.
    To center elements, you need just 3 things:
    valid document type (DW does this for you when you create a new page).
    declared width in pixels, ems or %.
    margin-left and margin-right of auto (browser default).
    To center paragraphs, headings, etc... use text-align:center property.
    CSS:
    body {
    width: 980px;
    margin:0 auto; /**this is centered on screen**/
    .center {text-align:center}
    HTML
    <!doctype html>
    <head>
    <meta charset="utf-8">
    </head>
    <body>
    <h1 class="center">This heading is centered</h1>
    <h2>This heading is not centered</h2>
    <p class="center">Insert image here</p>
    </body>
    </html
    Nancy O.

  • Horizontal align center in table-cell

    Hello,
    I'm having a problem getting to horizontally align a div (schilderij) in another div (schilderijholder).
    This schilderij div has a height and width of 480px and has display: table-cell. The content of this div is an image, with different sizes on every page (there are multiple pages, it is some sort of photogallery). The images are nicely centered, horizontally and vertically, inside this div.
    The containing div (schilderijholder), has a width of 100% of it's containing block, which has a variable size
    The problem is, I cant get the schilderij div horizontally centered in the schilderijholder div.
    Here's the simplified code. If you need the whole code, I can post that too.
        <div class="leftWrapper" style="clear: none; float: left; width: 68%; height: 100%;">
        <div class="content" style="margin: 40 10 50 30;">
          <div id="schilderijholder" style="text-align: center; width: 100%; height: 100%;">
              <div id="schilderij" style=" height: 480px; width: 480px; text-align: center; vertical-align: middle; display: table-cell;">
                <img src="../Assets/Schilderijen/normal/01.jpg" width="399" height="480" align="center" />
                </div>
              </div>
            <div id="pageControl">
            <span class="left">
              <a href="schilderijen2.html"></a> </span>
              <span class="right">
              <a href="02.html">Volgende</a>
                </span>
              </div>
          </div>
         </div>
    What I've tried:
         - "margin: 0 auto;" on the schilderij div
         - "position: relative;" on the schilderijholder div and "position: absolute; left: 50%; margin-left: -240px;" on the schilderij div
    But these both don't work.
    Does anybody know a solution for this, or maybe has something to put me on the right way?
    Thanks in advance!

    Let's fix your code first:
    <div class="leftWrapper" style="float: left; width: 68%; height: 100%;">
        <div class="content" style="margin: 40px 10px 50px 30px;">
          <div id="schilderijholder" style="text-align: center; width: 100%; height: 100%;">
              <div id="schilderij" style=" height: 480px; width: 480px; text-align: center; vertical-align: middle; display: table-cell;">
                <img src="../Assets/Schilderijen/normal/01.jpg" width="399" height="480" align="center" />
                </div>
              </div>
            <div id="pageControl">
            <span class="left">
              <a href="schilderijen2.html"></a> </span>
              <span class="right">
              <a href="02.html">Volgende</a>
                </span>
              </div>
          </div>
         </div>
    Why do you need the div#schilderij at all?  Seems unnecessary to me.
    Then you would need the display:table-cell on the parent to this div, not on the div#schilderij, which has basically the same dimensions as the image.  But I think this is all too complicated.  Why not just this?
    <div class="leftWrapper" style="float: left; width: 68%;">
        <div class="content" style="margin: 40px 10px 50px 30px;">
          <div id="schilderijholder" style="text-align: center;">
                <img src="../Assets/Schilderijen/normal/01.jpg" width="399" height="480" align="center" />
                </div>
              </div>
            <div id="pageControl">
            <span class="left">
              <a href="schilderijen2.html"></a> </span>
              <span class="right">
              <a href="02.html">Volgende</a>
                </span>
              </div>
          </div>
         </div>

Maybe you are looking for