Question

I have a SQL Server table where one of the fields contains an encrypted PDF and another field contains a key. Is there any way in FME to read it, decrypt it and write it out to the file system as a PDF document?

  • 7 February 2020
  • 3 replies
  • 9 views

Badge +1

Encrypted PDF field in SQL Server table


3 replies

Badge +1
inspectionpdfinspectionreport_key%PDF-1.3

 

%âãÏÓ

 

1 0 obj

 

<<

 

/Type /Catalog

 

/Pages 2 0 R

 

/PageMode /UseNone

 

/ViewerPreferences <<

 

/FitWindow true

 

/PageLayout /SinglePage

 

/NonFullScreenPageMode /UseNone

 

>>

 

>>

 

endobj

 

5 0 obj

 

<<

 

/Length 1993

 

/Filter [ /FlateDecode ]

 

>>

 

stream

 

xœ­XIsÛ¸¾ëWôᔪ�"¸Ó7Y¦m½’,�(gy•

 

CÂ6'¡!©8þ÷Ó

 

€µ8“©¼rY

 

ÑøðõÞ

 

ÿþ ‘

 

ÙF~µ z¨Ë›

 

ÁðÌÀ/ðÁ<Ë âƒ�ƒr`™®Ò«+_¡Î¤¸Ù¦–gži“øãÀ†ÿ¼ _66A71608F3376

 

 

 

 

Userlevel 3
Badge +17

Hi @dave29

Our development team has mentioned it may be possible to use an AttributeFileWriter (to write the PDF blob to disk) and then read the file using the PDF reader with the password parameter if the PDF is simply password-protected. Would you be able to try this approach?

Userlevel 2
Badge +16

If you can create a SQL statement to write the PDF to disk (and I think a SQL procedure to retrieve the file is available), you could use the SQLCreator or SQLExecutor transformers to do so.

Then follow by a FeatureReader to read the PDF in FME and continue the process.

Hope this helps.

Reply