Problem while converting secured PDF to images using VB.net

Hi,

I am converting PDF to Image using Aspose.Pdf licensed version. Before I go ahead, I would like to give a heads up that the aspose (.dll) I use in my project is age old. I am not sure where to check the version but in code it reads “Assembly aspose.pdf.kit version 4.7.0.0”. Unfortunately, I have to go through loads of approvals to get it updated, which I cannot afford to right now.

In most cases, I wasn’t able to find properties as most of them are obsolete.

I am able to convert each of the pdf pages to images. But when the pdf is a secured one, I am still able to convert them to jpg images but when the pdf has an image superimposed on it, the converted jpg highlights the superimposed image in green color. Unfortunately, I cannot share screenshots coz of compliance and security concerns but if this is an existing issue, if someone can guide me to a solution, it would be great.

@Adithya_Mani

Thanks for contacting support.

Please note that some issues are used to be document specific and are resolved for those specific files. Furthermore, it is always recommended to use latest version as it contain more enhancements and performance improvements. Along with that, support is also provided on the basis of latest version.

Regretfully, you are using quite older version of the API and a lot of changes have been made to the API since the version you are using. We cannot say for sure about the issue unless we test it with latest version of the API in our environment. You may please try using latest version and in case you still face any issue, please share your sample PDF document in a private message (if they cannot be shared publicly). We will surely proceed further to assist you.

Hi,

This is not document specific. It happens for all the docs with encryption turned on. Can you help me with a code snippet to decrypt a document without using document class? The version I use doesn’t have that. We are using an aspose version 4. We are able to set privileges but cannot remove them for some reason.

@Adithya_Mani

We are afraid that all old references of the API have been replaced with new one and we may not be able to provide code snippet supported in version 4 that you are using. However, we will still try to look into it. Would you please share a sample code snippet that you are using to set privileges. We will surely see what we can offer to assist you further.

Okay, let me share the gist of the code with you. Before that, I have couple of doubts. Firstly, is it possible to convert a pdf to image when the pdf is encrypted? will there be any issues there? secondly, In my case, i am able to convert the contents of pdf to individual images but the images embedded inside the pdf is causing an issue.

please find the code below

dim obj as new objectconverter()
obj.bindpdf(pdf)
obj.doconvert()
if obj.pagecount>1
initalise integer variable num
while obj.hasnextimage()
obj.getNextimage(pdf file name,system.drawing.imaging.imagingformat.jpeg)
num++
end while
obj.close

please look into this and reply at the earliest.

@Adithya_Mani

While loading an encrypted PDF file, you need to provide its password as well. However, please share a sample PDF document as well so that we can test the scenario in our environment and address it accordingly.