printing to pdf not working

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
cramer
Posts: 32
Joined: Wed Mar 26, 2014 2:41 am

printing to pdf not working

Post by cramer » Thu Aug 13, 2015 8:55 pm

Hello,

I open an image.
Press the print button.
The dialog opens and I select pdf instead of printer.
Press the Print.

A new window opens up and nothing happens.

In chrome see

No data received
ERR_EMPTY_RESPONSE
Unable to load the webpage because the server sent no data.

In IE prompts to Open, Save, Save AS but nothing happens when choosing them.

Any ideas?

Thanks

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: printing to pdf not working

Post by Loïc » Fri Aug 14, 2015 5:44 pm

Hello,

This is working like a charm for me, using any browser.
Are you using the latest version? If yes, could you provide input image used and exact procedure to reproduce the problem?

With best regards,

Loïc

cramer
Posts: 32
Joined: Wed Mar 26, 2014 2:41 am

Re: printing to pdf not working

Post by cramer » Mon Aug 17, 2015 9:59 pm

Hello,

Running latest version of gdpicture 11.2.16
Visual Studio 2010 ASP.Net 4.0 web site

Steps to reproduce using attached file in zip file
1075C959-67E3-4DFD-AD01-1E35E4EFA7B4_002.zip
(3.23 KiB) Downloaded 310 times
Load image using javascript call

function loadDocument(doc)
{
if (doc) { DocuViewareAPI.PostCustomServerAction('DocuVieware1', true, 'load', decodeURIComponent(doc), null, null); }
}

vb code:
Private Function LoadDocument(viewer As GdPicture11.WEB.DocuVieware, path As String) As Boolean
Dim returnValue As Boolean = False
If path <> "" Then
path = HttpUtility.UrlDecode(path)
If IO.File.Exists(path) = False Then path = Server.MapPath("~/images/404.png")
returnValue = (viewer.LoadFromStream(New IO.FileStream(path, IO.FileMode.Open, IO.FileAccess.Read), True, IO.Path.GetFileName(path)) = GdPicture11.GdPictureStatus.OK)
End If
Return returnValue
End Function

Private Sub DocuVieware1_CustomAction(sender As Object, e As GdPicture11.WEB.CustomActionEventArgs) Handles DocuVieware1.CustomAction
If Me.LoadDocument(e.docuVieware, e.args.ToString) = False Then
e.docuVieware.Close()
If e.args.ToString <> "" Then
e.message = New GdPicture11.WEB.DocuViewareMessage("Could not access/display the file " & IO.Path.GetFileName(e.args.ToString), icon:=GdPicture11.WEB.DocuViewareMessageIcon.Warning)
Else
e.message = New GdPicture11.WEB.DocuViewareMessage("No file specified.", icon:=GdPicture11.WEB.DocuViewareMessageIcon.Error)
End If
End If
End Sub

Once image is opened call to print via javascript

function print()
{
DocuViewareAPI.Print('DocuVieware1');
}

dialog pops up

Print Dialog
Destination: PDF document
Content to print: Document and annotations
Active page: selected

Press PRINT

IN IE 11.0.9 a new window is opened and prompted to Open, Save or Save As.
Open does nothing...
Save/Save As prompts to save to a location and then nothing happens.

Thanks.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: printing to pdf not working

Post by Loïc » Tue Aug 18, 2015 10:15 am

Hello,

This is perfectly working for me. Have you tried on another computer?

Have you tried from docuvieware-demo? (open the file from using the open button then print).
see: http://www.docuvieware-demo.com/standal ... _demo.aspx

My guess is that a security policy is blocking file transfer.

Kind regards,

Loïc

cramer
Posts: 32
Joined: Wed Mar 26, 2014 2:41 am

Re: printing to pdf not working

Post by cramer » Wed Aug 19, 2015 12:24 am

Hello,

Using the demo you linked in chrome it works.
Using the same demo and file it does not work in IE.

Any ideas what settings I may check in IE?

Thanks.

cramer
Posts: 32
Joined: Wed Mar 26, 2014 2:41 am

Re: printing to pdf not working

Post by cramer » Thu Aug 27, 2015 7:48 pm

Anything...?

Romain
Posts: 15
Joined: Wed Jun 03, 2015 4:12 pm

Re: printing to pdf not working

Post by Romain » Tue Sep 01, 2015 1:48 pm

Hello,

That's a curious issue ....
Maybe stupid idea but have you a default PDF viewer installed on your computer, like Acrobat Reader ? If yes, is it the default program for opening .PDF files ?
Chrome has his own PDF viewer, so when we open a PDF, it use it. IE does'nt have one and so try to open default program ...
Otherwise, as Loic says, maybe it is a security policy, have you check your IE security option ? We use Medium-high level.
Other question, when you print as pdf, save, IE prompt a message with "open", "open folder", "view downloads". Do you have it ? If you click on "open folder", can you see the pdf file ?

cramer
Posts: 32
Joined: Wed Mar 26, 2014 2:41 am

Re: printing to pdf not working

Post by cramer » Tue Sep 01, 2015 4:53 pm

Hello,

Yes adobe reader is installed and default app.
In IE, version 11.0.9, I get prompted with Open, Save Save As dialog.
And is set at Medium High security...

Romain
Posts: 15
Joined: Wed Jun 03, 2015 4:12 pm

Re: printing to pdf not working

Post by Romain » Tue Sep 01, 2015 5:06 pm

And when you click on save, nothing append at all ? no prompt after ?
If you use Developper Tools before (by using F12), does the console show something ?

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest