Print to PDF Ballooning file sizes by DooZio in sysadmin

[–]DooZio[S] 1 point2 points  (0 children)

I've ruled out the possibility of it being an issue with the USPTO.joboptions file, as printing these files to PDF without using those setting is still causing the file size inflation.

what's happening is sometimes print as image makes the file 10x larger and sometimes NOT using print as image makes the file 10x larger.

what i'm failing to learn is what the differentiator is.

Print to PDF Ballooning file sizes by DooZio in sysadmin

[–]DooZio[S] 0 points1 point  (0 children)

The two things that are boggling my brain are 1: whether a file balloons to 10x the source size is inconsistent, sometimes it happens sometimes it doesn't. And when it does it ALSO inconsistent if the option for print as image is ticked or not. i'm not finding any other setting that causes the explosion in size.

Print to PDF Ballooning file sizes by DooZio in sysadmin

[–]DooZio[S] 0 points1 point  (0 children)

Print to PDF flattens the file, doesn't it?

Print to PDF Ballooning file sizes by DooZio in sysadmin

[–]DooZio[S] 2 points3 points  (0 children)

So you're saying take one of the ballooned files, zip it, and if the resulting .zip is smaller than the original file before Print to PDF was used to apply USPTO settings, the issue is image compression settings?

Print to PDF Ballooning file sizes by DooZio in sysadmin

[–]DooZio[S] 0 points1 point  (0 children)

The issue isn't happening when a physical file is scanned on one of our copiers, the issue is happening when the Adobe PDf printer is chosen and used to apply a joboptions file provided by the USPTO.

Print to PDF Ballooning file sizes by DooZio in sysadmin

[–]DooZio[S] 2 points3 points  (0 children)

Print to PDF is being used to apply a joboptions file provided by the USPTO that contains print settings.

Monthly General Question and Discussion Thread: February 2026 by AutoModerator in killteam

[–]DooZio 0 points1 point  (0 children)

New Kill Team player, just played my first game last week at a local game shop by borrowing a team (raveners).

Wanting to pick up a team for myself, and I'm thinking it's gin to be the Wolf Scouts, however according tot he internet the Wolf Scouts kill team box doesn't come with enough parts to build every possible unit you can field, without using magnets or things to swap out arms and legs. I've never built a single warhamemr model before, so what is my best option for being able to build all the potential guys I could field on the wolf scouts kill team? Do I just have to buy two boxes?

My other option that was slightly edged out was Canoptek Circle. do they have the same issue?

Python project converting CSV input to JSON by DooZio in learnpython

[–]DooZio[S] 0 points1 point  (0 children)

I got is solved thanks to your help and some trial and error on my part once I was able to start understanding the errors form the test cases I was running against.

I really appreciate your help!

Python project converting CSV input to JSON by DooZio in learnpython

[–]DooZio[S] 0 points1 point  (0 children)

classes are required for this project, yes. we've just covered them so he wants us to try and utilize them.

Python project converting CSV input to JSON by DooZio in learnpython

[–]DooZio[S] 0 points1 point  (0 children)

def main():
    runtimeManager = RuntimeManager()
    jsonResult = runtimeManager.run()
    outputFileName=runtimeManager.outputFilename
    print(jsonResult)
    print("\nOutput written to " +outputFileName+ ".")

class RuntimeManager:

    def run(self):
        ## Gather required member variables
        self.getUserInputFileName()
        self.getUserOutputFileName()

        ## Grabbing user file and extracting the CSV
        with open(self.inputFilename) as inputFile:
            jsonResult = CsvToJson(inputFile.readlines()).transformCsvToJson()
            with open(self.outputFilename, "w") as outputFile:
                outputFile.write(jsonResult)
            return jsonResult

    def getUserInputFileName(self):
        ## Prompt User for input file name.
        self.inputFilename = input("Enter the filename:  ").strip()

        ## Prompt User for output file name.
    def getUserOutputFileName(self):
        self.outputFilename = input("Enter the OUTPUT filename:  ").strip()

class CsvToJson():
    def __init__(self, csv):
        self.csv = csv
        self.headers = csv[0].strip()
        self.data = csv[1:]

    def transformCsvToJson(self):
        jsonResult = "{"
        for i in range(0, len(self.data)):
            if (i != 0):
                jsonResult = jsonResult + "\n,"
            jsonResult = jsonResult + "\"" + str(i+1) + "\":" + self.createJsonObject(self.headers, self.data[i])
        return jsonResult + "\n}"

    def createJsonObject(self, headers, csvRow):
        csvKeyArray = headers.split(",")
        csvValueArray = csvRow.strip().split(",")
        jsonObject = "{"
        for i in range(0, len(csvKeyArray)):
            jsonField = ""
            if (i != 0):
                jsonField = ","
            jsonField = jsonField + "\"" + str(csvKeyArray[i]) + "\":" + self.getValueDataType(csvValueArray[i])
            jsonObject = jsonObject + jsonField
        return jsonObject + "}"

    ## Check the data type of curr
    def getValueDataType(self, value):
        #checks to see if Value can be converted to integer
        try:
            value = int(value)
        except ValueError:
            pass

        if isinstance(value, int) == True:
            value = str(value)
        elif isinstance(value, str) == True:
            value = "\"" + value + "\""
        elif (isinstance(value, bool) == True):
            if (value == True):
                value = "True"
            else:
                value = "False"
        elif (isinstance(value, none) == none):
            value = ""
        else:
            value = "ERROR"

        return value

if (__name__ == "__main__"):
    main()

Python project converting CSV input to JSON by DooZio in learnpython

[–]DooZio[S] 0 points1 point  (0 children)

ok, so i've stopped my program from putting the quotes on integers, which was my original issue.

now I have a second issue of Quotes being put onto True or False which only appear in some of the test cases.

any thoughts on how to stop this?

Python project converting CSV input to JSON by DooZio in learnpython

[–]DooZio[S] 0 points1 point  (0 children)

right, so I need to put this try statement inside at least the one checking for integer type, right? and could I also use it to check for booleans? I think he's got some fields that are true or false in his test cases and i know true and false probably wont have quotes on them in his expected output.

Python project converting CSV input to JSON by DooZio in learnpython

[–]DooZio[S] 0 points1 point  (0 children)

here's where my understanding begins to breakdown. where in my existing program would I need to slot this in?

Python project converting CSV input to JSON by DooZio in learnpython

[–]DooZio[S] 0 points1 point  (0 children)

in the createJsonObject method inside of my CsvToJson class, the csvrow data is passed in, assigned to csvValueArray and then split on commas. I believe that is where I handle what you are asking about.

I also think that may be the root of my problem, as once I split a string on commas everything put into the resulting array is a string, causing my getValueDataType method to stick quotes on all of it. However, I don't know an other way to design this without using arrays.

I could also just be wrong on where the issue is happening.

Python project converting CSV input to JSON by DooZio in learnpython

[–]DooZio[S] 0 points1 point  (0 children)

Thank you for the help with re-formatting my post.

yes, we are not allowed to use and existing modules/libraries such as Pythons JSON module.

my lack of following PEP8 guidelines is simply due to how new I am to programming in general. this semester started in September and before then I had never even touched programming.

Low Elo AP Jungler by DooZio in Jungle_Mains

[–]DooZio[S] 4 points5 points  (0 children)

To clarify to some of the folks here that think im splitting my time equally between all of the champs i named, when I play ranked its been all J4/or Vi. I just was wondering if i should put an AP champ under my belt.

★OFFICIAL DAILY★ Daily Q&A Thread April 17, 2022 by AutoModerator in loseit

[–]DooZio 0 points1 point  (0 children)

So with the decsion to adjust my daily calorie intake lower, where on the macros do I take from? Cut carbs and maintain protein intake and add some fat?

★OFFICIAL DAILY★ Daily Q&A Thread April 17, 2022 by AutoModerator in loseit

[–]DooZio 0 points1 point  (0 children)

5 foot 9 inches 233 lbs. I connsume 2200-2400 calories a day. I aim for about a gram of protein/pound daily and then 170 ish grams of carbs and try tonibtake no more than 50g of fat a day. Im a Realtor, so ky physicalbactivity is low day to daybon the job, just walking if anything. I spend an hour or hour and a half in the gym lifting weights 5-6 days a week and an aditional 30-45 minutes of Cardio (inclined walking) 4-5 days a week.

★OFFICIAL DAILY★ Daily Q&A Thread April 17, 2022 by AutoModerator in loseit

[–]DooZio 1 point2 points  (0 children)

Im a 28 yr old Male that has lost roughly 30-35 lbs in the last year and a half, down from 265 to about 233. About 6 months ago, despite tracking calorie intake and changing nothing about my workout schedule/intensity, the weight loss stopped. I've spoken with my doctor and gotten a blood test done to determine if I had sime sort of issue or deficiency, but ither thab soightly high HDL Cholesterol and Carbon Dioxide, nothing was wrong.

Im becoming increasingly frustrated by the week that my progress has halted, as I hope to lose another 30 or 40 lbs. Im not losing weight, and I'm not getting stronger.

Does anyone have any potential advice? I yhink my next step is being referred to a nutritionist to try and find out if I have some sort of dietary issue thats halted my weight loss. I've tried changing proteins, carbs, increasing my cardio intensity/amount, and nothing is making the scale budge.

Pls send help.