ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Access to *.pdf was denied

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
aleatprog Posted - Nov 26 2024 : 14:11:13
Hi,

the following IEVision code (executed in a Windows Service application) creates a non empty but inaccessable PDF file with empty security properties:

mBmp := TIEMultiBitmap.create(SourcePath);
mBmp.CreateSearchablePDF(DestinationPath, 'PDF title', OCR_English_Language, ievOCRAuto, ievPDFImgFmt_AUTO, TessDataPath);
mBmp.Free;


Trying to open this PDF file causes the error message "Access to *.pdf was denied".
Does anybody got an idea why the created PDF file is inaccessable?

Ale
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Nov 28 2024 : 21:47:27
Hi Ale

Unfortunately, in that case I think you will have the same problem no matter what method you use to create the PDF.

Nigel
Xequte Software
www.imageen.com
aleatprog Posted - Nov 28 2024 : 04:46:25
Hi Nigel,

following my tests, the PDF file becomes accessable if the Windows service is executed by a Windows account and not the local system (standard setting). Probably, the PDF file produced by IEVision inherits the security rights from the service executor.
This would also explain why the helper method CreateSearchablePDF works correctly in VCLs executed by Windows users.

For network security issues, I prefer running a Windows service by the local system, thus I should find an alternative way to let IEVision create accessable PDF files with valid security settings. Unfortunately, also TIEVisionSearchablePDFGenerator creates inaccessable PDF files. Do you have any other alternative code examples for creating searchable PDF files with IEVision?

Ale
xequte Posted - Nov 27 2024 : 14:22:22
Hi Ale

I'm sorry, but I have no experience with Windows Services. Try and narrow down the issue (e.g. make it happen with just a standard TFileStream). That may give some direction.

Nigel
Xequte Software
www.imageen.com
aleatprog Posted - Nov 27 2024 : 05:05:56
Hi Nigel,

I'm using:

  • ImageEn v13.6.0
  • IEVision v8.1.4
  • Delphi 12.2 Patch 1 (v29.0.53571.9782)

Executing the code inside a VCL works correctly. How may I use it inside a Windows Service thread?

Ale
xequte Posted - Nov 26 2024 : 23:28:56
Hi Ale

I'm not seeing that here with a regular VCL application. What version of ImageEn, IEVision and Delphi are you using?

Nigel
Xequte Software
www.imageen.com