On Sun, 05 May 2019 08:15:21 -0400, Paul wrote:
> In principle, you can do certain types of matrix operations
> that would preserve the "SVG" nature of the original document.
> You can translate, rotate, scale with a matrix.
Hi Paul,
Thanks for looking at the results & for analyzing them.
I understand what you're saying, where the bitmap conversion may have been
a result of how I read the PDF in, or, more likely, how I saved it.
I didn't write down the steps since it was only a quick proof of concept
attempt where there weren't any rules, so it was a freeforall. Normally I
write down all the steps of a process, in a scientific manner, but this was
just proof of concept since I knew I could "change" the PDF at will.
As I recall, I first opened the smith.pdf in Microsft Word 2007, but not
everything was there, where I didn't bother to debug. I also tried the
Adobe Acrobat Reader, but it wouldn't change the text (saying it didn't
have the font), which was the change that I had originally wanted to do (I
was gonna change the title to "Paul Chart" or something like that).
In the Adobe "writer", version 6, I could select the text in the word
"Smith Chart", which were recognized as Palatino-Bold text, but the error I
got when I tried it just now again to reproduce for you was:
"All or part of the selection has no available system font. You cannot
add or delete text using the currently selected font"
<
https://i.postimg.cc/QCvPjX78/pdfedit11.jpg>
Bearing in mind I mostly change text in PDFs, I don't know this for a fact,
but, I suspect if I either edited the PDF with a text editor, or if I added
the required font, that I "might" have been able to change the "Smith" to
"Paul" directly in the PDF.
Since it was just a proof of concept, I didn't bother to try to work around
that problem, and simply decided to use an image editor, where I right
clicked on the 94KB PDF to arbitrarily "open in Krita" freeeware, where the
Krita "Import" dialog asked how many pages (where I said "all pages"). The
resolution defaults to 100dpi
Then I simply hit Krita:Image > Shear Image" which asked for the
"Shear angle" for X & Y, each of which I arbitrarily set to 15 degrees.
Since that left white space at the edges, I filled it in and also increased
the canvas so that it was even at the top and bottom and then cropped.
The problem was that I couldn't _save_ as a PDF. Bummer. As I recall, I
saved ot Photoshop Image (smith.psd), and then read it into PhotoShop and
then simply saved it to "Photoshop PDF" without changing any of the default
options.
Since PS is simply a "language", I realize we could use a text editor on
the PostScript, but we'd have to know how to interpret the language, which
is best left to software, IMHO. I did look at the original smith.pdf in VIM
just now, where it's a combination of text & binary, apparently. Obviously
a hex editor would do the trick, but I think that is overstepping the
bounds of the quick test.
Vim doesn't show us the original text (which was what I was hoping to see),
but it does seem that the original PDF was created by Aladdin Ghostscript
6.01 based on what it says at line 550 almost at the end of the original
94KB smith.pdf file.
At line 410 of the original PDF is a definition of a font:
"URW Palladio L Roman"
At line 280 & 532 of the original PDF, are font descriptions of the sort:
<</Type/FontDescriptor/FontName/Symbol>>
<</Subtype/Type1/BaseFont/EKHBOO+Palatino-Bold/Type/Font/Name/R14/FontDescriptor 13 0 R/FirstChar 32/LastChar 251/
Where I "presume" that, if I knew the syntax, I could change that to a
system font that I have on my system.
At line 391 & 508 is another apparent font "Palatino-Roman", where at lines
293 & 407 there are copyright notices, apparently related to the use of
each of those fonts.
The rest is scrambled like the Franciscan sediments, where obviously things
would have been more descriptive had I looked at the postscript file in the
vim text editor instead of the PDF file.
I'm not going to spend the time to load or change the fonts, but I suspect
that there's a chance that a focused font-based approach perhaps would have
worked.
In short, you can edit (as in "change") any PDF, with varying degrees of
success, depending on a plethora of factors, not the least of which is what
you want to change.