iTextSharp.LGPLv2.Core icon indicating copy to clipboard operation
iTextSharp.LGPLv2.Core copied to clipboard

Replacement for AddPageDictEntry

Open TimSirmovics opened this issue 4 years ago • 0 comments

Summary of the issue

With the official iTextSharp library (v5.5.13.2) I was using pdfWriter.AddPageDictEntry(PdfName.ROTATE, new PdfNumber(0)); to rotate a page and it's contents. This method is not available in iTextSharp.LGPLv2.Core - is there an equivalent?

Environment

iTextSharp.LGPLv2.Core version: 1.7.1
.NET Core SDK version: 3.1
IDE: Visual Studio 2019 16.2.10

Example code/Steps to reproduce:

using var outputStream = new MemoryStream();
var document = new Document(PageSize.A6.Rotate());
var pdfWriter = PdfWriter.GetInstance(document, outputStream);
document.Open();
pdfWriter.AddPageDictEntry(PdfName.Rotate, new PdfNumber(0)); // This no longer exists.
document.Close();

Output:

'PdfWriter' does not contain a definition for 'AddPageDictEntry' and no accessible extension method 'AddPageDictEntry' accepting a first argument of type 'PdfWriter' could be found.

TimSirmovics avatar Jun 28 '21 23:06 TimSirmovics