Beyond Compare - can we delete Delete Blank Line while comparing two pdf's text - beyondcompare4

I am using Beyond compare(version 4) to compare two pdf's text. But in one scenario, since it is comparing Line by Line , if blank comes in middle, it is comparing blank line with other pdf's text , and shows as difference.It follows for the rest of the page. Please see below ,
First PDF
Line1: A. Beautiful
Line2: Blank
Line3: B. Good
Second PDF
Line1: A. Beautiful
Line2: B. Good
Line3: Blank
Kindly let me know, whether we can mark the blank line and delete. so that it will compare only the text.
Thanks in advance.

Beyond Compare doesn't support editing PDF files. However, if it doesn't align text correctly, you can force two lines to align. Right click on a line on the left and select Align With, then left click on a line on the right side.

Related

Beyond Compare 4 - Not showing the proper aliment for differences

Hi All I am comparing two text files , using beyond compare V4 and it is showing differences as below snapshot.
Right file does not have CollectionCash and left file does not have CollectionsCO values. It should show blank/missing lines for values which are not present in either of files. I want to compare based on the first word fully matched in lines. I tried different rules but no luck. Please suggest how can i achieve this.
Thanks
Beyond Compare's default Text Compare settings align based on partial matches. To only align exact matches:
Click the Rules toolbar button (referee icon).
Go to the Alignment tab.
Check Never align differences and click OK.

Replace a blank before a table page break Word VBA

I uncheck "Allow row to break across pages" for a table's properties So, the table is shown on a new page to ensure that all the content is on one page, this works fine. But Word generates a blank space before the page break, I need to replace it with some text for a legal reason. I can't use a watermark or shapes because un Oracle BI Publisher only prints it on PDF and I need to export it to a docx.
The data is dynamic, so sometimes the text before the table and the text inside the table may change.
Current Version https://imgur.com/a/FTx0q
I need some like this https://imgur.com/a/ySitL
MS Office support told me that it can't be done with Word...
Maybe with VBA code?
Update
Thanks Cindy for your help.
I have a table into another table many paragraphs, checkbox etc and they are fitting on a new page. It's working.
I understand there isn't a page break.
It's Paragraph mark.
But what I need to do is insert a kind of mark, a text like XXXX,-----------, Instead of leaving "free space",
It's a requirement not change the font size or another text format.
For a legal requirement, some paragraph must fit on a new page and "blank spaces" replaced by a kind of mark.
I can't hard code it because in several cases not all the paragraphs or section in a page will be shown and I don't know by default when a new page is needed.
I am available to use macros or anything.
What you could do is insert a page-size table into a textbox in the page header and format the body text with a white background. The table will thus be hidden behind any text on the page, but not otherwise (provided you don't pad unused space with empty paragraphs, etc.).

Get the left indentation of a line above the selection - VB

I have to format a text based on indentation.
The steps are :
User selects a table on a page
Presses a button
The table gets indented exactly as the text above ( no gaps at all)
I know MSFT gives little less indentation to the table, so they look little askew.
I know how to change the indent of the selected table by the command
Selection.Tables(1).Rows.LeftIndent = <Value_as_that_of_the_text_above>
but I don't know how do I get the indentation of the text above, considering only table has been selected not the text above. Any help is appreciated.
You will need to get all the paragraphs of the document(try this). Then get the last paragraph on the page indent.

Formatting issues duplicating table

Forward
I am making a "label program" that will print waybill information. Consists of a table in Word on a custom 3x5 inch document with 0 margins.
I currently have a simple form that, if you need copies, it will edit one of the cells so that each time it prints the "pieces count" is incremented. 1of10, 2of10, 3of10.....
While that worked the code submitted a separate print job for each "label". That created a problem for the end user where they would have to wait about 5-10 seconds between print jobs. When printing a couple of hundred of these at a time those seconds can add up.
Corrective solution
To try an alleviate this problem I wanted to make copies of the table so that 100 labels would be printed as one 100 page document. Found several solutions for copying pages of text but I have tables which complicated things. The closest solution I have found was:
With ActiveDocument
.Tables(1).Range.Copy
.Range.Select
'.Range.InsertAfter (Chr(11))
Selection.Collapse wdCollapseEnd
Selection.Paste
End With
And this does make a perfect copy of the table however it is merging the tables together. So if I wanted to loop this to create several more labels it would be doubling up the results every time since the code above just copies the first tabel.
To try and fix that issue I added a line break (vertical tab) before the paste. You will see that as the commented out line in the above snippet. This breaks up the tables but adds too much whitespace in between.
Page breaks seems like the solution here. While those did make the table break up they ended up creating a blank page in between each label which I was having enough of a time clearing from the GUI let alone in VBA.
The actual question
How can I take a table that is perfectly designed to fit on one 3x5 inch page and duplicate it X times. The caveat is I need to be able to find the cell programically that contains the pieces text. Currently I can use these absolute reference for the first table
ActiveDocument.Tables(1).Cell(5, 1).Range.Text
So if I had 3 tables for instance I need to be able to call each table and edit the text of the Cell(5, 1).
In case you ask
I know this functionality is better placed inside actual label programs like Bartender but those cost money that the company will not allocate for the only label my company uses.
The right concept was there. We needed to add a break in between the tables to disassociate them. Adding the vertical tab Chr(11) was obviously not the correct way to do it.
A proper section break would be the route to go here. Looking at MSDN you can see there are multiple types of section breaks. After testing a desirable outcome was acheived from using wdSectionBreakNextPage which is a "Section break on next page."
Basically just needed to add one line to the above code.
With ActiveDocument
.Tables(1).Range.Copy
.Range.Select
End With
With Selection
.Collapse wdCollapseEnd
.InsertBreak (wdSectionBreakNextPage)
.Paste
End With
I hate the use of Selection and I am going to look into that but for now this does function properly.
Since the tables are not single units we are able to query .Tables in order to edit each page individually.

Formatting text from Mulitline text box in word with VBA

I'm putting together a template in Word, using a form for the user to fill in to then populate some of the document.
The bit I'm currently stuck on is at the end of the document, where the cc's are listed.
The form has a multiline text box into which the user puts in their cc's, one per line.
I then want to add to the end of the document the contents of the text box, but in the right format. Specifically, it should look like:
cc: First CC contact
Second CC contact
so on and so forth
I attempted to do this using 2 bookmarks, so my code currently is:
' If 'CC' box has content, add it
If doc_CC.TextLength > 0 Then
.Bookmarks("CC").Range.Text = vbCr + "cc:"
.Bookmarks("CCs").Range.Paragraphs.Indent
.Bookmarks("CCs").Range.Text = doc_CC + vbCr
End If
However, when this is run, on the page it looks like:
cc: first contact
second contact
and so on
Realise that the 2 bookmark method is a bit messy but it seemed like a good idea at the time - obviously this is not the case! Have done some searching for a way to do it with Split but am not making much progress down this path - suspect I'm googling for the wrong thing.
How do I do this so that the formatting is as desired? Any help is greatly appreciated.
Try inserting a tab character? + Chr(9) or even + vbTab may work.
Have found a work around which, while doesn't answer the actual question of how to do it, does produce a result to the same effect.
Have used a 2 column table without no lines instead with contents of a1 being "cc:" and contents of a2 being whatever was entered into the multiline text box. If there is nothing in the text box, then the table is deleted.
I'll keep on eye on this question though so if some one does have the proper answer I can mark it accordingly.
Another possibility would be to format the cc paragraph with a hanging indent (like is used for bullets or numbering). Use a newline character - Chr(11) - instead of vbcr to separate each entry. The text should all line up,then...