Loading...

Printing Multipage PDF problems

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

Printing Multipage PDF problems

Postby absoffthewake » Tue Aug 07, 2007 6:14 pm

Hello there,

I'm having some major issues with printing PDF's. I've already spent at least 5 hours looking for a way to make this work, and am extremely frustrated. Basically, what I'm doing is initially loading the PDF at 72 dpi (PdfDpiRendering = 72). I'm doing this for speed.

Code: Select all
oGdViewer.PdfDpiRendering = 72
oGdViewer.DisplayFromPdfFile (Me.TxtFilepath)


If the user decides to print the PDF, it changes the dpi to 300, then reloads the image, then prints.

Code: Select all
oGdViewer.PdfDpiRendering = 300
oGdViewer.DisplayFromPdfFile (Me.TxtFilepath)
oGdViewer.PrintSetFromToPage 1, oGdViewer.NumPages
oGdViewer.PrintImage


The problem is, it does absolutely nothing relating to printing 95% of the time. It reloads the image no problem, but it seems like it skips the print command. When it does decide to print (usually the first time I send the print command), it prints at the 72 dpi, so the print quality is terrible. If I take out the reload code, it still does not work. If I take out the PrintSetFromToPage command, it prints every time, but obviously only prints the 1st page. The only way I have gotten it to work is with this code:

Code: Select all
For i = 1 To oGdViewer.NumPages
oGdViewer.DisplayFrame (i)
oGdViewer.PrintImage
Next i


The problem with this code is that it separates it into multiple print jobs, and cycles through the pages on the viewer, making it extremely slow & inefficient to print. Printing 50 pages takes 20 minutes on my 40 page per minute laser.

What am I doing wrong??
absoffthewake
 
Posts: 31
Joined: Wed Jul 18, 2007 11:58 pm

Postby Loïc » Wed Aug 08, 2007 11:41 am

What am I doing wrong??


Nothing, this behaviour was fixed into the last release.

Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby absoffthewake » Wed Aug 08, 2007 5:43 pm

works great now, thanks for your hard work!
absoffthewake
 
Posts: 31
Joined: Wed Jul 18, 2007 11:58 pm

Re: Printing Multipage PDF problems

Postby kenknight » Tue Jul 01, 2008 3:11 pm

Hi,

I just downloaded the latest version two nights ago and I'm encountering the same problems using almost identical code as above. Am I missing something or what? I am attempting to load and print multipage pdfs could range between 1 and 100 pages.

Any guidance would be greatly appreciated.

Cheers!
Ken
kenknight
 
Posts: 7
Joined: Tue Jul 01, 2008 6:18 am

Re: Printing Multipage PDF problems

Postby Loïc » Tue Jul 01, 2008 3:17 pm

Hi Ken,

What is the problem ?

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Printing Multipage PDF problems

Postby kenknight » Tue Jul 01, 2008 3:29 pm

Hi,

Terribly sorry about leaving that information out.

It only prints the first page.

Here's the code;

autPDF is object Automation "GdPicturePro5.GdViewer"
autPDF>>SetLicenseNumber("xxxxxxxxxxxxxxxxxxxxxxxxxxx")

autPDF>>DisplayFromPdfFile("c:\users\ken\desktop\WD12brochure.pdf")

nNumPages is int = autPDF>>PageCount
Trace(nNumPages)
autPDF>>PrintSetFromToPage(1,nNumPages)
autPDF>>PrintImage()

Thanks,
ken
kenknight
 
Posts: 7
Joined: Tue Jul 01, 2008 6:18 am

Re: Printing Multipage PDF problems

Postby Loïc » Tue Jul 01, 2008 3:38 pm

Hi,

Your problem probably come from your printer or something else...

Check your PDF has more one page, if yes, try with another multipage PDF.

Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Printing Multipage PDF problems

Postby kenknight » Tue Jul 01, 2008 3:54 pm

Hi,

Tried several different mult-page pdf's with same result.

Also, oddly enough, it is not printing at all anymore. I have run it through debug and I'm hitting the line of code and have also tried using the autPDF>>PrintImageDialog() which does show a dialog properly, but nothing ever hits the printer.

Any suggestions.

Thanks,
Ken
kenknight
 
Posts: 7
Joined: Tue Jul 01, 2008 6:18 am

Re: Printing Multipage PDF problems

Postby Loïc » Tue Jul 01, 2008 4:18 pm

Hi,

What you mean by "which does show a dialog properly"

What is the returned value of the PrintGetStat() method ? (call this method after the print process).

Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Printing Multipage PDF problems

Postby kenknight » Tue Jul 01, 2008 4:21 pm

Hi,

PrintGetStat() returns a 31

Also, it is returning the correct number of pages for the selected pdf.

Thanks,
Ken
kenknight
 
Posts: 7
Joined: Tue Jul 01, 2008 6:18 am

Re: Printing Multipage PDF problems

Postby Loïc » Tue Jul 01, 2008 6:07 pm

OK thanks,

Could you try now to download the last minor released ? http://www.gdpicture.com/download.php

What's append now ?

Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Printing Multipage PDF problems

Postby kenknight » Tue Jul 01, 2008 7:22 pm

Hi,

Still no print job and status returned is 8.

Again, the code I'm using is;

autPDF is object Automation "GdPicturePro5.GdViewer"
autPDF>>SetLicenseNumber("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

//autPDF>>DisplayFromPdfFile("c:\users\ken\desktop\WD12brochure.pdf")
autPDF>>DisplayFromPdfFile("c:\pb_reports\0408_215759903.pdf")
autPDF>>PrintGetActivePrinter()


nNumPages is int = autPDF>>PageCount
Trace(nNumPages)
autPDF>>PrintSetFromToPage(1,nNumPages)
autPDF>>PrintImage()
Trace(autPDF>>PrintGetStat())

Thanks
Ken
kenknight
 
Posts: 7
Joined: Tue Jul 01, 2008 6:18 am

Re: Printing Multipage PDF problems

Postby Loïc » Wed Jul 02, 2008 9:57 am

Hi,

this mean that you have not enought memory to rasterize a page of the PDF.

What is the value you are using for the PdfDpiRendering property ?


Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Printing Multipage PDF problems

Postby kenknight » Wed Jul 02, 2008 8:10 pm

Hi Loïc,

First.... U Da Man!

I explicitly set the pdf dpi to 150 and it is now working.

Thanks so much for your help.

Cheers!
ken
kenknight
 
Posts: 7
Joined: Tue Jul 01, 2008 6:18 am


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest