Thanks for the pointers to create watermark pdf. I'm unable to find an
example for web, as all the samples are available for console
1. We donot want the generated pdf to be physically created in the
server (i.e we donot want to call PDFDoc.save("location"), rather we
want to read the bytes and render as pdf on the fly. Is it possible to
do that. If so, kindly provide us a sample for the same.
Most of PDFNet samples can also be used in web setting. In case you
would like to save the resulting document in memory you would simply
use the overloaded doc.Save() method.
byte buf = new byte;
int buf_sz = 1;
doc.Save(ref buf, ref buf_sz, SDFDoc.SaveOptions.e_remove_unused);
Dim buf(0) As Byte
Dim buf_sz As Integer = 1
doc.Save(buf, buf_sz, SDF.SDFDoc.SaveOptions.e_remove_unused)
byte buf = doc.save(SDFDoc.e_remove_unused, null);
const char* buf = 0;
doc.Save(buf, buf_sz, SDFDoc::e_remove_unused, NULL);
buffer = doc.Save(SDFDoc.e_remove_unused)
For a concrete sample project please see PDFDocMemory sample:
On Apr 11, 1:42 pm, Support <supp...@pdftron.com> wrote:
Q: We are evaluating TRON pdf tool, and i have the trial version
downloaded. We have a ecommerce website, where we need to watermark
some text to existing pdf and render them on the fly to our customers.
Our application is developed in ASP.Net and c#. Can you please help me
with sample program that:
1. Reads a pdf file from a physical folder.
2. Watermarks them with some text (for e.g for demo only)
3. Render the pdf on the fly.
I couldnt find examples for asp.net in your website or in the demo
samples. Please help.
A: You can use PDFNet SDK in ASP.NET to implement your requirements.
- As a starting point download (http://www.pdftron.com/pdfnet/
downloads.html) the appropriate version of PDFNet for .NET (for
the .NET version that you are targeting and the platform).
- Add a reference to PDFNet.DLL in your project solution.
- Copy & paste some of the sample code and tweak it to match your
The following samples are relevant to the task:
Uses pdftron.PDF.Stamper utility to stamp PDF pages with text,
images, or vector art.
Uses pdftron.PDF.PDFDraw to convert PDF pages to images.