Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.
Wed Apr 21, 2021 10:38 am
Hi, i have a licensed version of Spire.PDF v7.4.5 and i want to test if a page is blank.
I tryed 2 way but it return always false.
sample1:
- Code: Select all
Spire.License.LicenseProvider.SetLicenseKey("my key");
var pdfDoc = new Spire.Pdf.PdfDocument(Spire.Pdf.PdfConformanceLevel.None);
var pdfPage = pdfDoc.Pages.Add(Spire.Pdf.PdfPageSize.A4, new Spire.Pdf.Graphics.PdfMargins(0), Spire.Pdf.PdfPageRotateAngle.RotateAngle0, Spire.Pdf.PdfPageOrientation.Portrait);
var isBlank = pdfPage.IsBlank(); //<--- false !!!
sample2:
- Code: Select all
var filePath = @"c:\temp\out.pdf";
Spire.License.LicenseProvider.SetLicenseKey("my key");
var pdfDoc = new Spire.Pdf.PdfDocument(Spire.Pdf.PdfConformanceLevel.None);
var pdfPage = pdfDoc.Pages.Add(Spire.Pdf.PdfPageSize.A4, new Spire.Pdf.Graphics.PdfMargins(0), Spire.Pdf.PdfPageRotateAngle.RotateAngle0, Spire.Pdf.PdfPageOrientation.Portrait);
pdfDoc.SaveToFile(filePath);
pdfDoc.Close();
pdfDoc = new Spire.Pdf.PdfDocument(filePath);
isBlank = pdfDoc.Pages[0].IsBlank(); //<--- false !!!
what's wrong?
Thanks
-
cgamberini
-
- Posts: 1
- Joined: Mon Apr 19, 2021 2:48 pm
Thu Apr 22, 2021 9:49 am
Hello,
Thanks for your inquiry.
I did an initial test with Spire.PDF v7.4.5 and did reproduce your issue. I have logged it in our bug tracking system with the ticket SPIREPDF-4224. If there is any update, we will let you know. Apologize for the inconvenience caused.
Sincerely,
Brian
E-iceblue support team
-
Brian.Li
-
- Posts: 1271
- Joined: Mon Oct 19, 2020 3:04 am
Tue May 11, 2021 3:09 am
Hello,
Does this hotfix solve your issue? Could you please give us some feedback at your convenience?
Sincerely,
Brian
E-iceblue support team
-
Brian.Li
-
- Posts: 1271
- Joined: Mon Oct 19, 2020 3:04 am