Autonomically link text across pages with different fonts - powerpoint

I work with a file with the same text but 4 different founts (and sizes) across 4 pages
and every time I have to copy and paste to reset them for multiple times is exhausting
is there a way to let the Text link one of the text box and I only have to type once ?

Related

Why are images in pdf sometimes sliced into multiple images?

Noticed that images sometimes are sliced up in PDFs.
Steps:
insert an image with a high resoultion (3000x1800) into a .docx
use "Microsoft Print to PDF" option of Word to convert to PDF
extracting all images with pdfimages or pymupdf
Result:
Image is sliced horizontally into three images
Questions:
What exactly happens in the in the transition from .docx to pdf (or in generell in the process to pdf) that makes the converter slice it up into three images instead of one?
Do the individuell XObjects of the sliced images contain information which says that these three images belong to originally one?
How do I know how the images are sliced (horizontally / vertically) and what if originally there were two images inserted into the .docx file and both of them are sliced. Can you tell if slice x belongs to original image y or z?
So, as you have found out: because the code which generates the PDF choose to do so.
The technical reasons may be various - it could be that historically there were printers which would only have so much memory, and would need to get limiterd size-images when printing, and someone at some point when writing the PDF export code present in Microsoft Office choose to apply this limit.
Anyway, technically, as put in the comments, an image in a PDF file could be composed of unlimited smaller images collated together.
Now, the second part, and your actual question: to know whether images ibn a PDF file belong together in a single original image one would need a custom extractor tool to check the geometry of all images in the document and find out which images have no margins or boundaries with others - it would not be that hard to do for well behaved files (which we can't know if MS Office generated files are: there are ways to obfuscate image positioning by making it indirectly). The metadata in the image-parts may or may not contain information that would allow one to recompose the original image: it would be up to the code generating the PDF to include this metadata or not - but the geometry can't lie in this case: if the final document presents a single image visually, it is possible to detect that when fetching the images.

Inserted Photo and/or Kable Table will not stay where it's placed between text in R markdown

I have two things I have been using, neither of which are keeping the image/table exactly where I placed it within the text in R markdown when knitted to a pdf.
![caption](path) will place the image where there is space on the page. That is, if the page has space, the image will print between the desired text. However, if the page does not have the space, the text is placed to fill the page and then the image awkwardly inserts itself in the middle of the paragraph on the next page.
I am having a similar problem with my kable tables. I have tried using latex_options = 'hold_position', but this seems to only keep my tables from grouping together.
Is there a way to have my table stay between the text that I want? So if it needs to start a whole new page, to fit it, it can without trying to fill the space with the text below.
Thank you in advance.

What is the best way to convert PDF pairs into single pages?

I need to take an existing PDF (created with Prawn), and combine pairs after page 1 (the cover) into single pages. I would also like to add a vertical line in the center of the joined pages. The pages are to be printed in books, and the goal is to make single PDF pages that are similar to the side by side view in Acrobat. I know I can convert them to images, do what I need to with ImageMagick, then put them back into a PDF format, but I am trying to minimize the number of conversions so I can save as much quality as possible.
I also realize I can do this from the start with Prawn, but I am trying to avoid that as it would require a very large change to our application.
It is possible to do this with Ghostscript and the pdfwrite device, but its by no means simple. You need to write some PostScript to do the job.
You would need to add BeginPage and EndPage procedures, the BeginPage would need to check the current page number (and you would need to track this yourself). If its page 1, process normally. If its an even page, throw away the current PageSize and replace it with one which covers a pair of pages. Process the even page. Do not transmit the content.
If the page is odd (and not 1) then translate the origin so that its offset to the right by the width of the page. Process the odd page. use moveto, lineto and stroke to draw the required line between the two pages. Transmit the page.
This assumes that all the pages are the same size and orientation, or least that the sizes of each page are known in advance. It would be possible to retrieve those programmatically as well, but more complex.
Its definitely non-trivial, but if you rummage through my answers in the PostScript tags and look for anything with the word 'imposition' you'll probably find program outlines to do the job.
I did a quick look and here's an answer I wrote some time back. It uses a different approach to that outlined above, it copies some of the guts of the PDF interpreter and repurposes them. It does a chunk of what you want though.

Dilemma: a huge sprite & inline style tags VS. no inline style tags and many images

I have an application in which the user will 'upload' a lot of (small-size, from 5 to 20kb each) images to the HTML page, and will drag and drop them to different locations on the page (with jQuery). I have the choice of making them input images either as separate files, or as a sprite. I'm wondering what is the better choice with regards to both performance and webstandards, with the file size in consideration and this statement: user experience doesn't matter in this case (having to input files one by one)
Either... or
Many (more than 200) inline style tags with background-position: abpx abpx; and 1 sprite.
--> Bad for webstandards, good for pagespeed
Many images (more than 200)
--> Good for webstandards, bad for pagespeed

Opening a large text file (30mb) consumes 500,000k of Firefox memory

I was initially dabbling with IFrames to launch a document, and found that for large files, the memory in all browsers (I first noticed this in FF) jumped to 500,000 K.
At first I thought it might have been some bad JS code that I had written, but removing all the extraneous code and just OPENING the text file still displayed the same problem.
So right now, all I'm doing is going to a site http://url/largefile, and seeing the file slowly display to the screen.
Is there any efficient way for me to display the file without the browser exploding? What am I missing here?
EDIT: I've received responses to use a text editor for this purpose. My original goal was to allow a user to click the url, which would append a search term as a post variable. The opened textfile would then scroll to the specified point of the search term. Is there a way to auto open a text editor ... on that person's computer and then going directly to the search point?
30MB is kind of big, even for a regular text editor, I suspect you will be unable to convince FF to handle it well. I might try one of the following:
implement paging/searching in your web site so it only displays a portion of the file at one time
open the file in an actual text editor - it's what they are good at after all
Your paging implementation (if suitably clever) might only load the text around the selected piece of the file, and when they scroll up or down use AJAX to load additional parts of the file (kind of like a virtual list control in windows). This might help to mitigate the performance impact.
Is it xml? Firefox tries to create a DOM for xml files that can be many times larger than the file itself.

Resources