đŸ’„ [PLUGIN RELEASE] Advanced Export to PDF: Whole Page / Single Element

Hi @rpetribu ,
Most probably you are facing CORS issue.

Did you try to set the “Use proxy” field to “yes”?

1 Like

I love you.
Worked!

1 Like

HACK TO HIGH RESOLUTION

Hi Guys.

I discovered a way to generate high resolution PDFs. Don’t know if everybody know this “hack”, but I decided to share it here so others may use it if wished.

As you all may noticed, the generated PDF is sort of a “print” of the element we are trying to transform in PDF, saved as image and attached (or transformed, don’t know) in the final PDF. So, bigger elements will generate bigger images that, when compressed, will generate better quality PDFs.

Imagine that you need to generate a proposal in PDF, with lot of information, graphics and images


  1. Show the proposal to your users inside a regular-sized group. Illustrating the final result of the document they are about to download as PDF, so them can read everything before generate the file


  2. And hidden below a giant white shape, place a giant version of this same group. With the proposal formatted with giant fonts, giant images and every other element. Just duplicate everything. Make it bigger! Maintain the proportions!

  3. Finally, when you wish to generate the file, point it to this giant group instead the regular one.

This is the footer of my PDF with a zoom of 200%

2 Likes

Thank you @rpetribu for sharing this!!
I’m sure it will be very helpful for a lot of people!

1 Like

Hey Sarah. I appreciate the input. So the idea would be:

  1. Set 2 elements groups. One group to render on desktop, one group to render on mobile.

  2. Set a rule for each group to be visible/hidden depending on the screen size

  3. Workflow edits of some sorts?? How do I prevent both mobile & desktop elements to be generated at the same time?

  4. Rendered PDF

®Regarding quality: it’s a good remark but i’m not sure how much it would impact my application. There aren’t any pictures. Only text.

Yes, the way is good.

1. Workflow edits of some sorts?? How do I prevent both mobile & desktop elements to be generated at the same time?

Simply by adding two pdf elements on the page (one in the group for mobile, the other one on desktop). In the same WF, you have two same actions, each one with its element id (don’t forget to enable html id in settings), and with a condition (if group is visible by example)

but frankly, if there’s just text, prefer to use pdf conjurer, this is my advice

2 Likes

@BubbleSam Hi Sam :smiley:

I’ve just purchased a license and everything is worry fine - however, I want to generate a pdf from a repeating group that is set up on another page as I’ve been using SelectedPDF before I discovered yours. Is there a way I can trigger the PDF generation from another page without having to navigate to it?
Cheers,
Peter

Hi @peter11 !

Unfortunately, this is not possible because this plugin uses client-side PDF generation. So you can only export the content that currently present on the page

Thx for replying :slight_smile: I found a solution using it on the page

1 Like

Hi, I am trying to download the whole page content with .main-page selector and the following error appears in the console and the file doesn’t download at all.
The problem occurs for other selectors too. For one id it can work, for anther not. The img selector also work, but everything is black. Can you please help me understand if this is a problem from my side or not?
Thank you.


image_2021-07-02_115659

Hi @olaf ,
Sorry to hear that. First of all, could you please try to enable proxy and see if it will resolve the issue (at least black images)? :

@BubbleSam thank you, I tried to enable it and without success.
But I also tried to download on a different page. I thought maybe the page settings are different and copied the elements from the main page to the test page and it also didn’t work. Maybe this is due to some elements that are not supported?

Hi @BubbleSam I was able to detect the problems:

  1. The plugin doesn’t support .svg format
  2. The convert action needs a delay in order to let all the page content to be rendered.

Thank you for your support.

Thank you for your feedback!

I’m going to check the .svg format issue. If you can provide a simple demo to reproduce the problem, it will be even better because I know that this plugin in used in some projects to convert svg to pdf.

Regarding the convert action, plugin shares the progress state which indicates current progress percentage that you can show to the application user if need.

@BubbleSam when there is a svg. image in the group you want to convert, this error appears and the conversion is stopped.

image

Hi @olaf ,

Are you using an external .svg file (e.g. <img src="https://****.svg">) or svg graphics (e.g. <svg> tag) in your app?

In the first case you should be able to export it with enabled proxy settings.

In the second case, this looks to be a bug in the internal library this plugin uses. This topic can be very useful to fix it.

I’ve just made an additional test and it works for svg:

1 Like

Hello,
I have a RG that is a Invoice style.
I would like to print this as a PDF, I tried this plugin, but I can’t select the whole element.
Is that possible with this plugin?
Thank you!

Hi @d.dominguezribeiro ,

Sure, you can export a Repeating Group.
Do you have a demo page / app so we can help you?

Hi, is there a way to export to PDF the #table element in the demo page without it being cut, I mean, with all the information that appears when you scroll it down?

Hi @pachocastillosr ,

Thank you for your question. PDF export works exactly like a simple print. It exports the visible data on the page. Since the table is a scrollable element, it can’t export the “hidden” part of the table