Community

Convert PDF to TIF for secured images

Hello,

We are get the following error when we try to convert a PDF to TIFF. The PDF can be opened and viewed without a password but has security enabled for content copying. Currently we have a time-consuming manual workaround to open the pdf and reserve it as PDF again, which removes the security. Is there another way to bypass the security? 

The file TM00001.pdf  has access restrictions. ,  ,    at FREngine.IEngine.GetNumberOfPagesInImageFile(String ImageFilePath, IImagePasswordCallback PasswordCallback)

   at Datacap.Libraries.Convert.PdfFRE.ExtractTIFFsFromPDFEx(String filePath, Boolean useFastBinarization, Int32 jpegQuality, Int32 resolution, Int32 compressionBW, Int32 compressionColor, Int32 compressionGray, String extensionBW, String extensionColor, String extensionGray, Int32 convertMode, Int32 maxPagesForInMemProcess, String language, Boolean createLayout, Boolean reuseTextInSearchablePdf, String log, String saveDocument, String correctSkewMode)

10:33:34.261 (0) t:16A8 p:10AD670 System.Runtime.InteropServices.COMException (0x80004005): The file TM00001.pdf has access restrictions.

   at FREngine.IEngine.GetNumberOfPagesInImageFile(String ImageFilePath, IImagePasswordCallback PasswordCallback)

   at Datacap.Libraries.Convert.PdfFRE.ExtractTIFFsFromPDFEx(String filePath, Boolean useFastBinarization, Int32 jpegQuality, Int32 resolution, Int32 compressionBW, Int32 compressionColor, Int32 compressionGray, String extensionBW, String extensionColor, String extensionGray, Int32 convertMode, Int32 maxPagesForInMemProcess, String language, Boolean createLayout, Boolean reuseTextInSearchablePdf, String log, String saveDocument, String correctSkewMode)

10:33:34.261 (0) t:16A8 p:10AD670 PDF to TIF extraction complete.

10:33:34.261 (0) t:16A8 p:10AD670 Conversion exception encountered: The file TM00001.pdf pdf has access restrictions.

 

Thank you for your time.

 

0

Comments

1 comment

  • Avatar
    RuskinF

    Do you get an error when you use the WriteToFile() method?

    I convert the documents to any format using this function.

    Try converting the PDF to TIFF using the WriteToFile() function.

    I hope this helps!

    0

Please sign in to leave a comment.