1341
Views
6
Comments
Binary Data To PDF
Question

Hi All,

I have some binary data in one of my database entity (Data from CK editor) . I want to write this data in pdf and to store it in server (i don't want to download it). I am using File.WriteBinary to write db content to file in server .

 I need to do the digital signature on this file and i am using ItextSharp for that , now when i am passing the binary data by reading the saved file from server and also directly from the db , i am getting [PDF header signature not found] error. I also tried to open the file manually but it says that the pdf is not valid.

The pdf signature is working fine with other pdf which are created by some other source.

Also when i am directly downloading the entity data using outsystems download control by passing content type as application\pdf it is working fine but i don't what to download it '.




Reagrds

-PJ-

2016-04-21 20-09-55
J.
 
MVP

how are you storing retrieving the binary-data?

by any chance a utf-8/utf-16 conversion issue?


so basically, the oml would be great to have more insight what you are doing...


2025-08-22 10-19-44
Pramod Jain
 
MVP

HI J,

Iam using a text editor TinyMCE  on which user is entering information text, image and other objects and i am storing this information in my oracle entity ,the column of the entity is blob type and i am not doing any conversion over data.

Finally when the process complete i have to generated a pdf from the stored data and add a digital signature to it.I am writing this data to pdf using WriteBinary from file extension but when i am trying to open this file it tell me the file is not valid or PDF header signature not found.

The current oml is very big and i cannot share it , i will try to create an example oml for you ,meanwhile you can also create same scenario and try to write an pdf from Binarydata stored in db entity.



Regards

-PJ-

2016-04-21 20-09-55
J.
 
MVP

well,

when you create a pdf without the signature, does it work then?

when you write does it actually contains data?



2025-08-22 10-19-44
Pramod Jain
 
MVP

No ..it even doesn't work without signature and yes it writes the binary data into file and shows the size also.

UserImage.jpg
chiranjit kar

Hi Pramod Jain...

Can you please help me out how you have achieved the above task as because I  have also same kind of requirement

2024-03-25 06-19-08
Harlin Setiadarma

How do you generate PDF from the blob?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.