PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: attachment embeding taking time
   PostPosted: 27 Jul 2019, 18:24 
Hi
we have migrated to pdf from word (docx4j) recently. we read attachment strea from DB and embed as files. this was faster(even if 50 mb files were there) in generating word using docx4j where we embed files as OLE objects.
we are using ped4ml:attachment tags and embeding base 64 stream inside tag as part of ou HTML for file embedding. however it is taking so much time to generated PDF if file size exceeds 1 MB. wanted to check why is it taking more time and is there any better way to handle this timing problem. if we have attachments of 50 MB side, its nearly taking 10+ minutes to generate PDF.

the other alternatives tried
tried to generate a zip file with all attachments and generated PDF file. while generating PDF we usedpd4lattachment with src as file name. so that when we open pdf clicking on file will searchin same folder. But this is giving index out of range -1 exception . our understanding was we specify src with file name. at run time, if we have zip of all attachments PDF can look in same folder.

appreciate your support soon


  Subject: Re: attachment embeding taking time
   PostPosted: 29 Jul 2019, 13:00 
Please raise a support request by emailing support pd4ml com. We need to investigate


  Subject: Re: attachment embeding taking time
   PostPosted: 30 Jul 2019, 03:49 
we are using this from a tool.pdml is coming as part of tool. could you please hel me with how to use d4ml:attachment w.r.t better performence. at this point we may not be able to rase a support request. if this topic neds to be moved to other forum category pls do the needful


  Subject: Re: attachment embeding taking time
   PostPosted: 30 Jul 2019, 10:19 
If you can produce a PDF with the attachment (but it takes too long), you obviously use the feature correctly. But as far as I know we did not test it on huge files, so we are going to do that and optimize the flow.

On the other hand if you apply permissions or a password to the resulting PDF, it encrypts all data blocks (including the attachment bytes) - and encrypting of 50MB data is a time and resource consuming task for Java, we have only limited possibilities to optimize.


  Subject: Re: attachment embeding taking time
   PostPosted: 11 Aug 2019, 07:26 
we are not encrypting file


  Subject: Re: attachment embeding taking time
   PostPosted: 11 Aug 2019, 07:28 
is there any other alternatives to embed file content so it may takes less time for generation


  Subject: Re: attachment embeding taking time
   PostPosted: 12 Aug 2019, 10:27 
In the meantime we run tests with bulky attachments. There is no obvious performance issues detected. With 30MB attachment it takes 754ms to produce a PDF. With an encryption of the PDF it takes 1175ms.

Do you override max heap size of JVM, by running PD4ML (e.g. with -Xmx512m command line param)?


  Subject: Re: attachment embeding taking time
   PostPosted: 22 Aug 2019, 05:14 
We read the file streams from db and form pd4ml:ttachment tag with file stream in it. After having logging we found that reading from db does nkt take much time but pd4ml render (with our html) is taking huge time in minutes. Can u pls paste me the code you tried . And is there any version difference for your sample working better


  Subject: Re: attachment embeding taking time
   PostPosted: 22 Aug 2019, 05:15 
We read the file streams from db and form pd4ml:ttachment tag with file stream in it. After having logging we found that reading from db does nkt take much time but pd4ml render (with our html) is taking huge time in minutes. Can u pls paste me the code you tried . And is there any version difference for your sample working better


  Subject: Re: attachment embeding taking time
   PostPosted: 22 Aug 2019, 12:40 
There is nothing special in our test case:
<html>
<body>
<pd4ml:attachment type="paperclip" description="a" src="MINGLIUB_0.ttf"/>
</body>
</html>


The HTML converted with the minimum of API calls. But Java is called with -Xmx912m command-line parameter to override possibly small default heap size.



[Reply]     [ 13 posts ]  Go to page 1, 2  Next

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share