pdf-generator icon indicating copy to clipboard operation
pdf-generator copied to clipboard

Limite para geração do arquivo pdf

Open anapaulaweiss opened this issue 4 years ago • 7 comments

dependendo o tamanho do html ao tentar gerar para pdf o plugin aborta o aplicativo, 160kb já aborta.

anapaulaweiss avatar May 11 '20 18:05 anapaulaweiss

Hi @anapaulaweiss,

For what I can understand the plugin is basically crashing for content above 160KB. Unfortunately I cannot reproduce this error. I wrote this project example that maybe can provide you with some guidance, here is quick demo:

ezgif com-video-to-gif

As you can see in those two example the plugin is able to convert HTML content of considerable size.

cesarvr avatar May 11 '20 20:05 cesarvr

qual tamanho aproximado desse html do seu exemplo?

anapaulaweiss avatar May 11 '20 20:05 anapaulaweiss

default.pdf my-pdf.pdf First one is 870KB The Second one is 4.9 MB

cesarvr avatar May 11 '20 21:05 cesarvr

realmente, fiz um teste aqui, e são 160kb só do texto html, mas possui muitas imagens e acaba passando de 7MB, nesse caso qual seria a sugestão para esses arquivos com muitas imagens e que acabam ficando muito grande?

anapaulaweiss avatar May 12 '20 13:05 anapaulaweiss

Sorry I don't speak Portuguese, but google translator tells me that you are asking something about: "We can assume the PDF files are that big because of the images" -- the answer will be yes, the PDF file acts as a container (or zip file) that encompass all kind of assets such as words, images, videos, etc.

Also if is crashing can you share the error message and platform you are using ? That would be helpful.

Cheers

cesarvr avatar May 13 '20 08:05 cesarvr

of course, sorry. Would you have a solution that you would recommend for this type of larger file?

anapaulaweiss avatar May 13 '20 11:05 anapaulaweiss

there is no error, just abort the application, I realized that for some cell phones with the same file size it did not abort the application and for another yes, it seems to be related to the memory of the cell

anapaulaweiss avatar Sep 01 '20 13:09 anapaulaweiss