Git Product home page Git Product logo

Comments (7)

ThomasHoevel avatar ThomasHoevel commented on September 22, 2024 1

In the beginning there was PDFsharp. Then there was a partial port to Xamarin which was partially ported to .NET Core giving PdfSharpCore.

Sometimes it is difficult to take bug fixes or improvements from PdfSharpCore back into PDFsharp.

The PR looks quite simple and if you create a PR against the current PDFsharp 6.1.0 Preview 1 it will be quite simple for us to make the changes. I cannot promise they will be included, but if they have no impact on speed then I think they will be used.

from pdfsharp.

erxbout avatar erxbout commented on September 22, 2024 1

Thank you very much for your fast response!

And PdfSharpCore is still maintained by empira or did ststeiger this on his own by copy not by fork?

As for the change PR: That should be created in this repository here or what do you mean by "PR against the current PDFsharp 6.1.0 Preview 1"?
Should this change just convert the int position to long position or should it use ulong position as I proposed? (because a Position should not get negative anyway?)

I would prepare a PR in the following days then :D

from pdfsharp.

erxbout avatar erxbout commented on September 22, 2024

Hi

May I ask for feedback on my PR and some help maybe?

from pdfsharp.

ThomasHoevel avatar ThomasHoevel commented on September 22, 2024

PdfSharpCore is not and was never maintained by empira.

Support for files larger 2 GiB will be included with the next preview of PDFsharp 6.1.0 coming this month or so.
Thanks for the inspirational PR. The current implementation is slightly different though.

from pdfsharp.

erxbout avatar erxbout commented on September 22, 2024
          The currently released 6.1 preview 2 now supports PDF files larger than 2 GB.

Originally posted by @StLange in #76 (comment)

I will test this in the following weeks and close the issue if everything is working as expected.
Thank you for your time, information and effort! :D

from pdfsharp.

erxbout avatar erxbout commented on September 22, 2024

Hi

Thank you again for your time and effort! The new package is now implemented and it seems to work now as expected!

Also nice to be mentioned indirectly in the docs, had a laugh reading that xD

Only thing that I am not sure about at the moment is the TODO comment on this line:

I tried opening the file with this mode and I at least got the metadata out of it..
Later I had to use PdfDocumentOpenMode.Import anyway as the other library we use still has the problem of big sized pdf..
PDFSharp returned an exception when trying to read the page into a new cached document with PdfDocumentOpenMode.InformationOnly..
That confuses me as it was not a "NotImplementedException" so I assume by now there is at least some implementation and the comment does not reflect that?
Would be nice to stream pages but I do not know how complicated that is and its not a necessity for me as I have enough RAM at hand.. But anyway thats another seperate issue for itself ;)

using var pdf = PdfReader.Open(_pathConverter.ConvertForLocalUsage(fileInfo.FullPath), PdfDocumentOpenMode.Import);
var pdfVersion = $"{pdf.Version / 10}.{pdf.Version % 10}";
var pdfSize = pdf.FileSize;
.
.
foreach (var page in pdf.Pages)
{
  using var cachePdfMemoryStream = new MemoryStream();
  using var cachePdf = new PdfDocument();
  cachePdf.AddPage(page);
  cachePdf.Save(cachePdfMemoryStream);
  .
  .

from pdfsharp.

erxbout avatar erxbout commented on September 22, 2024

My implementation works now with a little workaround

Thx for the help!

from pdfsharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.