ID

Uploaded

Status

Description

Work Items

Action

17488
by vukispasic
May 5, 2015
9:02 AM

Being evaluated

I added MeasureString methods to XTextFormatter class. This is useful when it is needed to determine size of resulting aligned text. Parameter rectangle from DrawString method is replaced in MeasureString method with target text width. If width is not supplied, width is double.MaxValue.

Download

17143
by Excelerator
Dec 31, 2014
1:30 PM

Being evaluated

A patch to AcroForms ButtonField routine GetNonOffValue().

Behaves the same as the old routine whenever the old routine would have succeeded. When the old routine would have returned a null (failure), it checks to see if the PdfItem for the AP Dictionary is a Reference, instead of a Dictionary, and if so, try to follow the reference chain for 1 level of indirection to find the AP Dictionary.

If it succeeds in getting a Dictionary via the Reference, it tries to find the "first non /Off" key in the dictionary, just like the old code did if the AP Dictionary was found directly as a Dictionary.

Handles the N "sub" Dictionary the same way as the AP Dictionary.

This fix allowed me to set the Checked value on some CheckBox fields produced by PDF Editor Pro for OS X, version

Download

16655
by chtay1
Jul 29, 2014
2:06 AM

Being evaluated

In conjunction with my previous patch it also seems it misses the first character of the stream also so here is a patch that should replace the method I previously patched again to read that first character. I've included all the changes again so this should replace the patch from 25/07/2014.

The version of ScanNextChar() in use does not read the first or the last character of the stream. This was causing me issues on reading some PDFs that ended in a command, e.g. ET. It would get the command as just E and finish which then threw an operator error as ET is not in the OpCodes.stringToOpCode dictionary.

If you are suffering from this issue you will likely have received a 'Unknown operator in PDF content stream' when trying to read a PDF file via traversing a CArray of elements.

There was also a bug in the code that looks up an operator from a name in that it tries to access the dictionary based on the operator name and cast to OpCode with an as and then check for null but the lookup in the dictionary will throw an expection not just return null so it should uses .ContainsKey as per method below. This is what showed up first that lead me to debug the root cause.

Also if the OperatorFromName does fail with unknown OpCode then with CreateOperator it would fail anyway as it immediately tries to use the returned COperator and if it's null it will fail. So I have added a return if it's null which will just throw away the operator essentially. You may want to consider other behaviour. I'm not sure if it's best to fail entirely or silently continue with that operator ignored.

Download

16644
by chtay1
Jul 24, 2014
11:15 PM

Being evaluated

The version of ScanNextChar() in use will not the read the last character of the stream. This was causing me issues on reading some PDFs that ended in a command, e.g. ET.
It would get the command as just E and finish which then threw an operator error as ET is not in the OpCodes.stringToOpCode dictionary.

If you are suffering from this issue you will likely have received a 'Unknown operator in PDF content stream' when trying to read a PDF file
via traversing a CArray of elements.

There was also a bug in the code that looks up an operator from a name in that it tries to access the dictionary based on the operator name and cast to
OpCode with an as and then check for null but the lookup in the dictionary will throw an expection not just return null so it should uses .ContainsKey
as per method below. This is what showed up first that lead me to debug the root cause

Also if the OperatorFromName does fail with unknown OpCode then with CreateOperator it would fail anyway as it immediately tries to use the returned COperator
and if it's null it will fail. So I have added a return if it's null which will just throw away the operator essentially. You may want to consider other
behaviour. I'm not sure if it's best to fail entirely or silently continue with that operator ignored.

Download

15450
by maheshp50
Nov 18, 2013
3:06 PM

Being evaluated

Table Rendering with more than 7000 rows takes forever, There was a patch published in the forum, TableRendering by pakeha_by

Download

15074
by TSorbera
Sep 5, 2013
1:46 PM

Being evaluated

Added code to not decompress/recompress PNG images when possible.

Download

7340
by narayans
Nov 11, 2010
12:28 AM

Being evaluated

Added support for cross reference table streams (error: "Cannot handle iref streams. The current implementation of PDFsharp cannot handle this PDF feature introduced with Acrobat 6."). However, there's a problem where the xreference stream flatedecode seems to be returning a bad stream. I can't figure this out. Would appreciate it if someone took a look at this. Everything appears to be correct based on the specs.

Download

View All
  • 1-7 of 7 Patches
    • Previous
    • 1
    • Next
    • Showing
    • All
    • Patches