Reputation: 2033
My requirement is the ability to create a pdf file from a dynamic web-page (asp / c#
). I need to have the ability to adjust the elements position (in the same way the one could use @media print
to adjust the styling of the page and I cannot use anything that needs to be installed client-side.
Has anyone come across anything which can resolve this dilemma?
Edit: A lot of the solutions I am finding involve initiating code to place every element on the page (add.paragraph("blah")
for example) but I need something which is more a snapshot of the page, but I can modify the positions of the elements and then save the pdf.
Upvotes: 2
Views: 1339
Reputation: 2146
I have found the free (Affero GPL) iText library to be very useful. I have never used it from C# but it claims to be possible.
Edit: Client side PDF generation
Since as other commentators have pointed out what you wish to print is located on the client side rather than the server side. Perhaps you should look into JavaScript based PDF libraries. For example (but not limited to) this
Upvotes: 1