Hello guys.

I am still on my looong way to code some automated redaction tool.
So far, I am able to redact simple texts (i.e., simple/single 'Tj'
operators). But now I face the fact that there are some texts to whom I
can't apply the same technique: complex 'Tj' operators. I was looking
deeply into 'pdfedit' source and I found a piece of code that do what I
need, except for the fact that it is too tied to GUI (or at least, that's
what I reach to understand) :(
I "sweep" a bit and now I have, in one hand, a QSA script with the right
functionality, and in the other hand, some C++ code extending somehow the
current 'pdfedit' version. But there is something left: the QSA part needs
all the involved QSPdfOperators, but I don't know how to ...return them?
emit them? from the C++ code (where I have a collection of the involved
PdfOperators --note the lack of 'QS' preffix). How can I just create a new
instance of a QSPdfOperator having a PdfOperator? I tried this:
...
BaseCore *bc = new BaseCore();
boost::shared_ptr<PdfOperator> textOp;
...
return QSPdfOperator(textOp, bc);

but I got:

error: no matching function for call to
‘gui::QSPdfOperator::QSPdfOperator(gui::QSPdfOperator)’
note: candidates are:
...
note:
gui::QSPdfOperator::QSPdfOperator(boost::shared_ptr<pdfobjects::PdfOperator>,
gui::BaseCore*)
note:   candidate expects 2 arguments, 1 provided

What is wrong? I am missing something for sure, but I don't know what it is
:(
Could you help me, please?

Thanks in advance.
Best regards.

On Wednesday, December 26, 2012, Jozef M. wrote:

> Dne 12/24/2012 11:52 PM, Alejandro Ramos Encinosa napsal(a):
> > Well, I just realize that there is a "flatten" tool that:
> > - ask for an existing (PDF) file path; and then
> > - ask for an output (PDF) file path; and then
> > - save into the second file the last version of every object into the
> > first file.
> > So, this seems to do what I need, but not in the way I expected to: do
> > I really need to save the current changes, and then invoke the flatten
> > tool with the file path? Am I really unable to just process the
> > current (in-memory) document?
> >
> > Any way, all I need now is to know how to script my goal:
> > - open a PDF file;
> > - make some texts replacements;
> > - (optionally) draw lines/rects at fixed positions;
> > - save the document ensuring that it will contain just one revision.
> > The only way I know so far for achieving this, is to save first the
> > document with new revisions and then pass its path to the flatten
> > tool, but even this way, I don't know how to write an script for all
> > this. Any help?
>
> Hi Ale,
>
> regarding scripting see
> http://pdfedit.petricek.net/wiki/ScriptingAddNewScript
>
> regarding flattening, that is how it is done, if you know c++ it should
> be pretty simple, probably not effective though.
>
> Jozef
>
>
>
>
>
> >
> > In the meanwhile, I will look deep into the code trying to find a way
> > to use a shortcut.
> >
> >
> > On 12/23/12, Alejandro Ramos Encinosa <arencin...@gmail.com<javascript:;>>
> wrote:
> >> Hi all.
> >>
> >> As far as I've read, once we save all changes, a new revision is
> created.
> >> My goal is to "rewrite" the current content instead of creating a new
> >> revision into the document: lets say I "spellcheck" the content of the
> >> document, I need then to be able to save the changes in a way in which
> >> the wrong words are no longer into the final PDF. Is there any way in
> >> which I can accomplish it?
> >>
> >> In the case in which the current pdfedit implementation doesn't cover
> >> such functionality, what should I modify to get the expected result?
> >>
> >> Thanks in advance.
> >>
> >> --
> >> Ale
> >>
> >
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> Pdfedit-support mailing list
> Pdfedit-support@lists.sourceforge.net <javascript:;>
> https://lists.sourceforge.net/lists/listinfo/pdfedit-support
>


-- 
Ale
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Pdfedit-support mailing list
Pdfedit-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdfedit-support

Reply via email to