How to add Social Sharing icons in certificate (jpg and pdf).

Forminator Forms
2 July, 2022 23:41:42
Vinod
Topics: 1
Messages: 6
Hi Support,

How can we add social sharing icons in the window of certificate (jpg and pdf) so, the user can directly share their certificate/result on social media. That will also help us to promote our brand and user will eager to share his/her certificate.
3 July, 2022 00:36:50
E2Pdf
Support
Topics: 7
Messages: 3330
Hi,

It's possible to create an "Image" object and "Link" object over it with UR which will contain PDF URL ([e2pdf-url]) but unfortunately it seems social media networks doesn't allow to share PDFs and Facebook for example will output "Page Not Found" while sharing...

We remain at your service.


We would really appreciate your feedback at WordPress.org!
3 July, 2022 02:25:47
Vinod
Topics: 1
Messages: 6
Hi,
Thank you for your quick response.

Right pdf can't share on social media.

How social sharing icon will work on image.
Please guide.

3 July, 2022 03:11:36
E2Pdf
Support
Topics: 7
Messages: 3330
Sorry, can you please clarify what do you mean by "social sharing icon will work in image"?

You can create 2 separate objects: icon - "Image" object and "Link" over that image object where you can put any URL - so user, when clicked in it - can navigate to the generated URL. Just exactly as on attached screenshot in previous message.

But the problem that you can't share PDF. Facebook, for example, will show it as page not found because PDF is not page. We are not sure about any other social networks.

P.s. For Facebook the url to share is: https://www.facebook.com/sharer/sharer.php?u=#url

For other social networks it will be another.
We would really appreciate your feedback at WordPress.org!
3 July, 2022 03:32:45
Vinod
Topics: 1
Messages: 6
The Certificate generate in two forms jpg and pdf.

By applying social sharing icon on pdf - it works - but we can't share PDF.

But can we apply social icon on jpg certificate - so we can share it on social media.

As social media support jpg image.
3 July, 2022 03:49:30
E2Pdf
Support
Topics: 7
Messages: 3330
Unfortunately ".jpg" can't contain any dynamic elements like active links or active text.
We would really appreciate your feedback at WordPress.org!
3 July, 2022 04:09:57
E2Pdf
Support
Topics: 7
Messages: 3330
We also checked the possibility to generate url to share with facebook for dynamic image url inside "Success Message" as:

<a href="https://www.facebook.com/sharer/sharer.php?u=[e2pdf-download id='1' format='jpg' output='url' esc_url_raw='true']" target="_blank" rel="noopener">Share on Facebook</a>

However it seems Facebook also doesn't work with dynamically generated images... Maybe there are some 3rd party services which can do some conversion for sharing but currently we do not see any solution. We will check if we can do anything from our side for such functionality and if it will be any changes - we will note you.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
3 July, 2022 09:27:57
Vinod
Topics: 1
Messages: 6
Thanks for reply,

One step closer

How can I open the [e2pdf-save Id="1"] in new tab instead of same page.
3 July, 2022 13:20:50
E2Pdf
Support
Topics: 7
Messages: 3330
Hi,

[e2pdf-save] shortcode by default doesn't output PDF URL - it just saves created PDF on your server side so we suppose you are using modified shortcode [e2pdf-save id="1" download="true"] or [e2pdf-download] shortcode or we misunderstand what you mean by "Opening PDF".

If you mean when you click on PDF URL generated via shortcode - it can be controlled by "inline" option. If not "inline" - it must offer to save PDF. If "inline" set - it must open PDF in new "tab". You can see example at: https://demo.e2pdf.com/wordpress/: "Download PDF" / "View PDF". "Value" can be set inside E2Pdf Template (screenshot attached) or by modifying shortcode as [e2pdf-download id="1" inline="true"]

We remain at your service.

We would really appreciate your feedback at WordPress.org!
4 July, 2022 06:32:03
Vinod
Topics: 1
Messages: 6
Hi,

After applying [e2pdf-download id="1"] shortcode it opens the jpg/pdf in separate new tab.

But after applying [e2pdf-view id="1"] shortcode, it opens the jpg in the same page/window in a frame and not in new separate tab.

I want to open [e2pdf-view id="1"] / jpg in new tab within frame (as it open in same page). So i can apply social sharing icons below certificate within that frame.
As by applying [e2pdf-download id="1"] shortcode it open jpg/image in new tab, where i can't give social icons.

Thanks..
4 July, 2022 07:05:27
E2Pdf
Support
Topics: 7
Messages: 3330
Hi,

[e2pdf-view] shortcode, depending on "format" settings, designed to: Insert PDF to Page or Insert Image to Page.

If you are trying to have "link" after form submission by which your user can click on it and it will open another page, which will contain that "image" / "pdf" generated - unfortunately there is no default functionality to accomplish this. It will require coding skills to accomplish the task as Forminator can't output created submissions on frontend.

In general you will need:

- To create custom page with WordPress PHP hooks which will handle $_GET requests.

- On that page you will need extract "Submission ID" or "Image" path generated by E2Pdf directly via $_GET. Depending on solution you decide to use.

- After identification of "Submission ID" you will need to generate "Image" via "do_shortcode" PHP function by designing shortcode with "dataset" attribute or you will need to extract "Image" path from $_GET request and output it on page. In both solutions you will need to keep attention on filtering $_GET requests to avoid disclosing any data or XSS vulnerabilities.

We remain at your service.
We would really appreciate your feedback at WordPress.org!
5 July, 2022 01:27:18
Vinod
Topics: 1
Messages: 6
Hi,

In the provided example: https://demo.e2pdf.com/wordpress/: "Download PDF" / "View PDF".
On clicking "View PDF" it opens in another page.

So, I want the same code written for "View PDF" ([e2pdf-view id="1"]) in the above example.
5 July, 2022 01:53:50
E2Pdf
Support
Topics: 7
Messages: 3330
Hi,

To make such behavior you need to set "Inline" option inside E2Pdf Template and "Format" must be set to PDF (Screenshot attached).

or you need to use shortcode with arguments as:

[e2pdf-download id="1" inline="true" format="pdf"]

* where "1" is your E2Pdf Template ID.

We remain at your service.
We would really appreciate your feedback at WordPress.org!