1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Rescaling Featured Image AR problem

Discussion in 'WordPress' started by Nigel Lew, Sep 15, 2016.

  1. #1
    Hi folks. I need to resolve something before I proceed. My issue is here..

    http://www.jnlew.com/clients/d/

    issue is I have to auto generate a thumb from the first page of a pdf file. I am a tad closer but the issue is the pdf image that gets generated is 618 × 865

    The home page has an entirely different aspect ratio or 405 x 225 hence I am chopping too much off the top of it. I have about 100 of these and I am not about to open each pdf and manually make a thumbnail.

    This seems to be all I have to work with.

    .portfolio-thumb img{vertical-align:bottom;width:100% ;height:auto;}

    Anyone have any thoughts here. I surprised I got this mess to work in the first place. The theme is 6 years old.

    thanks,
    Nigel

    Edit: actually I am not even sure that is inherently fixable. Its still a square peg in a round hole issue. I suspect I may have to just download the entire image folder and batch crop them with a photoshop action.
     
    Last edited: Sep 15, 2016
    Nigel Lew, Sep 15, 2016 IP
  2. hdewantara

    hdewantara Well-Known Member

    Messages:
    536
    Likes Received:
    47
    Best Answers:
    25
    Trophy Points:
    155
    #2
    Hi.
    But when you go inside a portfolio, the there is a screenshot of the 1st page of the PDF. It's captured by your PDFJS (or PDF.JS ?) as <canvas> HTML element and seems to have the right width / height proportion. Can't that be used as a thumb in homepage?
     
    hdewantara, Sep 16, 2016 IP
  3. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    405
    Best Answers:
    21
    Trophy Points:
    295
    #3
    Unfortunately no. That is an actual pdf rendered inside a viewer.

    N.
     
    Nigel Lew, Sep 16, 2016 IP