Menu

link inside pdf in new Window

Help
karthick M
2016-02-16
2016-03-07
  • karthick M

    karthick M - 2016-02-16

    Hi all

    My project is to generating pdfs over admin panel based of the form submitted inforamtion which is stored in db and i am fetching the information and gendrating the pdf using tcpdf .
    The form has some fields and pdf attachment's .
    Everthing is works find other than the two issue which is describe below : .
    I am not able to figure out these two bug in my project .
    How can i manage the link inside my pdf should get open in new tab .
    The pdf url inside the gendrated pdf is been added with php dynamic data which is fetching from pdf .
    This is part of code for the pdf's gendrated based on catagory :

      <?php if(($appval['name'])== 'PDF'){?>
                 <dt ><?php echo stripslashes($appval['name']); ?></dt>
                <dd><a href=<?php echo stripslashes($appval['value']); ?>><?php echo stripslashes($appval['value']); ?></a></dd>
            <?php } else{?>
                    <dt ><?php echo stripslashes($appval['name']); ?></dt>
                <dd><?php echo stripslashes($appval['value']); ?></dd>
                <?php }?>
                    <?php } ?>
                    </dl>
                    <hr />
                    <div style="page-break-before: always;"></div>
                <?php  }    
            } 
        }
    

    This the part where the pdf link which is shows in pdf :

     <dt ><?php echo stripslashes($appval['name']); ?></dt>
                <dd><a href=<?php echo stripslashes($appval['value']); ?>><?php echo stripslashes($appval['value']); ?></a></dd>
    

    I have tried with all the html option to open the link in new tab but that does not works for me.

    Additionaly i have an another issue with this same pdf's .
    As per now the pdf link are opend in same tab. but when i try to return back after clicked the link inisde pdf the pdf window is showing up the top of the page, Is it possible to fix the Incorrect return from viewing a file from the exported PDF-file. When i try to return it should be show the page exactly when i went off .

     

    Last edit: karthick M 2016-02-16
  • Liam Vans

    Liam Vans - 2016-03-07

    Opening links in a new window from inside a PDF is not supported by the PDF file format.

     

Log in to post a comment.