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.

Thu Mar 19, 2015 11:05 am

I receive a group of a given number of PDF files from diferent office centers and we must print the pdf files without open the documents.

In some cases when PDF document is Loaded and sent to print the result is a blank Page in the printer.
This is not a radom problem , its a problem that occurs with specific PDF files.

The documents normaly are Scannings sent directly to PDF files.

Code: Select all
  Me.clsSpireDocPDF.LoadFromFile(sDocumento)
  Using clsSpireDocPDF
     With clsSpireDocPDF.PrintDocument
               .PrinterSettings.PrinterName = Me.clsImpressao.sNomeImpressora
                .PrintController = New System.Drawing.Printing.StandardPrintController
                .Print()
     End With


Library Version Used : Spire.Pdf.dll 3.2.52.56040

txs for your help

marrecus
 
Posts: 2
Joined: Thu Aug 28, 2014 9:05 am

Fri Mar 20, 2015 6:15 am

Hello,

Thanks for your inquiry.
In order to reproduce your issue of printing blank page, please provide your sample document here for our testing, or you can send it to support@e-iceblue.com.

Best Regards,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Fri Mar 20, 2015 9:08 am

Dear Betsy

Sent the sample by email.
txs for your Attention


Best Regards
Luis Ferreira

marrecus
 
Posts: 2
Joined: Thu Aug 28, 2014 9:05 am

Thu Apr 02, 2015 8:09 am

Hello,

Sorry for long silence.
Now the issue has been resolved, and the newest hotfix of Spire.Pdf has been released. Please download the Spire. PDF Pack(Hot Fix) version:3.2.165 from the following link and have a try:
http://www.e-iceblue.com/Download/downl ... t-now.html
If there are any questions, welcome to get it back to us.

Best Regards,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Wed May 20, 2015 7:34 am

Hello,

I would like to use your library and I tested it to print some pdf and a blank page was printed.
I tried with the hot fix 3.2.165 or with the new version 3.4 but the result was the same.
I attached a sample that you can reproduce and test by yoursel

Thanks for your reply

Regards

Jeremy

jdalary
 
Posts: 2
Joined: Thu Apr 02, 2015 7:34 am

Wed May 20, 2015 8:29 am

Hello,

Thanks for your inquiry. I have reproduced your issue, and posted it to our dev team. We will inform you when it is fixed.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Wed May 20, 2015 9:17 am

Thanks for your reply
So, I'm waiting for the fix.

Regards

jdalary
 
Posts: 2
Joined: Thu Apr 02, 2015 7:34 am

Tue Apr 04, 2017 5:26 pm

still waiting for the fix

kankun1234
 
Posts: 1
Joined: Fri Jan 27, 2017 6:35 pm

Wed Apr 05, 2017 1:46 am

Dear kankun1234,

Thanks for your inquiry.
The issue jdalary submitted already has been fixed in commercial version, we had informed him. For your issue, please try to use the latest Spire.PDF Pack Version:3.9, if it still persists, please provide us with your sample file for investigation.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Apr 13, 2017 2:06 am

I loaded spire pdf with nuget into visual studio 2015. I am trying to identify blank pages in a pdf with the following vb.net code.

Public Function FindBlankPagesSpire(strDocumentFile)
Dim document As New PdfDocument()
Dim fileToSave As String = strDocumentFile
document.LoadFromFile(fileToSave)
Dim i As Int16 = 0
For Each page As PdfPageBase In document.Pages

If page.IsBlank() Then
'BlankPage = True
Console.WriteLine("page number " & i + 1 & " is blank")
Else
Console.WriteLine("page number " & i + 1 & " is NOT blank")
End If
i = i + 1
Next
End Function


The code returns all pages as NOT blank when there are blank white pages in pdf. How do I fix this?

pilotFrankie
 
Posts: 1
Joined: Sat Aug 13, 2016 11:40 pm

Thu Apr 13, 2017 3:09 am

Dear pilotFrankie,

Thanks for your inquiry.
Please provide us with your sample file for testing.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Sep 15, 2017 3:45 am

I'm try printing pdf in c# by free spirepdf. But I always get a blank page and I don't known why. Could anyone help me.
This is my code :
Code: Select all
Spire.Pdf.PdfDocument pdf = new Spire.Pdf.PdfDocument();

            pdf.LoadFromFile(fileTemp);
            pdf.PageScaling = Spire.Pdf.PdfPrintPageScaling.ActualSize;
                       
            PaperSize ps = new PaperSize();
            ps.Height = 1620;
            ps.Width = 950;
            //var temp = pdf.Pages[0].Size.ToSize().Height;
            ps.RawKind = (int)PaperKind.Custom;

            pdf.PageSettings.Height = ps.Height;
            pdf.PageSettings.Width = ps.Width;
            pdf.PageSettings.Margins.All = 0;

            pdf.PrintDocument.DefaultPageSettings.PaperSize = ps;
            pdf.PrintDocument.DefaultPageSettings.Margins.Left = 0;
            pdf.PrintDocument.DefaultPageSettings.Margins.Top = 0;
            pdf.PrintDocument.DefaultPageSettings.Margins.Right = 0;
            pdf.PrintDocument.DefaultPageSettings.Margins.Bottom = 0;

            pdf.PrintDocument.DefaultPageSettings.PrinterSettings.DefaultPageSettings.PaperSize = ps;
            pdf.PrintDocument.DefaultPageSettings.PrinterSettings.DefaultPageSettings.Margins.Left = 0;
            pdf.PrintDocument.DefaultPageSettings.PrinterSettings.DefaultPageSettings.Margins.Top = 0;
            pdf.PrintDocument.DefaultPageSettings.PrinterSettings.DefaultPageSettings.Margins.Right = 0;
            pdf.PrintDocument.DefaultPageSettings.PrinterSettings.DefaultPageSettings.Margins.Bottom = 0;
           
            string printerName = string.Empty;
            if (!string.IsNullOrEmpty(printerName)) pdf.PrinterName = printerName;
           
            pdf.PrintDocument.Print();
            pdf.Close();

chinhdq
 
Posts: 1
Joined: Mon Jan 20, 2014 9:28 am

Fri Sep 15, 2017 6:09 am

Dear chinhdq,

Thanks for your inquiry.
I have tested the scenario with the latest Spire.PDF Pack(Hot Fix) Version:3.9.285. The result was not blank but I found a little issue that the background of images on page 2 changed from white to black. I have posted it to our Dev team and will let you know as soon as it is fixed.
Sorry for the inconvenience.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Oct 20, 2017 7:13 am

Dear chinhdq,

Thanks for waiting.
Now the background issue I mentioned has been resolved in Spire.PDF Pack(Hot Fix) Version:3.9.407.
Looking forward to your feedback.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Jun 19, 2019 2:08 am

Hello. I have install Spire.PDF by the NuGet from c# and also install the dll's from the Hot Pack and I'm no able to see the content of the pdf. The pdf still be at blank. Any idea?

jperson
 
Posts: 1
Joined: Tue Jun 18, 2019 3:01 pm

Return to Spire.PDF