I was working with Visual Comparasion Tools of PDFTron SDK
i was able to overlay successfully changing colors of 2 pages, but i can’t figure out how to change the stroke and filled color (as it looks same).
Here is a sample of what i want
But this is what i get
Ryan
October 13, 2020, 5:15pm
2
Sorry, it appears your images did not go through. Perhaps you could try again.
There is problem with element that have fillcolor, there is no option to separate fill and stroke color in diff option
Ryan
October 14, 2020, 6:57pm
6
To assist further we would need the two specific input files , and the code you used to generate the output.
If you cannot post the two input files here, you can submit confidentially here: https://www.pdftron.com/form/request/
I submit the files on the link above.
Here is the code:
private void OverLay_Clicked(object sender, RoutedEventArgs e)
{
PDFViewViewer view = GetCurrentViewer();
if (view == null) return;
string filename = “”;
Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
dlg.Filter = “Pdf Files (.pdf)| .pdf|All Files (. )|. ”;
dlg.DefaultExt = “.pdf”;
if (dlg.ShowDialog() == true)
{
filename = dlg.FileName;
}
if (filename == “”) return;
PDFDoc newDOC = new PDFDoc(filename);
pdftron.PDF.Page firstDocumentPage = view.GetPDFDoc().GetPage(1);
pdftron.PDF.Page secondDocumentPage = newDOC.GetPage(1);
DiffOptions diffOptions = new DiffOptions();
diffOptions.SetColorA(new ColorPt(1, 0, 0));
diffOptions.SetColorB(new ColorPt(0, 1, 0));
diffOptions.SetBlendMode(GState.BlendMode.e_bl_darken); // overlay
PDFDoc outputDocument = new PDFDoc();
outputDocument.AppendVisualDiff(firstDocumentPage, secondDocumentPage, diffOptions);
outputDocument.GetPage(1).SetRotation(secondDocumentPage.GetRotation());
PDFViewViewer newview = new PDFViewViewer(this);
if (newview.LoadPDF(outputDocument))
{
LoadViewer(newview, “Overlay”);
}
}