Git Product home page Git Product logo

pdfsharpcore's People

Contributors

akgulebubekir avatar cvdsoftware avatar fmmhaberl avatar groege avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdfsharpcore's Issues

Adding Image cause an System.NullReferenceException

When ever I try to add a Image my program always crash.
There is no difference if I use ImageSource or XImage and also if I use FromBinary,FromFile or FromStream. Everytime I get (nearly) the same Exception.
Object reference not set to an instance of an object.
In case of using ImageSource.FromBinary the next line is:

at MigraDocCore.DocumentObjectModel.MigraDoc.DocumentObjectModel.Shapes.ImageSource.FromBinary(String name, Func1 imageSource, Nullable1 quality)

Before opening the file I check if the file is existing with System.IO.File.Exists;
Im using .Net Core 2.0, with Visual Studio Community on Mac OS.

Upgrade to latest ImageSharp library?

Would it make sense to upgrade to the latest ImageSharp library (and make it a dependency on the NuGet package instead)? It seems that there's been a lot of improvements/changes at SixLabors/ImageSharp.

Crash: PdfSharp.Xamarin.Forms already initialized before

I use PDFSharp.Xamarin.Forms in my app (Android and iOS). I initiated the package in MainActiviy.cs:

x7ug5kh1mlzj

This works in general, but sometimes I get a strange error which causes my app to crash:

System.InvalidOperationException: PdfSharp.Xamarin.Forms already initialized before.

This happens at random during the use of my app.

Null Reference exception when Encrypting a PDF document

PfdSharpCore throws a SystemNullReferenceException when I try to render a document that has had encryption enabled via the PdfSecuritySettings.DocumentSecurityLevel setting.

Stack trace points at
PdfSharpCore.Pdf.Security.PdfStandardSecurityHandler.ComputeOwnerKey(Byte[] userPad, Byte[] ownerPad, Boolean strongEncryption) for 128 bit encryption, and
PdfSharpCore.Pdf.Security.PdfStandardSecurityHandler.PrepareRC4Key(Byte[] key, Int32 offset, Int32 length) for 40 bit encryption (1 level deeper).

Project is a UWP application targeting Windows 10.

Is there any pre-configuration that is required (similar to Fonts) for document encryption, or is this an issue that merits investigation?

Thanks.

PdfReader.Open bug

Tried to open a pdf document (template) to write on, however, by giving it the string path, it returns null - testpdf returns 0.

Using a filestream, testpdf gives 15 (version 1.5 of pdf, I assume) hover opening it with a filestream gives Unable to cast object of type 'PdfSharpCore.Pdf.PdfInteger' to type 'System.IConvertible'.

I really would like to write on a template pdf :)

Adding Image throws System.AggregateException

Apologies as this is most likely because I can't figure out how to implement it properly.

In a migradoc table, attempting to add an image:

row.Cells[13].AddImage("image-name.png");
// cannot convert from string to IImageSource

and

ImageSource.ImageSourceImpl = new UwpImageSource(); // Is this what you meant??
IImageSource img = ImageSource.FromFile("image-name.png");
row.Cells[13].AddImage(img);
// throws error System.AggregateException

Otherwise your port has been extremely useful to me and I am able to create very complex documents. Thank you for sharing!

Font baseline misaligned?

I think the FontResolver-stuff creates some lining issues for text in paragraphs in table cells.

What I get using your assemblies (VerticalAlignment.Top, then .Bottom, then .Center) -
Take a close look on the letter "g":

image

What I get using the same document creation code using original MigraDoc/PdfSharp (without FontResolver ofc):

image

Is this an issue I can fix on my side or is there generally some issue with the IFontResolver?

Conversion from HTML to pdf

I want to convert html to pdf. How to acheive it with this library.
PdfGenerator class from PdfSharp seems to be missing.

Getting error while generating PDF

I am working on PdfSharp.Xamarin.Forms but I could not find issue for this repository so please help me figure it out what is the issue?

untitled

Filling comb text field

Hello, we are trying to use PdfSharp to fill a pdf document. It's working fine except when we need to fill comb type field.
When we fill them, they appear wrongly, each character are next to another like if it wasn't a comb field. Like in this image
before clicking

When we click on the field it appear the right way :
after clicking

From what I found during my search, you need to specifiy the right value for the property "/Ff" for a field to be a comb. This value is correctly fill on our field. Here are all its properties :
field value.

And here is how we fill the field with our text :

(pdfDocument.AcroForm.Fields["D1A_naissance"] as PdfTextField).Text = "10061939";

I'm realy lost, any help would be usefull !

Error for run

I download the zip, and I try to the run in VS 2017. But it's to saw

image
image

What is the correct way to place a picture.

I use the current PDFSharpCore from Nuget on Monodevelop targeting dotnet core 2.1.
My question is how to place a picture in the pdf.
Current way based on PDFSharp is:

DrawImage(graph, "whatever.gif", 730, 30, 72, 36);   

public static void DrawImage(XGraphics gfx, string jpegSamplePath, int x, int y, int width, int height)
{
            XImage image = XImage.FromFile(jpegSamplePath);
            gfx.DrawImage(image, x, y, width, height);
 }

How is this done in PDFSharpCore?

install PDFSharp.Xamarin.Forms

How to install PDFSharp.Xamarin.Forms library in my xamarin.forms 3.1 (.net standard 2.0) project. I dont found any nuget link....

Android: NullReferenceException @ Image.AsJpeg() / Document.Save()

Saving a View with Images is not working on Android

myDocument.Save() -> exception
myImage.AsJpeg() -> exception
myImage.AsBitmap() -> works

PDFsharp 1.50.5147
PdfSharp.Xamarin.Forms 1.0.0

System.NullReferenceException: Object reference not set to an instance of an object. at PdfSharp.Xamarin.Forms.Droid.AndroidImageSourceImpl.SaveAsJpeg (System.IO.MemoryStream ms) [0x00045] in E:\My Xamarin plugin\PdfSharp.Xamarin.Forms\PdfSharp.Xamarin.Forms\PdfSharp.Xamarin.Forms.Android\AndroidImageSourceImpl.cs:111 at PdfSharpCore.Drawing.XImage.AsJpeg () [0x00006] in <11413e5833e04920b85b1578e479c930>:0

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.