Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Tue Jun 28, 2022 6:33 pm

I am using the saveToFile(java.io.OutputStream stream, FileFormat fileFormat) method to generate a pdf in an OutputStream, but this method only allows to indicate that the type is a pdf. If I want to put security options on the pdf, such as encrypting it with a key, is it possible to do it? I only see the method saveToFile(java.lang.String fileName, ToPdfParameterList paramList) but it does not exist for OutputStream.
Thanks.

jmparada
 
Posts: 47
Joined: Wed May 25, 2022 7:50 am

Wed Jun 29, 2022 2:48 am

Hi,

Here is the method for this case. Please test it.

Code: Select all
doc.saveToStream(OutputStream stream, ToPdfParameterList paramList)
Sincerely,
Andy
E-iceblue support team
User avatar

Andy.Zhou
 
Posts: 483
Joined: Mon Mar 29, 2021 3:03 am

Wed Jun 29, 2022 8:33 am

ok, thanks

jmparada
 
Posts: 47
Joined: Wed May 25, 2022 7:50 am

Return to Spire.Doc

cron