rioka68: I’ve noticed that adding vertical text using timestamps results in much
larger files, while the same text added normally (ie non-rotated) does
not.
Hi Riccardo,
Thanks for your patience.
I have tested the scenario using Aspose.Pdf for .NET 7.2.0 where I have used the following code snippet to add the Watermark text over existing PDF file and as per my observations, the resultant PDF containing rotated watermark has similar size as compare to the output file containing normal(non-rotated) watermark text. Can you please share the code snippet which you are using, so that we can again test the scenario at our end.
[C#]
//open document<o:p></o:p>
Document pdfDocument = new Document("d:/pdftest/SVGConversion-test.pdf");
//create text stamp
TextStamp textStamp = new TextStamp("Sample Stamp");
//set whether stamp is background
textStamp.Background = true;
//set origin
textStamp.XIndent = 100;
textStamp.YIndent = 100;
//rotate stamp
textStamp.Rotate = Rotation.on90;
//set text properties
textStamp.TextState.Font = FontRepository.FindFont("Arial");
textStamp.TextState.FontSize = 14.0F;
textStamp.TextState.FontStyle = FontStyles.Bold;
textStamp.TextState.FontStyle = FontStyles.Italic;
textStamp.TextState.ForegroundColor =
System.Drawing.Color.Aqua;
//add stamp to particular page
pdfDocument.Pages[1].AddStamp(textStamp);
//save output document
pdfDocument.Save("d:/pdftest/Stampled_output_90Degree-Rotation.pdf");
rioka68: Is it
possible to combine the two approaches, ie using Aspose.Pdf.Generator.*
to add vertical text to an instance to Aspose.Pdf.Document?
Aspose.Pdf.Generator specifically provides the support for creating PDF documents from scratch. Whereas Aspose.Pdf.Document supports the feature to create as well as manipulate existing PDF documents. I am afraid Aspose.Pdf.Generator can not accept an object of Aspose.Pdf.Document and perform some operations on input document. Nevertheless, you may consider creating a PDF file using Aspose.Pdf.Generator, save the output in Stream object and then initialize Document object with the Stream object. In case of any related query, please feel free to contact.
rioka68: I As a
side note, I've seen lots of Operator.* classes which are almost
undocumented, except for obvious and trivial explanation or samples to handle images. Is there any
source code illustrating other usage?
We are working on creating sample against all Operator classes and as soon as we have some updates, we would be more than happy to update you with the status of correction. However at the moment, you can find a usage example of some of these classes over
Add Image in an Existing PDF File
We are sorry for your inconvenience.