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.

Tue Jul 05, 2022 7:58 pm

we are trying to see if the Spire.PDF tools will work for what we need
we worked out a few of the examples you had online with our environment super easy so thank you for the great demos and code
we are currently using the tools with an internal website
I have a PDF viewed via just a iFrame linking to the PDF but what I want to do it to create a viewer that will allow the user to delete the page they are viewing with a single button click
how would I do that?
do you have any examples of the viewer and a delete button?

colin.hart
 
Posts: 5
Joined: Wed Jun 29, 2022 8:52 pm

Wed Jul 06, 2022 10:59 am

Hello colin hart,

Thanks for you inquiry. According to your description, I wrote an example for you. You can refer to it to complete your requirements. If you have any further questions, just feel free to contact us.
Code: Select all
https://drive.google.com/file/d/1U3abaT3QJ1YeD4fq0ZYWHUvZrBHyjnlK/view?usp=sharing

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Wed Jul 06, 2022 8:12 pm

that is great, thanks for sending that
I have another issue with DLL's I think
I am getting the following error
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0433: The type 'Spire.License.LicenseProvider' exists in both 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\scanto\db1048e8\5a784085\assembly\dl3\6deca49f\004645a8_0d03d801\Spire.License.DLL' and 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\scanto\db1048e8\5a784085\assembly\dl3\ec9d41eb\0086dfa9_9f8fd801\Spire.Pdf.DLL'

Source Error:


Line 17: protected void Page_Load(object sender, EventArgs e)
Line 18: {
Line 19: Spire.License.LicenseProvider.SetLicenseFileName("license.elic.xml");
Line 20: this.PdfDocumentViewer1.LoadFromFile(@"1.pdf");
Line 21: if (!IsPostBack)

colin.hart
 
Posts: 5
Joined: Wed Jun 29, 2022 8:52 pm

Thu Jul 07, 2022 6:38 am

Hello colin hart,

Thanks for your message. According to your description, I think there is a conflict between the new version of the DLL and the old version of the DLL. Because in our new version, spire.license.dll has been removed and its functions have been transferred to spire.pdf.dll. I suggest you remove all DLLS from your project, then use NuGet to import the latest version of Spire.PdfViewer into your project. Welcome to ask again.

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Thu Jul 07, 2022 8:56 pm

if I remove the everything and install Spire.PDF from NuGet
I get this error
<%@ Register assembly="Spire.PdfViewer.Asp" namespace="Spire.PdfViewer.Asp" tagprefix="cc1" %>

then if I install Spire.PDFViewer
using Install-Package Spire.PDFViewer -Version 7.1.0


Install-Package : Failed to add reference. The package 'Spire.PDFViewer' tried to add a framework reference to
'Spire.PdfViewer.Forms' which was not found in the GAC. This is possibly a bug in the package. Please contact the
package owners for assistance.
Cannot find assembly 'Spire.PdfViewer.Forms'.
At line:1 char:2
+ Install-Package Spire.PDFViewer -Version 7.1.0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackage
Command


then if I reload the page after that, I get this error
Compiler Error Message: CS0433: The type 'Spire.License.LicenseProvider' exists in both 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\scanto\db1048e8\5a784085\assembly\dl3\6deca49f\004645a8_0d03d801\Spire.License.DLL' and 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\scanto\db1048e8\5a784085\assembly\dl3\ec9d41eb\0086dfa9_9f8fd801\Spire.Pdf.DLL'

what can I do to fix that?

colin.hart
 
Posts: 5
Joined: Wed Jun 29, 2022 8:52 pm

Fri Jul 08, 2022 6:13 am

Hello colin hart,

Thanks for your message. Have you run the project I sent to you? If not, you can run it directly. Your error only occurs in your project, right? You can refer to this tutorial (How to use Spire.PDFViewer for ASP.NEThttps://www.e-iceblue.com/Tutorials/Spire.PDFViewer/Spire.PDFViewer-Program-Guide/How-to-use-Spire.PDFViewer-for-ASP.NET.html) to check your testing steps, if there is still any issue, you can share your project with us for a further investigation. Looking forward to your reply.

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Mon Jul 11, 2022 8:38 am

Hello colin hart,

Thank you for sharing more information via email.
In your shared file, I found that you used spire.pdf.dll 8.7.2 and spire.pdfviewer.asp.dll 7.1.4, they are not from the same dlls folder. The spire.pdf.dll in the latest version (Spire.PDFViewer 7.1.0) should be version 8.1.4.
As for your project, please first remove the dependentAssemblies from your Web.config, as shown in the attached screenshot, then remove all current referenced Spire dlls, and then re-install Spire.PDFViewer 7.1.0 from Nuget. After you install successfully, you will find the dlls(spire.pdf.dll 8.1.4, spire.pdfviewer.asp.dll 7.1.4,spire.license.dll 1.4.0). If you still have any doubts, just feel free to contact.

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Wed Jul 13, 2022 7:04 am

Hello colin hart,

Could you please let us know how is your issue going? Thanks in advance for your feedback and time.

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Wed Jul 13, 2022 4:28 pm

thanks for all the help. We were able get most everything working perfectly.
the only thing we have that doesn't seem to work is the FIRST, NEXT, PREVIOUS and LAST buttons
I think you have a copy of our site, can you take a look and see what we are missing, I am not sure why those would't work just copying your example code to our project
thanks again for all the help

colin.hart
 
Posts: 5
Joined: Wed Jun 29, 2022 8:52 pm

Wed Jul 13, 2022 4:31 pm

one last thing I need to figure out is how I would have a PDF broken into pieces if the file size is greater then 9 megs
is there an easy way to do that?

colin.hart
 
Posts: 5
Joined: Wed Jun 29, 2022 8:52 pm

Thu Jul 14, 2022 7:09 am

Hello colin hart,

Thanks for your reply.
Since your previous site files didn't contain .csproj project file, I can not run them directly. To help further investigate your project issue, could you help to share your whole runnable project for reference? Thanks in advance.
Besides, our Spire.PDF supports splitting PDF file into multiple files, you can refer to this tutorial(Split PDF into Multiple PDF Files) to test, if there is still any issues, please also share your input PDF file with us for testing.

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Thu Jul 21, 2022 1:31 am

Hello colin hart,

Could you please let us know how is your issue going? Thanks in advance for your feedback and time.

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Return to Spire.PDF