read the .pdf in the web page - php

I read the links of the pdf document in a new page using the code below but I only have the blank page
#section('content')
<div class="content">
<div class="container-fluid">
<div class="card card-plain">
<div class="card-header card-header-primary">
<h4 class="card-title">Cotations</h4>
<p class="card-category">lorem ipsum lorem ipsum
</p>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-12">
Hunchly-Dark-Web-Setup.pdf
</div>
</div>
</div>
</div>
</div>
</div>
#endsection

You can check out this post about embedding PDF files on your webpage. HTML embedded PDF iframe
What I've done in the past is used an iframe to achieve this, like so:
<iframe style="border:1px solid #666CCC" title="My PDF" src="my-pdf.pdf" frameborder="1" scrolling="auto" height="1100" width="850" ></iframe>

you can use object tag
#section('content')
<div class="content">
<div class="container-fluid">
<div class="card card-plain">
<div class="card-header card-header-primary">
<h4 class="card-title">Cotations</h4>
<p class="card-category">lorem ipsum lorem ipsum
</p>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-12">
<!-- pdf here -->
<object width="400" height="400" data="http://plugindoc.mozdev.org/testpages/test.pdf">
</object>
<!-- pdf here -->
<!-- or iframe -->
<iframe src="http://plugindoc.mozdev.org/testpages/test.pdf" width="400" height="400" frameborder="0"></iframe>
</div>
</div>
</div>
</div>
</div>
</div>
#endsection

Thanks #Otavio and #jass. I tried it with ifram and it work.
<iframe style="border:none" src="{{URL::asset('/material/docs/laravel-PDF/laravel.pdf')}}" scrolling="auto" height="700" class="col-md-10"></iframe>
I wanted to specify also that we had to use the link the way laravel does it

Related

Why do my images get positioned below each other when I set all of them to col-6?

I don't know why my images get positioned below each other even though they are inside a col-6 Bootstrap div. I want them to be next to each other, not below.
Code, in case it's unreadable in the text below: https://imgur.com/S6tSXng
Page: https://imgur.com/7FZl2lM
I have already tried putting the col-6 inside the foreach block, but it only made the second image smaller. I don't know what else to try.
<section id="listaoldal">
<div class="container">
<div class="row">
<div class="col-6">
<?php foreach ($characterDetails as $key):?>
<img data-toggle="modal" data-target="#<?= $key['modal']?>" class="img-fluid mx-auto d-block my-5 ddimages"src="characters/<?=$key['link'] ?>">
<?php endforeach;?>
Well, I expect the images to be next to each other like they should be not below.
foreach out of col-6.
<?php foreach ($characterDetails as $key):?>
<div class="col-6"><img ... /></div>
<?=endforeach?>
<section id="listaoldal">
<div class="container">
<div class="row">
<?php foreach ($characterDetails as $key):?>
<div class="col-6">
<img data-toggle="modal" data-target="#<?= $key['modal']?>" class="img-fluid mx-auto d-block my-5 ddimages"src="characters/<?=$key['link'] ?>">
<?php endforeach;?>
Actually your images are placed into one "col-6" you have to create one for each images, like this:
<div class="col-6">
<img .../>
</div>
<div class="col-6">
<img .../>
</div>
<div class="col-6">
<img .../>
</div>
...
Quick exemple of what you could use to make it work :
<section id="listaoldal">
<div class="container">
<div class="row">
<?php foreach ($characterDetails as $key):?>
<div class="col-6">
<img data-toggle="modal" data-target="#<?= $key['modal']?>" class="img-fluid mx-auto d-block my-5 ddimages"src="characters/<?=$key['link'] ?>">
</div>
<?php endforeach;?>
I recommend you to read more about Bootstrap's Grid system:
https://getbootstrap.com/docs/4.0/layout/grid/

Show php image field only uploaded field

i have 3 image field like this
<?php echo $row['thumbnail1']; ?>
<?php echo $row['thumbnail2']; ?>
<?php echo $row['thumbnail3']; ?>
if there only one exp thumbnail1 is have image..
how to show
and how if only image 1 and 2 have data..
please help how to show php query if there only 1 or 2 and 3 image upload
this css style
<div class="col-xs-12">
<img src="#" class="w-full">
</div>
<!-- IF only 2 image available uploaded USE this -->
<div class="col-xs-4">
<img src="#" class="w-full">
</div>
<div class="col-xs-4">
<img src="#" class="w-full">
</div>
<!-- IF only ALL/3 image available uploaded USE this -->
<div class="col-xs-4">
<img src="#" class="w-full">
</div>
<div class="col-xs-4">
<img src="#" class="w-full">
</div>
<div class="col-xs-4">
<img src="#" class="w-full">
</div>
</div>
dsa sdas
Replace your old code with this (Someone edited So i have Re writtent the code again) :
<?php
if(isset($row['thumbnail1']))
{
?>
<div class="col-xs-12">
<img src="#" class="w-full">
</div>
<?php } ?>
<!-- IF only 2 image available uploaded USE this -->
<?php
if(isset($row['thumbnail2']))
{
?>
<div class="col-xs-4">
<img src="#" class="w-full">
</div>
<div class="col-xs-4">
<img src="#" class="w-full">
</div>
<?php } ?>
<!-- IF only ALL/3 image available uploaded USE this -->
<?php
if(isset($row['thumbnail3']))
{
?>
<div class="col-xs-4">
<img src="#" class="w-full">
</div>
<div class="col-xs-4">
<img src="#" class="w-full">
</div>
<div class="col-xs-4">
<img src="#" class="w-full">
</div>
<?php } ?>
Give me the update, if you have tested.

How To Change Footer Power By And Add Store Name

I am new to opencart,i am trying to change the store name in footer.
please answer me fast.
Go to Catalog/view/theme/default/template/common/footer.tpl
<div class="container-fluid bottom-footer">
<div class="container">
<div class="row">
<div class="col-sm-12 text-center">
<p>Copyright 2016. Cartridgewala.com. All Rights Reserved.</p>
</div>
<div class="col-sm-12 text-center">
<p><img src="<?php echo 'image/weaccept.png'; ?>" title=" " alt=" " class="img-responsive" style=" display:inline-block" /></p>
</div>
</div>
</div>

Imacro - Error -921 with a field-wrapper

I m recording an imacro macro.
Here is my script:
VERSION BUILD=8920312 RECORDER=FX
TAB T=1
TAG POS=1 TYPE=EM ATTR=TXT:Lui<SP>écrire
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:postform ATTR=ID:subj CONTENT=Hello
TAG POS=1 TYPE=TEXTAREA FORM=ID:postform ATTR=ID:text CONTENT=Bonjour
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:postform ATTR=ID:inclure CONTENT=YES
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:postform ATTR=*
Here is the code in the body of the page:
<div id="form-subj" class="rc-form-field ">
<label for="subj">Sujet :</label>
<span class="field-wrapper">
<input id="subj" type="text" value="" name="subj" maxlength="40">
</span>
</div>
I attached a capture too of the page.
I suppose that the field-wrapper is causing the error.
The attachment of the Page HTML is not complete.
Please revise.
Sorry for my late answer.
Here is the page html
<div id="content">
<div id="ctn-iframe">
<p id="load-iframe" style="display: none;">
<img src="/static/img/loader.gif?v2.2"/>
</p>
<iframe data-src="http://legacy.reseaucontact.com/bp/?action=post&ruid=3923690" frameborder="0" id="iframe-legacy" name="iframeLegacy" width="100%" scrolling="no" onload="window.parent.scroll(0,0);" src="http://legacy.reseaucontact.com/bp/?action=post&ruid=3923690" style="display: inline-block; height: 623px;"/>
</div>
</div>
<div id="aside">
<div class="inner">
<section id="search-container">
<script type="text/javascript" src="/static/bundles/applicationrc/js/plugin/jquery-ui.js?v2.2"/>
<script type="text/javascript">
<section id="widget-community-stats">
<section id="widget-selection-mois" class="widget autopromo">
<div>
<h3 class="footer-title">
<div class="clearfix">
<p>Vous voulez plus de visites sur votre fiche? Envoyez-nous votre photo pour être membre-vedette!</p>
Soumettre ma photo
</div>
</div>
<script type="text/javascript">
</section>
</div>
</div>
<div id="main-footer">
<div class="inner-shadow" style="display: block;" id="inner-shadow-1"/>
<div class="inner-shadow" style="display: block;" id="inner-shadow-2"/>
<div class="inner-shadow" style="display: block;" id="inner-shadow-3"/>
</div>
</div>

Splitting article on multiple images

I got an article that is read from the database. Which is in a wrapper, I needed an image to be full width (so even wider than the wrapper) while still being in the article. So I split it on the image tag like the code below.
However this prevents a user from adding multiple images. When I add another image tag it doesn't show the image.
How can I split the article not just on one image but every image?
All data (text, img tags) is in 'introtext'.
For example:
<p>Part one of the article</p>
//Here the article is split on all img tags that are there.
<img src="#">
<img src="#">
<img src="#">
<img src="#">
<p>Part two of the article</p>
The below code only works when I add one image tag.
<div class="container relative" style="padding: 0px;">
<div class="row">
<div class="col-sm-12">
<div class="blog-item mb-20 mb-xs-40">
<!-- Text -->
<div class="blog-item-body">
<?
$introtext = $contenti[0]['introtext'];
$splitartikel = preg_split('/(<img[^>]+\>)/i', $introtext, -1, PREG_SPLIT_DELIM_CAPTURE);
echo $splitartikel[0];
?>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid relative" style="padding: 0px;">
<div class="row">
<div class="col-sm-12">
<div class="middleimage">
<?
echo $splitartikel[1];
?>
</div>
</div>
</div>
</div>
<div class="container relative" style="padding: 0px;">
<div class="row">
<div class="col-sm-12">
<div class="blog-item mb-20 mb-xs-40">
<!-- Text -->
<div class="blog-item-body">
<?
echo $splitartikel[2];
?>
</div>
</div>
</div>
</div>
</div>
The query:
// Articles
$content = "SELECT * FROM `lb_content` WHERE alias = '".$conn->real_escape_string($_GET['alias'])."' ";
$contentcon = $conn->query($content);
$contenti = array();
while ($contenti[] = $contentcon->fetch_array());
I also tried looping the middle part, but this also loops the text before and after the image, while I only want to have the option to have multiple images.
Like this:
<?php foreach($splitartikel as $part) : ?>
<div class="container-fluid relative" style="padding: 0px;">
<div class="row">
<div class="col-sm-12">
<div class="middleimage">
<?php echo $part; ?>
</div>
</div>
</div>
</div>
<?php endforeach ?>
Maybe I need to do some sort of foreach loop for every image tag?

Categories