English 中文(简体)
3. 作物开发,不保持无形内容(NET或ObjC)
原标题:Crop PDF without keeping invisible content (.NET or ObjC)

I m试图利用......生产一个PDF。 NET(使用PDF4NET或iTextSharp,但不关闭)或C(CGContextXXX,CGPDFXXX等)。 但是,如果不保持看不见的内容,!

目前,Im能够利用作物箱或Clip区进行作物经营,但所有内容仍见于PDF。

是否可能?

感谢(和 s, I m french...)

最佳回答

http://www.amyuni.com/en/developer/pdfcreator/features.html” rel=“nofollow noreferer”>Amyuni PDF Publishing .Net。 您可使用以下方法:rel=“nofollow noreferer” IacDocument.GetObjectsIn Rectangle,用于检索你感兴趣的所有“图表物体”:

IacDocument.GetObjectsIn Rectangle 方法

The GetObjectsInRectangle method gets all the objects that are in the specified rectangle.

之后,你可以翻开页上的所有物体,删除你不感兴趣的物体:

//open a pdf document
document.Open (testfile,"");
IacPage page1 = document.GetPage (1);
Amyuni.PDFCreator.IacAttribute attribute = page1.AttributeByName ("Objects");
// listobj is an array list of graphic objects
System.Collections.ArrayList listobj = (System.Collections.ArrayList) attribute.Value;
foreach ( object pdfObj in listobj )
{
   // if pdfObj is not in the collection of interest
   // then call pdfObj.Delete();
}

Update:
Amyuni PDF Creator .Net version 5.0 adds a new method IacDocument.Redact which might also be helpful in this kind of scenario:

The Redact method retrieves all the objects of the specified type in the specified rectangle, deletes them, and draws a solid color rectangle at their place.

Disapper: I work for Amyuni Technologies

问题回答

暂无回答




相关问题
Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How do I compare two decimals to 10 decimal places?

I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....

Exception practices when creating a SynchronizationContext?

I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...

Show running instance in single instance application

I am building an application with C#. I managed to turn this into a single instance application by checking if the same process is already running. Process[] pname = Process.GetProcessesByName("...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...

热门标签