Putting a link on a PDF document that is updates is not working

104 views
Skip to first unread message

pie...@bollaert.email

unread,
Oct 23, 2018, 6:47:55 PM10/23/18
to dompdf
Hello. We are using DomPDF already heavily in our applications (Laravel) but there is one recurring issue. Allow me to describe the process:
- Users are selecting Google Documents (mostly Google Slides)
- These are downloaded from Google Drive as PDF (= export).
- DomPDF is adding a current date on the document en adding some personal features for the client, receiving the PDF.
- However, if we put a link in the generation process, this fails and the link is unavailable UNLESS we only type the real URL. So: Dear X, please click on www.google.com to see more., will work. Won't work: Dear X, please click HERE to see more.
Is there a solution available?
Cheers, Pieter.

BrianS

unread,
Dec 28, 2018, 9:39:22 PM12/28/18
to dompdf
Not sure what the problem is. Your text does not convey what HTML dompdf is attempting to render, so some sample code would be helpful.

Pieter Gyselinck

unread,
Jan 3, 2019, 11:44:34 AM1/3/19
to dom...@googlegroups.com
Thank you for your reply. I'll try to create an example as soon as possible.
Pieter

Op za 29 dec. 2018 om 03:39 schreef BrianS <eclect...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "dompdf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dompdf+un...@googlegroups.com.
To post to this group, send email to dom...@googlegroups.com.
Visit this group at https://groups.google.com/group/dompdf.
For more options, visit https://groups.google.com/d/optout.

piet...@gmail.com

unread,
Jan 18, 2019, 8:38:39 AM1/18/19
to dompdf
Hi Brian (and others),
First of all, sorry for the delay, as after new year some other matters had to be attendend. We have something working, but it is a lot of coding for which we hope Dompdf can help us out further.

I will try to explain the situation. So, we are using the Dompdf within Laravel. When we want to send an email to a potential customer, we add some google docs (or powerpoints) that we convert to PDF. On these documents, we add a link to the direct info online. Putting that link on the PDF, is done now, manual style, using the X-Y coordinates. If we add that link hard on the original google doc or powerpoint, the output of the link on the PDF doc fails.

So, with a bit of extra context:
--> You have a Google doc with requested product info. On that page is a link 'On line Product Info' which contaits e.g. the link http://www.tankkopen.be/mazouttanks.html . See attached powerpoint (first page left middle, there is a red text "onze webshop" underlined (translated: "our webshop")).
--> We convert this document to PDF to attach to a mail.
--> Situation now: we have to add it manually: code example:
$pdf->SetFontSize(10);
$pdf->SetTextColor(255, 0, 0);
$pdf->SetFont('','U');
$pdf->SetXY(90.6 , 195.6);
$pdf->Cell(20,8 , iconv('UTF-8', 'ISO-8859-1', 'onze webshop'),'','','',false, "https://www.tankkopen.be/mazouttanks.html");
--> Ideal situation: de code is embedded in the powerpoint document and coverted to pdf. Above code is not necessary. This would help a lot, as we have a lot of these snippets hanging around, depending the type of document, type of product, type of location online, etc... .
 
Is this possible to solve?
Thank you. Pieter


Op zaterdag 29 december 2018 03:39:22 UTC+1 schreef BrianS:
offerte-bovengronds.pptx

BrianS

unread,
Jan 28, 2019, 10:49:51 PM1/28/19
to dompdf
So the document is originally a PowerPoint document. How do you get from there to HTML? Can you post the intermediate HTML? And the PDF itself. I have seen an issue where the link is rendered but the annotation box is not sized or positioned very well and as a result the link is there but difficult to click.

Pieter Gyselinck

unread,
Jan 29, 2019, 8:45:44 AM1/29/19
to dom...@googlegroups.com
Hi Brian,
We are changing them to google slides. You can use these inside DomPDF to convert them to PDF. So there is no in between phase to HTML. If you think that is the way to go, we can certainly check that path.
If you use the link without text (so you give, stupid example: Dear user, click on http://google.com , this will work. This not: Dear user, click here (with link behind the 'here).
Thanks - Pieter

Op di 29 jan. 2019 om 04:49 schreef BrianS:

BrianS

unread,
Feb 16, 2019, 11:50:56 AM2/16/19
to dompdf
If you include the URL on the page the PDF reader is probably recognizing it as a URL and making it a hyperlink.

Dompdf requires that the link be formatted as an href to render it as a link on the page. It's quite possible that going from the slide format to the intermediate HTML. Dompdf is an HTML to PDF converter, so you need some kind of intermediate HTML. Though it's possible the slides are being rendered to an image before being fed to Dompdf, in which case Dompdf wouldn't really be doing any rendering.

So let's say the intermediate format is HTML. The reason I'd need to review the HTML is that it's possible the conversion process is removing the href from the HTML.
--

Pieter Gyselinck

unread,
Apr 25, 2019, 4:26:22 AM4/25/19
to dom...@googlegroups.com
Hi Brian,
Just to tell you, that we will still work on this, but perhaps we have to change the strategy to 'comply' better to Dompdf. Keep you posted.
Pieter

Op za 16 feb. 2019 om 17:50 schreef BrianS <eclect...@gmail.com>:
--

Pieter Gyselinck

unread,
Apr 25, 2019, 11:56:39 AM4/25/19
to dom...@googlegroups.com
Hi Brian,
just to add an additional question: is there a way to catch the intermediate html from our side once we are converting the slide?
Thanks - Pieter

Op do 25 apr. 2019 om 10:26 schreef Pieter Gyselinck <piet...@gmail.com>:

BrianS

unread,
Jun 1, 2019, 10:31:52 AM6/1/19
to dompdf
That should be possible, it just depends on your conversion utility.


On Thursday, April 25, 2019 at 11:56:39 AM UTC-4, Pieter Gyselinck wrote:
Hi Brian,
just to add an additional question: is there a way to catch the intermediate html from our side once we are converting the slide?
Thanks - Pieter

Op do 25 apr. 2019 om 10:26 schreef Pieter Gyselinck:
Hi Brian,
Just to tell you, that we will still work on this, but perhaps we have to change the strategy to 'comply' better to Dompdf. Keep you posted.
Pieter

Op za 16 feb. 2019 om 17:50 schreef BrianS:

Pieter Gyselinck

unread,
Jun 1, 2019, 5:19:40 PM6/1/19
to dom...@googlegroups.com
Hi Brian,
This might lead to a way out. Not sure. This will take some time, however, I'll let you know of progress or failure . Pieter.

Op za 1 jun. 2019 om 16:31 schreef BrianS <eclect...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "dompdf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dompdf+un...@googlegroups.com.
To post to this group, send email to dom...@googlegroups.com.
Visit this group at https://groups.google.com/group/dompdf.

piet...@gmail.com

unread,
Oct 22, 2020, 7:40:18 AM10/22/20
to dompdf
Hi Brian,
Just to let you know, we will follow another path and if we want to create PDF, we will first create HTML page in stead off layering pdf-files.
Thanks! Pieter


Op zaterdag 1 juni 2019 om 23:19:40 UTC+2 schreef piet...@gmail.com:
Reply all
Reply to author
Forward
0 new messages