FG Spreadshirt Swag
  1. #1
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075

    Extracting graphics from a PDF

    I was trying to compare the resolution/quality of graphics I had extracted from a PDF of a module I bought vs the jpgs the author sent me. These were his "player" versions so figured they would be better than my own editing.

    At my request, he also sent me the front and back cover graphics because mine had my RPGNow watermarks. I had edited those out (from using picture screen capture tool in PDFXChange editor) but again, wanted to compare vs his.

    Some graphics were not included so I went to grab them from PDF - this time I thought, hey - import em to GIMP, I did that for my World of Greyhawk PDF (was single image per PDF... perhaps that is why it worked differently?) - that gave me what I thought was it's "native" resolution. Exporting a single page (graphic and text) inside PDFXChange also gave me better resolution than my capturing in PDFXChange.

    Opening the PDF in gimp showed every page as 8.5x11 and some lowish pixel x pixel count. Lower than those I received from author but also lower than those I screencapped with PDFXChange.

    I am a TOTAL novice with graphics and tools for said. In case it matters with screen-cap tool, I am using a 2560x1440 (27") screen.



    Since this occurred, I decided to try and go back to my PAIZO Dungeon Magazine World of Greyhawk maps (I recommend them if interested, have to buy 4 digital issues of Dungeon 118-121 to get all 4 parts) and I had first imported to gimp (left window), this time I exported from PDFXchange (leading "_", right window):
    Attachment 18179


    So now I get to the gist of these things.
    1) What should I do to get "best" quality (resolution so can zoom more on map) JPG for the WoG map? I don't care if it is too big for FG - that I can reduce later.
    2) When working on a module, what is best way to get at graphics that the author did not supply you with outside of the PDF?
    3) Is the way lower "pixel" count (850x1100) reported when importing, via "Open" / "As Images", into GIMP from the PDF due a result of some menu option I don't know about? Seems odd.


    Thanks!

  2. #2
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,824
    I don't know the answer to your third question but it's likely to do with GIMP not really being an adobe product (like PS is) so it may not actually be importing it but juts more or less taking a screenshot. As for the second question all you can do is ask. But if it's not in the pdf how do you know what isn't there? I'm not sure I follow the question.
    For your first question, yes, start with a high quality png and convert it into whatever quality and resolution jpg you can manage so that it fits in with the recommended FG limits.
    If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php

  3. #3
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Thanks Zach,

    For #1, I meant between using the screenshot select-area-capture tool (ruled out), export-as and open-as-images. in the last 2 cases, I get nice big images, but since they are different "sizes", I don't know which is "right"

    For #2, I meant that the author did not supply me with personally I am in the middle of converting a product from a small module creater and he is supporting me with his additional VTT maps for players that isn't in the product sold on DTRPG. He also sent me a copy of the cover/back cover art so I could include it without needing to edit out my email/watermark. I didn't ask him to look for and send me "all the graphics" because originally, I had done most of the conversion prior to contacting him in order to run a game one in one with my boy. After, I decided hmmm... o5hers might like this since I was doing it like a full-on bought module to practice creation. So, I had already gotten the pics IN the PDf via various methods. Just not sure if there is a way, in general, to know what the resulting jpg should be in pixels etc to be closest to original, i.e. not resampled or whatever it is called. If I don't make sense, it is because I really do not have a grasp of the issues involved.

    For #3, and maybe above? I guess, without buying anything new, I can either install whatever Acrobat came with CS3 64bit or in theory, but I'd like to keep it minimal install since I don't use these tools -> Photoshop from CS3 to import. I'm guessing Adobe Creator would be enough unless that version is too old? I always regretted not buying a new CS for my wife, at the time she was not scrapbooking and when she did again, damned monthly "rental" pay system came out.

    Alternatively, I have Photoshop Elements 10 & 15 which could install also. Doubt they do much with PDF since probcaimed at casual photogs but in case a much newer PSE like 15 has more import functionality than an old Acrobat from prob 2011 or so.

    Gracias!

  4. #4

    Join Date
    Jun 2013
    Location
    Isanti, MN
    Posts
    2,922
    Quote Originally Posted by Varsuuk View Post
    Some graphics were not included so I went to grab them from PDF - this time I thought, hey - import em to GIMP, I did that for my World of Greyhawk PDF (was single image per PDF... perhaps that is why it worked differently?) - that gave me what I thought was it's "native" resolution. Exporting a single page (graphic and text) inside PDFXChange also gave me better resolution than my capturing in PDFXChange.
    Change the settings on the import screen. I usually use 300DPI, makes them more than sufficiently large.

  5. #5
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,824
    Ah, ok I see now.

    If you have a map or image that contains 'spoilers' like room numbers and secret doors etc it's always a good idea to ask the publisher if they have unkeyed copies of the maps. Mostly they will since mostly artists work in Photoshop so they can export an image with the layers containing the keyed information hidden - although that isn't a guarantee. You only really need to worry about maps in this respect since this is a VTT and a very important part of that is getting a decent players map that the battles can take place on. For any other image you don't need to be so picky. Just taking a snapshot of the pdf page and cropping out the graphic is usually quite sufficient - especially if it's a full page image. You'll want to restrict images (other than maps) to about 800px high or about 1000px wide so that when opened they will still be small enough to not be bigger than most screen sizes. So unless the image is very small you don't need to worry about resizing (mostly).
    If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php

  6. #6
    Quote Originally Posted by Varsuuk View Post
    1) What should I do to get "best" quality (resolution so can zoom more on map) JPG for the WoG map? I don't care if it is too big for FG - that I can reduce later.
    This is somewhat complicated by the fact that when you're looking at most PDFs, you are often looking at rasterized images overlaid with vector images/text. Vector images/text scale, virtually, to any size without loss of quality. Rasterized images do not. They are "best" at their native resolutions (or close to it).

    So, the first thing you need to do is decide what you're exporting... and what you're going to use it for.

    Lets take that WoG map quadrant as an example.

    There are various PDF readers that may allow you to get a look at what the specs of the assets in that PDF are. This information may or may not be "secured" depending on the PDF file in question. In this case, that map quadrant image is, natively, 144ppi. So, if you export the map larger than that you are dynamically creating pixels (interpolating) that aren't really there. Note, decent editing software will be better at doing that that your PDF reader.

    But here is where understanding what scales and how it scales matters. If you export that map at 144dpi, you will be getting the map image at its native resolution. But you may not like the quality of the text at that size. Export the map at 300dpi, and while the map image make look "softer", the text maybe much more readable for your use-case because it will be rendered "natively" at 300 dpi.

    In addition to the above, what file format you export the image at matters, too. Exporting to a JPG format will introduce compression artifacts. And given that the image may already be a JPG, every time your reformat into a JPG again you're creating additional distortion. So you really want to do that as little as necessary. Export the image into a TIFF or PNG format, do your editing and adjusting with it, *then* save it in a JPG format at the size you want in order to maintain the integrity of the image.

    There are a lot of pitfalls to doing this sort of thing... I'm just hitting on the broad strokes here.

    2) When working on a module, what is best way to get at graphics that the author did not supply you with outside of the PDF?
    If the PDF is unsecured, you can often open them in a program like Illustrator (Inkscape might work, too) to get at the building blocks. If it's secured, look to see if you can turn off any vector or text layers and export an image accordingly. Or, as noted, you might be able to hunt down whether the publisher has provided separate images or separate packages with more flexible access (Paizo often releases more flexible MapPacks of their Adventure paths.)

    In addition, unsecured PDFs, with the proper software, can sometimes be re-rendered into a quasi-layered PDFs... with vector images, text, and rasterized images on their own layers. Do this and then you might be able to turn off the vector images and text to export the background image more cleanly (this, of course, presupposes that the text wasn't embedded into the image to begin with). Again, there are a lot of possible permutations that could be at play.

    3) Is the way lower "pixel" count (850x1100) reported when importing, via "Open" / "As Images", into GIMP from the PDF due a result of some menu option I don't know about? Seems odd.
    I'm not as familiar with GIMP, but in Photoshop you can have it render the opened image at whatever size you'd like. As noted above, the closer the image is rendered to the native resolution of the image the cleaner the actual raster image will be. Vector images and text will render perfectly at any resolution.

  7. #7
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Quote Originally Posted by Full Bleed View Post
    This is somewhat complicated by the fact that when you're looking at most ...
    And THIS is why I feel that we have to figure out how to live multiple lifetimes with memory or get download dohickies in our brains. How ELSE am I gonna get this level of expertise in all the areas I am interested in... bah

    (And thanks a lot! I guess i'll have to use the info up there as a(n excellent) primer and wiki some more.

    I want to respond to one thing, but i'm laying in bed under the weather so will wait until more clearheaded in case I need not ask then.

  8. #8
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Before I start trying to move into layers or simply delete "text"/objects - how do I "knit" together the 4 PDFs so that it becomes one big PDF to import into Inkscape or alternatively, how do I import one at time to Inkscape and stitch them there. Whichever works best?
    I'd like the "stitched" version to still have the "objects" for me to put in layers or remove.

    I couldn't import it into CS4's Illustrator (it's 32 bit btw, only PS is 64bit in CS4) because it complains about all the fonts and replaces them with stuff that definitely does NOT look good
    Inkscape "internal" import fails I believe, in any event the app exits with no message/error on screen. Loading it via the "external" choice seems to work fine (keeps fonts) - this app is 64bit, iir which means it would have access to all 16mb I have in memory because assume it will use a lot.
    Attachment 18191


    Anyone who might be able to explain some of the finer points of achieving the stitch and "moving to layers" of stuff on TS some time they have time would sooooo rock thanks.
    Thanks all.

  9. #9
    You're getting into some of the quirkiness and technical minutia of Vector graphics/layout programs. You will probably get more actionable info on the Inkscape forums.

    In general, there is probably a way to expand the "art board", open multiple documents, and then drag from one board/document to the other... creating a pretty massive document. There may even be some settings that will assist in rendering a more useful import/export of a PDF document in said programs...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in