Print Page | Close Window

Quick PDF Fails after Publish

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3441
Printed Date: 03 May 24 at 11:20PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Quick PDF Fails after Publish
Posted By: jimmyx18
Subject: Quick PDF Fails after Publish
Date Posted: 28 Feb 17 at 3:51PM
I use Quick PDF to convert to PDF and to merge PDFs. While running my application from the compiler, everything works as expected. Once I publish my application and try to run it on a different machine, neither the convert nor the merge functions work. When I ask the application to report "LastErrorCode", it returns 0. I'll list some code below. Can you tell what I am doing wrong?

Imports MARSvIEW.DebenuPDFLibraryDLL0912

Public Class MARSvIEWFRM
    Private tempDocs As String = "C:\Scripts\tesmpDocs\"
    Private QP As PDFLibrary = New PDFLibrary("..\..\DebenuPDFLibraryDLL0912")
    Private LicenseKey = "xxxx"
    Private Result = QP.UnlockKey(LicenseKey)

    Function ConvTIF(ByVal tifName As String, ByVal justName As String) As Int16
        QP.AddImageFromFile(tempDocs + tifName, -1)
        Dim lWidth As Int32 = QP.ImageWidth()
        Dim lHeight As Int32 = QP.ImageHeight()
        While lWidth > 1404
            lWidth = lWidth / 2
            lHeight = lHeight / 2
        End While
        QP.SetPageDimensions(lWidth, lHeight)
        QP.DrawImage(0, lHeight, lWidth, lHeight)
        QP.SaveToFile(tempDocs + justName + ".pdf")
        ConvTIF = 0
    End Function

    Function JoinAllPDF() As Int16
        Dim PDFfiles = Directory.GetFiles(tempDocs, "*.PDF", SearchOption.TopDirectoryOnly)
        For Each filenm As String In PDFfiles
            QP.AddToFileList("FilesToMerge", filenm)
        Next
        QP.MergeFileList("FilesToMerge", tempDocs + "merged\" + "merged_" + AcctNumTXT.Text + "_file_list.pdf")
        Me.AxAcroPDF1.LoadFile(tempDocs + "merged\" + "merged_" + AcctNumTXT.Text + "_file_list.pdf")
        JoinAllPDF = 0
    End Function



Replies:
Posted By: jimmyx18
Date Posted: 28 Feb 17 at 7:07PM
I added in the code to verify if the license key passes or not. Once I did that, the license fails. So I'm a bit lost. I have a purchased license key that works fine in the compiler, but it fails when I use the PDF converter as part of an installed application on a remote machine. Any ideas?


Posted By: Ingo
Date Posted: 28 Feb 17 at 8:15PM
Hi Jimmy,

what type is the external system?
Is it a 32- or a 64-bit-system?
What type is the dll - 32- or 64 bit?
Where is the dll on the external system - in the system32- or the syswow64-path?

Cheers and welcome here,
Ingo



-------------
Cheers,
Ingo



Posted By: jimmyx18
Date Posted: 28 Feb 17 at 8:31PM
Thanks for the reply. I found out that the issue was that the dll was not being included when Visual Studio published my build. Once I manually copied the dll to the destination, everything started working.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk