question

AppDev-1530 avatar image
0 Votes"
AppDev-1530 asked YijingSun-MSFT commented

Is it possible to take a pdf or ms Word and make it a fillible view in mvc and map the Filliable fields to a backend databace such as SQL Server ??

So just to make it clear... I have a PDF or Word document that I want to make into a fillable form in an mvc view.
I would like the data that is typed in to the document's fields sent to the mvc controller so that is can be stored to the
back end database.

Is this even possible. Can you use a PDF / Word Document as a view in mvc, This would save lots of time vs having to make a mvc view with the bootstrap nonsense.
The form is really long and I personally don't want type all this stuff in a format it to fit in the razor view.

But I understand if this is not possible .

Thanks

dotnet-aspnet-mvcdotnet-aspnet-webpages
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AppDev-1530 ,
What's your meaning? Do you want to use PDF/Word as a container and then input something into it ? If you want to do this, as far as I think, it's impossible.

Best regards,
Yijing Sun

0 Votes 0 ·

Ok thanks. Yes I wanted the the Word Doc or PDF to act as my database frontend.

0 Votes 0 ·

Hi @AppDev-1530 ,
One way is that you design the style like PDF/Word in the page.This way may be need excellent page designers to help you. Another way is that may be you could use word editor just like CKEditor. You could input and then post to the server using ajax.

Best regards,
Yijing Sun

0 Votes 0 ·

1 Answer

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered

you can not use a PDF/Word doc as a view directly (though you can display in an iframe if supported by the browser).

You can download file of type PDF/WORD, then upload to the server and process.

If you use word, you could implement WEBDAV support (an http file protocol supported by word), so you could edit directly in word. On WEBDAV saves, you would inspect the word file to see if the form was filled in.

for either of these solutions, you need to pick a library that allows processing of PDF forms, or word files.

you can write a PDF viewer application, (this is companies like docusign did), that supports form entry. This is probably a much larger project.

but it would need to a pretty large form for these projects to less work.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.